EnumTEnumTryParse(ReadOnlySpanChar, TEnum) Method
Tries to convert the string representation of the name or numeric value of one or more enumerated values to an equivalent enumerated object.
In case of success the return value is and parsed enum is returned in result parameter.
Namespace: KGySoft.CoreLibrariesAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0-preview.1
public static bool TryParse(
ReadOnlySpan<char> value,
out TEnum result
)
Public Shared Function TryParse (
value As ReadOnlySpan(Of Char),
<OutAttribute> ByRef result As TEnum
) As Boolean
public:
static bool TryParse(
ReadOnlySpan<wchar_t> value,
[OutAttribute] TEnum% result
)
static member TryParse :
value : ReadOnlySpan<char> *
result : 'TEnum byref -> bool
- value ReadOnlySpanChar
- The string representation of the enumerated value or values to parse.
- result TEnum
- Returns the default value of TEnum, if return value is ; otherwise, the parsed enum value.
Boolean if the
ReadOnlySpan<char> in
value parameter cannot be parsed as
TEnum; otherwise,
.