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

Method StoreDifference

StoreDifference(String, String)

Take difference of current set with the specified set and store the result in a new destination set.

Declaration
IDistributedHashSet<T> StoreDifference(string destination, string other)
Parameters
Type Name Description
System.String destination

Name of destination set.

System.String other

Name of set to compare with.

Returns
Type Description
IDistributedHashSet<T>

Interface of destination set handler.

Examples

The following code sample shows how to get difference of a set with another set and store the result in cache.

 ICache cache = CacheManager.GetCache("demoCache");

string MondayUsersKey = "MondayUsers";
string TuesdayUsersKey = "TuesdayUsers";

IDistributedHashSet<int> set = cache.DataTypeManager.GetHashSet<int>(TuesdayUsersKey);

string differenceSet = "DifferenceSet";

// Set of MondayUsers already exists in cache.
IDistributedHashSet<int> result = set.StoreDifference(differenceSet, MondayUsersKey);
Back to top Copyright © 2017 Alachisoft