Returns a set of the elements in the specified sequence.
public static ISet<T> AsSet<T>(this IEnumerable<T> source)
| parameter | description | 
|---|---|
| T | The type of element in the source sequence. | 
| source | The sequence. | 
A set of elements.
Unlike the ToHashSet method, if the original IEnumerable is an ISet{T} it will be returned as such (rather than copying to a new HashSet).