Tech Off Post

Single Post Permalink

View Thread: Ideas for C# 5.0
  • User profile image

    exoteric said:

    I'll start out -


    Tuple Syntax 
    a la (precise parenthesization not so important here)


    Tuple Enumeration

    Not a language feature but allow tuple to be enumerated (IEnumerable<T>) for both homogeneous and heterogeneous tuples, meaning these two cases would both be legal

    foreach (var x in (1,2,3))
    foreach (var x in (1,"WTF",3))

    Where in the first case the tuple would be IEnumerable<int> and in the second case the tuple would be either IEnumerable<IDynamic> or IEnumerable<Object>.

    BigInt literals


    var bigint = 349438474346346348348346734634634892390139328234746546348349349347237236465483932948565623893832932932737;