Tech Off Post

Single Post Permalink

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

    Ion Todirel said:
    exoteric said:

    how is a.Rest.Rest.Rest.Rest.Item more readable than a.Item4?

    That's just a way to structure the definition in a "compositional" way. One should not normally access the items in this way (given syntax support for tuples as mentioned earlier in wkempf). Although if you want to, it'd be easy to create getters that did this traversal. You could define properties such as Length and indexers such as Item ([]).