Method Remove
Remove(ICollection<T>)
Remove the specified items from the set.
Declaration
int Remove(ICollection<T> items)
Parameters
Type | Name | Description |
---|---|---|
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("myCache");
string dataTypeName = "DistributedSet";
IDistributedHashSet<int> set = cache.DataTypeManager.GetHashSet>int>(dataTypeName);
//Creating ID to remove from set.
int Id = GetExpiredID();
int count = set.Remove(Id);