Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

C# Querying With LINQ Now You're Querying Using Query Syntax

ambareesh M
ambareesh M
6,122 Points

Add LINQ capabilities by adding a using directive to the NumberAnalysis.cs file. I added Using System.linq; still I m

Added System.linq still i m getting error

NumberAnalysis.cs
using System.linq;
using System.Collections.Generic;

namespace Treehouse.CodeChallenges
{
    public class NumberAnalysis
    {
        private List<int> _numbers;
        public NumberAnalysis()
        {
            _numbers = new List<int> { 2, 4, 6, 8, 10 };
        }
    }
}

3 Answers

Jennifer Nordell
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
Jennifer Nordell
Treehouse Teacher

ambareesh M Hi there! You've simply forgotten to capitalize the first letter in linq. It should be:

using System.Linq;

As in most programming languages, these things are case-sensitive. Happy coding! :smiley:

using System.Linq; using System.Collections.Generic;

namespace Treehouse.CodeChallenges { public class NumberAnalysis { private List<int> _numbers; public NumberAnalysis() { _numbers = new List<int> { 2, 4, 6, 8, 10 }; } } }

Yeah I did not see this mentioned in the earlier video