Class EnumExtensions
Inheritance
System.Object
EnumExtensions
Namespace: Steeltoe.Common.CasingConventions
Assembly: Steeltoe.Common.dll
Syntax
public static class EnumExtensions : object
Methods
| Edit this page View SourceToSnakeCaseString<TEnum>(TEnum, SnakeCaseStyle)
Converts a pascal-cased enum member to its snake-case string representation.
Declaration
public static string ToSnakeCaseString<TEnum>(this TEnum value, SnakeCaseStyle style)
where TEnum : struct, Enum
Parameters
Type | Name | Description |
---|---|---|
TEnum | value | The enumeration member to convert. |
SnakeCaseStyle | style | The output style. |
Returns
Type | Description |
---|---|
System.String |
Type Parameters
Name | Description |
---|---|
TEnum | The enumeration type. |