Struct SerKeyValPair<T, U>
- Namespace
- ElectricDrill.SoapRpgFramework.Utils
- Assembly
- com.electricdrill.soap-rpg-framework.Runtime.dll
A serializable key-value pair structure that can be used in Unity's inspector. Provides implicit conversion to and from the standard KeyValuePair.
[Serializable]
public struct SerKeyValPair<T, U>
Type Parameters
TThe type of the key.
UThe type of the value.
Constructors
SerKeyValPair(T, U)
Initializes a new instance of the SerKeyValPair structure with the specified key and value.
public SerKeyValPair(T key, U value)
Parameters
keyTThe key of the key-value pair.
valueUThe value of the key-value pair.
Fields
Key
The key of the key-value pair.
public T Key
Field Value
- T
Value
The value of the key-value pair.
public U Value
Field Value
- U
Operators
implicit operator KeyValuePair<T, U>(SerKeyValPair<T, U>)
Implicitly converts a SerKeyValPair to a KeyValuePair.
public static implicit operator KeyValuePair<T, U>(SerKeyValPair<T, U> serKeyValPair)
Parameters
serKeyValPairSerKeyValPair<T, U>The SerKeyValPair to convert.
Returns
- KeyValuePair<T, U>
A KeyValuePair with the same key and value.
implicit operator SerKeyValPair<T, U>(KeyValuePair<T, U>)
Implicitly converts a KeyValuePair to a SerKeyValPair.
public static implicit operator SerKeyValPair<T, U>(KeyValuePair<T, U> keyValuePair)
Parameters
keyValuePairKeyValuePair<T, U>The KeyValuePair to convert.
Returns
- SerKeyValPair<T, U>
A SerKeyValPair with the same key and value.