EnumExtensionsToStringTEnum(TEnum, String) Method
Returns the
String representation of the given enum
value.
Namespace: KGySoft.CoreLibrariesAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0
public static string ToString<TEnum>(
this TEnum value,
string? separator
)
where TEnum : struct, new()
<ExtensionAttribute>
Public Shared Function ToString(Of TEnum As {Structure, New}) (
value As TEnum,
separator As String
) As String
public:
[ExtensionAttribute]
generic<typename TEnum>
where TEnum : value class, gcnew()
static String^ ToString(
TEnum value,
String^ separator
)
[<ExtensionAttribute>]
static member ToString :
value : 'TEnum *
separator : string -> string when 'TEnum : struct, new()
- value TEnum
- An value that has to be converted to String.
- separator String
- Separator in case of flags formatting. If or is empty, then comma-space (", ") separator is used.
- TEnum
- The type of the enum value.
StringThe string representation of
value.In Visual Basic and C#, you can call this method as an instance method on any object of type
TEnum. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).