Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

EnumConverter.Comparer Property


Gets an IComparer that can be used to sort the values of the enumeration.

Namespace:   System.ComponentModel
Assembly:  System (in System.dll)

protected virtual IComparer Comparer { get; }

Property Value

Type: System.Collections.IComparer

An IComparer for sorting the enumeration values.

By default, the enumeration values are sorted in the order they appear in the file.

Notes to Inheritors:

If you want to sort the values into a different order, override this property.

.NET Framework
Available since 1.1
Return to top
© 2017 Microsoft