System.Web.UI


.NET Framework Class Library
Pair Class

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

Namespace: System.Web.UI
Assembly: System.Web (in system.web.dll)

Syntax

Visual Basic (Declaration)
<SerializableAttribute> _
Public NotInheritable Class Pair
Visual Basic (Usage)
Dim instance As Pair
C#
[SerializableAttribute] 
public sealed class Pair
C++
[SerializableAttribute] 
public ref class Pair sealed
J#
/** @attribute SerializableAttribute() */ 
public final class Pair
JScript
SerializableAttribute 
public final class Pair
Remarks

The 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 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 Pair class does not encapsulate its object references, First and Second, in properties; it exposes them directly to all calling code as public class fields.

The Pair class can be used in several ways in page state persistence implementations. The most common use is as a container for both the ViewState and ControlState collections. In this case, the First property is used for ViewState, and the Second for ControlState.

.NET Framework Security

Inheritance Hierarchy

System.Object
  System.Web.UI.Pair
Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

Version Information

.NET Framework

Supported in: 2.0, 1.1, 1.0
See Also

Tags :


Page view tracker