Table of Contents

Class EnumUtils

Namespace
adas_core.Domain.Utils
Assembly
adas-core.Domain.dll

Provides static utility methods for working with Enum types.

public static class EnumUtils
Inheritance
EnumUtils
Inherited Members

Methods

GetDescription(Enum)

Retrieves the human-readable description for an enumeration value by inspecting its DescriptionAttribute. Falls back to the enum's string representation when no description attribute is defined on the member.

public static string GetDescription(Enum value)

Parameters

value Enum

The enumeration value whose description should be obtained.

Returns

string

The description text from the DescriptionAttribute if present; otherwise, the string representation of the enum value.