C# Fundamentals: Returning Zero or One Item As IEnumerable<T>(blackrabbitcoder.net)
submitted by
BlackRabbitCoder(661) 5 months, 17 days ago
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.
|category: C#
|Views: 40
tags:
C# another
Everyones tags:
Your Tags: