Skip to content

Instantly share code, notes, and snippets.

@shahriarhossain
Last active August 30, 2016 12:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shahriarhossain/ba699cf224842617f82c3919d2b8727f to your computer and use it in GitHub Desktop.
Save shahriarhossain/ba699cf224842617f82c3919d2b8727f to your computer and use it in GitHub Desktop.
Creating Tuple in C#
public static Tuple<string, string, int> OldWay_UserInfo()
{
string firstName = "Shahriar";
string lastName = "Hossain";
int yearsOfExpertise = 4;
Tuple<string, string, int> userInfo = new Tuple<string, string, int>(firstName, lastName, yearsOfExpertise);
//or
//var userInfo = Tuple.Create(firstName, lastName, yearsOfExpertise);
return userInfo;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment