Properties.TryAddToMultiple Method
Definition
Tries to add a value to a multiple valued property with the specified key. If the value already exists in the multiple then it is not added.
public bool TryAddToMultiple<T>(string key, T value, IEqualityComparer<T>? valueComparer = null);
Type Parameters
| Name | Description |
|---|---|
T |
The type of the property. |
Parameters
| Name | Type | Description |
|---|---|---|
key |
String |
The key of the property. |
value |
T |
The value to add to the property. |
valueComparer |
IEqualityComparer<T> |
An equality comparer to compare values or null for the default comparer. |
Returns
true if the value was added, false otherwise.