Clear<TKey, TValue>()
Creates a new IncrementalKeyedCollection<TKey, TValue> that represents the operation of clearing all items from the collection.
Declaration
public static IncrementalKeyedCollection<TKey, TValue> Clear<TKey, TValue>() where TKey : notnull where TValue : class, IIncrementalKeyedCollectionItem<TKey>Returns
| Type | Description |
|---|---|
| IncrementalKeyedCollection<TKey, TValue> | An IncrementalKeyedCollection<TKey, TValue> that, when merged, clears all previous items from the collection. |
Type Parameters
| Name | Description |
|---|---|
| TKey | The type of keys in the collection. |
| TValue | The type of values in the collection. |
Remarks
This operation discards all items from previous layers. It is useful when you want to start with an empty collection at a specific configuration level, ignoring all inherited items.