GenericPair<TValue1,TValue2> Class

Definition

Describes an object that wraps a pair of values.

generic <typename TValue1, typename TValue2>
public ref class GenericPair
public class GenericPair<TValue1,TValue2>
type GenericPair<'TValue1, 'TValue2> = class
Public Class GenericPair(Of TValue1, TValue2)

Type Parameters

TValue1

Type of the first value in the pair.

TValue2

Type of the second value in the pair.

Inheritance
GenericPair<TValue1,TValue2>

Remarks

For more information, see pair (STL/CLR).

Constructors

GenericPair<TValue1,TValue2>()

Constructs a new GenericPair<TValue1,TValue2> object with default values for first and second.

GenericPair<TValue1,TValue2>(GenericPair<TValue1,TValue2>)

Constructs a new GenericPair<TValue1,TValue2> object from an existing GenericPair<TValue1,TValue2> object.

GenericPair<TValue1,TValue2>(KeyValuePair<TValue1,TValue2>)

Constructs a new GenericPair<TValue1,TValue2> object from an existing KeyValuePair<TKey,TValue> object.

GenericPair<TValue1,TValue2>(TValue1)

Constructs a new GenericPair<TValue1,TValue2> object and assigns its first value to the specified value.

GenericPair<TValue1,TValue2>(TValue1, TValue2)

Constructs a new GenericPair<TValue1,TValue2> object with the two values specified.

Fields

first

The first wrapped value of the GenericPair<TValue1,TValue2> object.

second

The second wrapped value of the GenericPair<TValue1,TValue2> object.

Methods

Equals(Object)

Determines if two GenericPair<TValue1,TValue2> objects are equal.

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)
swap(GenericPair<TValue1,TValue2>)

Swaps the contents of two GenericPair<TValue1,TValue2> objects.

ToString()

Returns a string that represents the current object.

(Inherited from Object)

Operators

Assign(GenericPair<TValue1,TValue2>)

Replaces the stored pair of values in the GenericPair<TValue1,TValue2> object.

Applies to