Method Remove
Remove(ICollection<T>)
Remove the specified items from the Set.
Declaration
int Remove(ICollection<T> items)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.ICollection<T> | items | Items to remove from the Set. |
Returns
Type | Description |
---|---|
System.Int32 | The number of members that were removed from the Set. |
Examples
The following code sample shows how to remove specified element from Distributed Set.
ICache cache = CacheManager.GetCache("demoClusteredCache");
string dataTypeName = "DistributedSet";
IDistributedHashSet<int> set = cache.DataTypeManager.GetHashSet<int>(dataTypeName);
// Creating ID to remove from set.
ICollection<int> ids = GetExpiredIDs();
int count = set.Remove(ids);