Search code examples
c#.net-4.0ienumerabledefault

What is the value of default(IEnumerable<T>)?


What is the value of default(IEnumerable<T>) in .NET 4.0, C# ? (Pretty much straightforward)


Solution

  • null
    

    default Keyword:

    will be null for reference types and zero for value types.

    IEnumerable is not value type, so result will be null