Home > DEV > Tuple in .net 4.0

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:
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: