ToList()方法

       //ToList()方法,翻译:把****转化为List集合。
      // 控制台试试: string[] fruits = { "apple", "passionfruit", "banana", "mango","orange", "blueberry", "grape", "strawberry" }; List<int> lengths = fruits.Select(fruit => fruit.Length).ToList(); foreach (int length in lengths)
{
Console.WriteLine(length);
} Console.ReadKey();
/*
5
12
6
5
6
9
5
10
*/

来源: https://msdn.microsoft.com/zh-cn/library/bb342261(v=vs.110).aspx

上一篇:storyboard


下一篇:OSI七层模型和五层TCP/IP协议