Method Difference
Difference(String)
Returns the difference of current set with the specified set.
Declaration
IEnumerable<T> Difference(string other)
Parameters
Type | Name | Description |
---|---|---|
System.String | other | Name of set to compare with. |
Returns
Type | Description |
---|---|
IEnumerable<T> | Difference of current set with the specified set. |
Examples
The following code sample shows how to get difference of a set with another set.
ICache cache = CacheManager.GetCache("demoClusteredCache");
string MondayUsersKey = "MondayUsers";
string TuesdayUsersKey = "TuesdayUsers";
IDistributedHashSet<int> set = cache.DataTypeManager.GetHashSet<int>(TuesdayUsersKey);
// Set of MondayUsers already exists in cache.
IEnumerable<int> result = set.Difference(MondayUsers);