I\'m interested: What is C#\'s analog of std::pair in C++? I found System.Web.UI.Pair class, but I\'d prefer something template-based.
std::pair
System.Web.UI.Pair
Than
Unfortunately, there is none. You can use the System.Collections.Generic.KeyValuePair in many situations.
System.Collections.Generic.KeyValuePair
Alternatively, you can use anonymous types to handle tuples, at least locally:
var x = new { First = "x", Second = 42 };
The last alternative is to create an own class.