Struct KVPair<TKey, TValue>
A key-value pair.
Namespace: Unity.Collections
Syntax
public struct KVPair<TKey, TValue>
where TKey : struct, IEquatable<TKey> where TValue : struct
Type Parameters
Name | Description |
---|---|
TKey | The type of the keys. |
TValue | The type of the values. |
Remarks
Used for enumerators.
Constructors
KVPair(TKey, TValue)
Initializes a new instance of the KeyValuePair<TKey,TValue> structure with the specified key and value.
Declaration
public KVPair(TKey key, TValue value)
Parameters
Type | Name | Description |
---|---|---|
TKey | key | The key. |
TValue | value | Value of key/value pair. |
Fields
Key
The key.
Declaration
public TKey Key
Field Value
Type | Description |
---|---|
TKey | The key. If this KeyValue is Null, returns the default of TKey. |
Value
Value of key/value pair.
Declaration
public TValue Value
Field Value
Type | Description |
---|---|
TValue |