In some case I've to return an empty list of items in a method.
Most of the case, I'm returning an IEnumerable<T>
, so the Enumerable.Empty<T>()
does exactly the job.
But I've one case where I've to return absolutely an IList<T>
instance(we could use an IEnumerable, but this would results in a code much less efficient).
I didn't found an equivalent for the IList
. I can perfectly imagine doing my own Singleton provider for empty list, but I would like to know if there is something I did miss?