• Webinars
  • Docs
  • Download
  • Blogs
  • Contact Us
Try Free
Show / Hide Table of Contents

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
System.Collections.Generic.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("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.Union(MondayUsers);
Back to top Copyright © 2017 Alachisoft