Return an Empty Sequence of Strings : Enumerable.Empty « LINQ « C# / CSharp Tutorial






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());
    }
}








22.34.Enumerable.Empty
22.34.1.Return an Empty Sequence of Strings