Error!
Success!

C# Fundamentals: Returning Zero or One Item As IEnumerable<T>

0
kicks

C# Fundamentals: Returning Zero or One Item As IEnumerable&lt;T&gt;  (Unpublished)

There are times when we are writing a method that returns a sequence of items, that it occasionally becomes necessary in base-class, interface implementation, error, or default conditions to return a sequence of only one or even zero items. There are many ways to do this, of course, which begs the question of which way is best, in terms of readability, maintainability, and performance.


Kicked By:
Drop Kicked By: