Properties.Set Method
Overloads
Name | Description |
---|---|
Sets the value of a single valued property with the specified key. | |
Sets the value of a single valued property with the specified key. Uses a field to cache the value for better performance. | |
Sets the value of a single valued property with the specified key. Uses a field to cache the value for better performance. |
Set<T>(String, T)
Sets the value of a single valued property with the specified key.
Type Parameters
Name | Description |
---|---|
T | The type of the property. |
Parameters
Name | Type | Description |
---|---|---|
key | The key of the property. | |
value | T | The value of the property. |
Set<T>(String, T, T)
Sets the value of a single valued property with the specified key. Uses a field to cache the value for better performance.
Type Parameters
Name | Description |
---|---|
T | The type of the property. |
Parameters
Name | Type | Description |
---|---|---|
key | The key of the property. | |
value | T | The value of the property. |
cached | T | The key of the property. |
Remarks
Properties are stored in a dictionary which might not have enough performance in some situations. Use this overload to get higher performance as the value will be stored in the field if it exists. Make sure to use GetOrThrow<T>(String, T) to retrieve the cached field.
Set<T>(String, T, T?)
Sets the value of a single valued property with the specified key. Uses a field to cache the value for better performance.
Type Parameters
Name | Description |
---|---|
T | The type of the property. |
Parameters
Remarks
Properties are stored in a dictionary which might not have enough performance in some situations. Use this overload to get higher performance as the value will be stored in the field if it exists. Make sure to use GetOrThrow<T>(String, T) to retrieve the cached field.