How can I return an empty IEnumerable?
You can use list ?? Enumerable.Empty<Friend>()
, or have FindFriends
return Enumerable.Empty<Friend>()
This can be found under the System.Linq
namespace.
You could return Enumerable.Empty<T>()
.
You can use list ?? Enumerable.Empty<Friend>()
, or have FindFriends
return Enumerable.Empty<Friend>()
This can be found under the System.Linq
namespace.
You could return Enumerable.Empty<T>()
.