System.Web.UI
contained the Pair
class because it was used heavily in ASP.NET 1.1 as an internal ViewState structure.
Update Aug 2017: C# 7.0 / .NET Framework 4.7 provides a syntax to declare a Tuple with named items using the System.ValueTuple
struct.
//explicit Item typing
(string Message, int SomeNumber) t = ("Hello", 4);
//or using implicit typing
var t = (Message:"Hello", SomeNumber:4);
Console.WriteLine("{0} {1}", t.Message, t.SomeNumber);
see MSDN for more syntax examples.
Update Jun 2012: Tuples
have been a part of .NET since version 4.0.
Here is an earlier article describing inclusion in.NET4.0 and support for generics:
Tuple<string, int> t = new Tuple<string, int>("Hello", 4);