Creating an empty sequence using the Empty operator in LINQ
August 16, 2016 4 Comments
You can create an empty sequence of a type using the Empty operator in Linq. Its usage is very simple:
IEnumerable<string> emptyStringSequence = Enumerable.Empty<string>();
This creates a sequence of strings consisting of 0 elements.