Click or drag to resize

RankedMapTKey, TValueRemove Method (TKey, Int32)

Removes a supplied number of elements with the supplied key from the map.

Namespace:  Kaos.Collections
Assembly:  KaosCollections (in KaosCollections.dll) Version: 4.2.0.0
Syntax
C#
public int Remove(
	TKey key,
	int count
)

Parameters

key
Type: TKey
The key of the elements to remove.
count
Type: SystemInt32
The number of elements to remove.

Return Value

Type: Int32
The number of elements actually removed.
Exceptions
ExceptionCondition
ArgumentExceptionWhen count is less than zero.
Examples
The below snippet is part of a larger example of the RankedMapTKey, TValueclass.
C#
Console.WriteLine ("\nRemove all sln format occurrences...");
int removed = fmt.Remove ("sln", Int32.MaxValue);
Console.WriteLine ($"Items removed: {removed}");
See Also