That\'s kind of a general question (but I\'m using C#), what\'s the best way (best practice), do you return null or empty collection for a method that has a collection as a
There is one other point that hasn't yet been mentioned. Consider the following code:
public static IEnumerable GetFavoriteEmoSongs()
{
yield break;
}
The C# Language will return an empty enumerator when calling this method. Therefore, to be consistant with the language design (and, thus, programmer expectations) an empty collection should be returned.