Archive

Archive for December, 2011

Tuple in .net 4.0

In .net 4.0 we have a new datatype… the Tuple… if you are familiar with software engineer, you know the idea behind it… to have a strongly typed datastructure that cannot be changed during the time…

// Instantiate using constructor 
Tuple<int, string, int> t1 = new Tuple<int, string, int>(4, "Stelio", 7);

// Instantiate using create method 
Tuple<int, int, int> t2 = Tuple.Create(2, 7, 9);
Advertisements
Categories: DEV Tags: