SortedSet<T> Constructor (IComparer<T>^)
.NET Framework (current version)
Initializes a new instance of the SortedSet<T> class that uses a specified comparer.
Assembly: System (in System.dll)
| Exception | Condition |
|---|---|
| ArgumentNullException | comparer is null. |
If comparer does not implement IComparable<T>, you must specify an IComparer<T> object to be used.
The following example defines a comparer (ByFileExtension) that is used to construct a sorted set that sorts file names by their extensions. This code example is part of a larger example provided for the SortedSet<T> class.
Universal Windows Platform
Available since 8
.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Windows Phone Silverlight
Available since 8.0
Windows Phone
Available since 8.1
Available since 8
.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Windows Phone Silverlight
Available since 8.0
Windows Phone
Available since 8.1
Show: