Why do tuples start from Item1 #8539
-
When we were learning arrays, we learned that computer counting starts from 0. We subconsciously assume that all parameters start from 0. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
That would be a runtime question as the |
Beta Was this translation helpful? Give feedback.
-
One way of thinking that I would offer is that the |
Beta Was this translation helpful? Give feedback.
-
Those are not parameters or indexed members but fields with explicit names.
When you access the fields by the
|
Beta Was this translation helpful? Give feedback.
Those are not parameters or indexed members but fields with explicit names.
When you access the fields by the
ITuple[int]
indexer the indexing starts from 0 and it's also documented: