Method Union
Union(String)
Returns the union of current set with the specified set.
Declaration
IEnumerable<T> Union(string other)
Parameters
Type | Name | Description |
---|---|---|
System.String | other | Name of set to compare with. |
Returns
Type | Description |
---|---|
IEnumerable<T> | Union of current set with the specified set. |
Examples
The following code sample shows how to get union of a set with another set.
ICache cache = CacheManager.GetCache("myCache");
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.Union(MondayUsers);