System.Web.UI.Pair Class

Provides a basic utility class that is used to store two related objects.

See Also: Pair Members

Syntax

public sealed class Pair

Remarks

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.

Requirements

Namespace: System.Web.UI
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0