Table of Contents

Class EnumUtils

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

Contains static methods and properties related to enums.

public static class EnumUtils
Inheritance
EnumUtils

Methods

Convert(ModalResult)

Converts ModalResult to DialogResult.

GetEnumItemsAsListItems(Type?, Func<object?, string?>?, Func<object?, bool>?)

Converts the values of a specified enumeration type into a collection of ListControlItem objects.

GetMaxValueUseLastAsInt<T>()

Gets maximum value of the enum as integer using last enum element.

GetMaxValueUseLastOrDefault<T>(T?)

Returns maxValue if it's specified; otherwise uses GetMaxValueUseLastAsInt<T>() in order to obtain the result.

GetMaxValueUseLast<T>()

Gets maximum value of the enum using last enum element.

GetMaxValueUseMaxAsInt<T>()

Gets maximum value of the enum as integer using max enum element.

GetMaxValueUseMax<T>()

Gets maximum value of the enum using max enum element.

IsMaxValueUseLast<T>(T)

Gets whether the specified enum value is the largest. This method uses last enum element to gets maximum value of the enum.