Skip to content

GetFriendlyName Method ​

Definition ​

  • Namespace: JASE.Extensions
  • Assembly: JASE.Primitives.dll

string GetFriendlyName(MemberInfo member) ​

csharp
string GetFriendlyName(MemberInfo member)

Retrieves a user-friendly name for the specified enum member.

Parameters ​

NameDescription
memberThe MemberInfo representing an enum field.

Returns ​

The value of the TextAttribute if defined, otherwise the value of the DescriptionAttribute if present, or the member's name as a fallback.

Remarks ​

This method is intended to provide a display label for enum values, prioritizing custom attributes commonly used for UI display.