Imagine you have to implement interface required property:
IEnumerable<int> Ids { get; }
which (implemented) returns empty enumeration. You may write:
public IEnumerable<int> Ids
{
get { yield break; }
}
But is there a way how to use expression bodied member syntax, so you may have this on single line?
Use the Enumerable.Empty<type>
function.
IEnumerable<int> Ids => Enumerable.Empty<int>();