Pair Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides a basic utility class that is used to store two related objects.
public ref class Pair
public ref class Pair sealed
public class Pair
[System.Serializable]
public sealed class Pair
type Pair = class
[<System.Serializable>]
type Pair = class
Public Class Pair
Public NotInheritable Class Pair
- Inheritance
-
Pair
- Attributes
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.
Constructors
Pair() |
Creates a new, uninitialized instance of the Pair class. |
Pair(Object, Object) |
Initializes a new instance of the Pair class, using the specified object pair. |
Fields
First |
Gets or sets the first object of the object pair. |
Second |
Gets or sets the second object of the object pair. |
Methods
Equals(Object) |
Determines whether the specified object is equal to the current object. (Inherited from Object) |
GetHashCode() |
Serves as the default hash function. (Inherited from Object) |
GetType() |
Gets the Type of the current instance. (Inherited from Object) |
MemberwiseClone() |
Creates a shallow copy of the current Object. (Inherited from Object) |
ToString() |
Returns a string that represents the current object. (Inherited from Object) |
Applies to
See also
Σχόλια
https://aka.ms/ContentUserFeedback.
Σύντομα διαθέσιμα: Καθ' όλη τη διάρκεια του 2024 θα καταργήσουμε σταδιακά τα ζητήματα GitHub ως μηχανισμό ανάδρασης για το περιεχόμενο και θα το αντικαταστήσουμε με ένα νέο σύστημα ανάδρασης. Για περισσότερες πληροφορίες, ανατρέξτε στο θέμα:Υποβολή και προβολή σχολίων για