EnumTEnumParse(ReadOnlySpanChar, Boolean) Method

Converts the string representation of the name or numeric value of one or more enumerated values to an equivalent enumerated object.

Definition

Namespace: KGySoft.CoreLibraries
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.1.0
C#
public static TEnum Parse(
	ReadOnlySpan<char> value,
	bool ignoreCase
)

Parameters

value  ReadOnlySpanChar
The string representation of the enumerated value or values to parse.
ignoreCase  Boolean
If , ignores case; otherwise, regards case.

Return Value

TEnum
The parsed enum value.

Exceptions

ArgumentExceptionvalue cannot be parsed as TEnum.

See Also