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 |
---|---|
System.Collections.Generic.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);