C# Distanct
2021-05-01 03:28
标签:line 集合 list string style isa ring console mes List IEnumerable var distinctNames = names.Distinct(); C# Distanct 标签:line 集合 list string style isa ring console mes 原文地址:http://www.cnblogs.com/ZkbFighting/p/7794035.html简单一维集合的使用
List
Console.WriteLine("Distinct ages:");
foreach (int age in distinctAges)
{
Console.WriteLine(age);
}
Console.WriteLine("\nDistinct names:");
foreach (string name in distinctNames)
{
Console.WriteLine(name);
}
List
List
foreach (int a in disAge)
Console.WriteLine(a);