C# HashSet CreateSetComparer
Description
HashSet
returns an IEqualityComparer
object that can be used for equality testing of a HashSet
Syntax
HashSet.CreateSetComparer
has the following syntax.
public static IEqualityComparer<HashSet<T>> CreateSetComparer()
Example
Returns an IEqualityComparer object that can be used for equality testing of a HashSet object.
/*from ww w. j a v a 2 s.c om*/
using System;
using System.Collections.Generic;
public class MainClass
{
public static void Main(String[] argv){
IEqualityComparer<HashSet<int>> c = HashSet<int>.CreateSetComparer();
}
}