LINQ ToList() MethodIn LINQ, the ToList operator takes the element from the given source, and it returns a new List. So, in this case, input would be converted to type List. Syntax of LINQ ToList() operatorThe syntax of using the LINQ ToList() to convert the input collection to list. C# Code In the above syntax, we are converting "countries" collection to list using the LINQ ToList() operator. Example of ToList() operator in method syntaxThe example of using the LINQ ToList() to convert the input collection to List in method syntax. C# Code OUTPUT: In the above example, we are converting countries collection to List by using the LINQ ToList() method. Example of ToList() operator in Query SyntaxThe example of using the LINQ ToList() operator in Query Syntax OUTPUT: Next TopicLINQ ToArray() Method |