C# Querying With LINQ Query Operators Conversion Operators

Challenge 2 of 2: Conversion Operators - not liking my .ToList() code

Code: var numbers = Enumerable.Range(0, 10);

List<int> numList = numbers.ToList();

--- Fails: says numbers is not List<int>; did I use ToList()?

CodeChallenge.cs
var numbers = Enumerable.Range(0, 10);

List<int> numList = numbers.ToList();

1 Answer

Dale Severude
Dale Severude
Full Stack JavaScript Techdegree Graduate 71,274 Points

The instructions are to convert the numbers variable to a List with a LINQ method. You have created a new variable named numList. The final answer still needs to be contained in the numbers variable.

Thanks... figured that out this morning. It was late when I posted.