Csharp/C Sharp/LINQ/Enumerable.Empty — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
Admin (обсуждение | вклад) м (1 версия) |
(нет различий)
|
Текущая версия на 14:38, 26 мая 2010
Return an Empty Sequence of Strings
<source lang="csharp"> using System; using System.Linq; using System.Collections; using System.Collections.Generic; public class MainClass {
public static void Main() { IEnumerable<string> strings = Enumerable.Empty<string>(); foreach (string s in strings) Console.WriteLine(s); Console.WriteLine(strings.Count()); }
}
</source>