What\'s the standard way to get a typed, readonly empty list in C#, or is there one?
ETA: For those asking \"why?\": I have a virtual method that re
Personally, I think this is better than any of the other answers:
static readonly IList EmptyList = new T[0];
IList.new List().AsReadOnly() . IList (if you want).Incidentally, this is what Enumerable.Empty actually uses under the hood, if I recall correctly. So theoretically you could even do (IList (though I see no good reason to do that).