In LINQ, the Empty method or operator is used to return an empty sequence of collection.
Following is the syntax of the LINQ Empty method to generate collection with an empty sequence.
C# Code
VB.NET Code
If you observe the above syntax, we defined the Empty method to generate an empty sequence.
Following is the example of the LINQ Empty method to generate a collection that contains an empty sequence.
C# Code
VB.NET Code
If you observe the above example, we defined the Empty method to generate an empty sequence. If we run the above example, we will get empty results. This is how we can use the LINQ Empty method to generate an empty sequence of collection.