Tuple is a typed, immutable and generic construct. It is a useful container for storing conceptually related data. A simple class with commented members and helper methods is more useful for important things.
Example:
var population = new
Tuple<string, int,
int, int, int, int, int>( "New York", 7891957, 7781984, 7894862, 7071639, 7322564, 8008278); |
Creating the same tuple object by
using a helper method is more straightforward, as the following example shows.
var population = Tuple.Create( "New York", 7891957, 7781984, 7894862, 7071639, 7322564, 8008278); |
No comments:
Post a Comment