See Also: Pair Members
The System.Web.UI.Pair class is used as a basic structure to store two related objects. It is a utility class that is used in various ways throughout ASP.NET, such as during page state management tasks or in configuration section handlers. You can use the System.Web.UI.Pair class in your own code anywhere that you need a structure to contain two related objects and where data hiding is not essential. The System.Web.UI.Pair class does not encapsulate its object references, Pair.First and Pair.Second, in properties; it exposes them directly to all calling code as public class fields.
The System.Web.UI.Pair class can be used in several ways in page state persistence implementations. The most common use is as a container for both the Control.ViewState and PageStatePersister.ControlState collections. In this case, the Pair.First property is used for Control.ViewState, and the Pair.Second for PageStatePersister.ControlState.