Struct SerializableKeyValuePair<K, V>
A serializable key-value pair structure compatible with Unity's serialization system.
[Serializable]
public struct SerializableKeyValuePair<K, V>
Type Parameters
| Name | Type | Description |
|---|---|---|
K | The type of the key. | |
V | The type of the value. |
Constructors
SerializableKeyValuePair(K, V)
Constructs a new SerializableKeyValuePair with the specified key and value.
public SerializableKeyValuePair(K key, V value)
Parameters
| Name | Type | Description |
|---|---|---|
key | K | The key to assign. |
value | V | The value to assign. |
Fields
Operators
implicit operator SerializableKeyValuePair<K, V>(KeyValuePair<K, V>)
Implicit conversion from a standard KeyValuePair to a SerializableKeyValuePair.
public static implicit operator SerializableKeyValuePair<K, V>(KeyValuePair<K, V> kvp)
Parameters
| Name | Type | Description |
|---|---|---|
kvp | KeyValuePair<K, V> | The key-value pair to convert. |
Returns
implicit operator KeyValuePair<K, V>(SerializableKeyValuePair<K, V>)
Implicit conversion from a SerializableKeyValuePair to a standard KeyValuePair.
public static implicit operator KeyValuePair<K, V>(SerializableKeyValuePair<K, V> kvp)
Parameters
| Name | Type | Description |
|---|---|---|
kvp | SerializableKeyValuePair<K, V> | The serializable key-value pair to convert. |