Summary
If `collection` doesn't already contain `value`, this method adds it and returns true.
- Assembly
- Weaver
.dll - Namespace
- Weaver
- Containing Type
- WeaverUtilities
Syntax
public static bool AddIfNew<T>(this ICollection<T> collection, T value)
Type Parameters
| Name | Description |
|---|---|
| T |
Parameters
| Name | Type | Description |
|---|---|---|
| collection | ICollection |
|
| value | T |
Return Value
| Type | Description |
|---|---|
| bool |