GenericPair<TValue1,TValue2> 构造函数

定义

构造新的 GenericPair<TValue1,TValue2> 对象。Constructs a new GenericPair<TValue1,TValue2> object.

重载

GenericPair<TValue1,TValue2>()

使用 GenericPair<TValue1,TValue2>first 的默认值构造一个新的 second 对象。Constructs a new GenericPair<TValue1,TValue2> object with default values for first and second.

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

从现有 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>)

从现有 GenericPair<TValue1,TValue2> 对象构造新的 KeyValuePair<TKey,TValue> 对象。Constructs a new GenericPair<TValue1,TValue2> object from an existing KeyValuePair<TKey,TValue> object.

GenericPair<TValue1,TValue2>(TValue1)

构造一个新 GenericPair<TValue1,TValue2> 对象并将其第一个值分配给指定值。Constructs a new GenericPair<TValue1,TValue2> object and assigns its first value to the specified value.

GenericPair<TValue1,TValue2>(TValue1, TValue2)

用两个指定值构造一个新 GenericPair<TValue1,TValue2> 对象。Constructs a new GenericPair<TValue1,TValue2> object with the two values specified.

注解

有关详细信息,请参阅 "将 空气 (STL/CLR) :p For more information, see pair::pair (STL/CLR).

GenericPair<TValue1,TValue2>()

使用 GenericPair<TValue1,TValue2>first 的默认值构造一个新的 second 对象。Constructs a new GenericPair<TValue1,TValue2> object with default values for first and second.

public:
 GenericPair();
public GenericPair ();
Public Sub New ()

注解

有关详细信息,请参阅 "将 空气 (STL/CLR) :p For more information, see pair::pair (STL/CLR).

适用于

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

从现有 GenericPair<TValue1,TValue2> 对象构造新的 GenericPair<TValue1,TValue2> 对象。Constructs a new GenericPair<TValue1,TValue2> object from an existing GenericPair<TValue1,TValue2> object.

public:
 GenericPair(Microsoft::VisualC::StlClr::GenericPair<TValue1, TValue2> ^ _Right);
public GenericPair (Microsoft.VisualC.StlClr.GenericPair<TValue1,TValue2> _Right);
new Microsoft.VisualC.StlClr.GenericPair<'TValue1, 'TValue2> : Microsoft.VisualC.StlClr.GenericPair<'TValue1, 'TValue2> -> Microsoft.VisualC.StlClr.GenericPair<'TValue1, 'TValue2>
Public Sub New (_Right As GenericPair(Of TValue1, TValue2))

参数

_Right
GenericPair<TValue1,TValue2>

要复制到新 GenericPair<TValue1,TValue2> 对象中的 GenericPair<TValue1,TValue2> 对象。The GenericPair<TValue1,TValue2> object to be copied into the new GenericPair<TValue1,TValue2> object.

适用于

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

从现有 GenericPair<TValue1,TValue2> 对象构造新的 KeyValuePair<TKey,TValue> 对象。Constructs a new GenericPair<TValue1,TValue2> object from an existing KeyValuePair<TKey,TValue> object.

public:
 GenericPair(System::Collections::Generic::KeyValuePair<TValue1, TValue2> % _Right);
public GenericPair (ref System.Collections.Generic.KeyValuePair<TValue1,TValue2> _Right);
new Microsoft.VisualC.StlClr.GenericPair<'TValue1, 'TValue2> : KeyValuePair -> Microsoft.VisualC.StlClr.GenericPair<'TValue1, 'TValue2>
Public Sub New (ByRef _Right As KeyValuePair(Of TValue1, TValue2))

参数

_Right
KeyValuePair<TValue1,TValue2>

要复制到新 KeyValuePair<TKey,TValue> 对象中的 GenericPair<TValue1,TValue2> 对象。The KeyValuePair<TKey,TValue> object to be copied into the new GenericPair<TValue1,TValue2> object.

注解

有关详细信息,请参阅 "将 空气 (STL/CLR) :p For more information, see pair::pair (STL/CLR).

适用于

GenericPair<TValue1,TValue2>(TValue1)

构造一个新 GenericPair<TValue1,TValue2> 对象并将其第一个值分配给指定值。Constructs a new GenericPair<TValue1,TValue2> object and assigns its first value to the specified value.

public:
 GenericPair(TValue1 _Val1);
public GenericPair (TValue1 _Val1);
new Microsoft.VisualC.StlClr.GenericPair<'TValue1, 'TValue2> : 'TValue1 -> Microsoft.VisualC.StlClr.GenericPair<'TValue1, 'TValue2>
Public Sub New (_Val1 As TValue1)

参数

_Val1
TValue1

要存储在 first 中的值。The value to store in first. 将为 second 值分配适合其类型的默认值。The second value is assigned the default value for its type.

注解

有关详细信息,请参阅 "将 空气 (STL/CLR) :p For more information, see pair::pair (STL/CLR).

适用于

GenericPair<TValue1,TValue2>(TValue1, TValue2)

用两个指定值构造一个新 GenericPair<TValue1,TValue2> 对象。Constructs a new GenericPair<TValue1,TValue2> object with the two values specified.

public:
 GenericPair(TValue1 _Val1, TValue2 _Val2);
public GenericPair (TValue1 _Val1, TValue2 _Val2);
new Microsoft.VisualC.StlClr.GenericPair<'TValue1, 'TValue2> : 'TValue1 * 'TValue2 -> Microsoft.VisualC.StlClr.GenericPair<'TValue1, 'TValue2>
Public Sub New (_Val1 As TValue1, _Val2 As TValue2)

参数

_Val1
TValue1

要存储在 first 中的值。The value to store in first.

_Val2
TValue2

要存储在 second 中的值。The value to store in second.

注解

有关详细信息,请参阅 "将 空气 (STL/CLR) :p For more information, see pair::pair (STL/CLR).

适用于