ToList
In this chapter you will learn:
Get to know ToList operator
using System;//from ja v a 2 s .c o m
using System.Linq;
using System.Collections;
using System.Collections.Generic;
public class MainClass {
public static void Main() {
string[] presidents = {"G", "H", "a", "H", "over", "Jack"};
List<string> names = presidents.ToList();
foreach (string name in names)
Console.WriteLine(name);
}
}
Next chapter...
What you will learn in the next chapter:
Home » C# Tutorial » Linq Operators