EnumTEnumGetDefinedOrDefault(UInt64, TEnum) Method
Returns the TEnum value associated with value if it is defined in the enumeration;
otherwise, returns defaultValue, even if it is undefined.
Namespace: KGySoft.CoreLibrariesAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0-preview.1
[CLSCompliantAttribute(false)]
public static TEnum GetDefinedOrDefault(
ulong value,
TEnum defaultValue = null
)
<CLSCompliantAttribute(false)>
Public Shared Function GetDefinedOrDefault (
value As ULong,
Optional defaultValue As TEnum = Nothing
) As TEnum
public:
[CLSCompliantAttribute(false)]
static TEnum GetDefinedOrDefault(
unsigned long long value,
TEnum defaultValue = nullptr
)
[<CLSCompliantAttribute(false)>]
static member GetDefinedOrDefault :
value : uint64 *
?defaultValue : 'TEnum
(* Defaults:
let _defaultValue = defaultArg defaultValue null
*)
-> 'TEnum
- value UInt64
- A numeric value representing a field value in the enumeration.
- defaultValue TEnum (Optional)
- A TEnum value to return if value
is not defined in TEnum. It does not needed to be a defined value. This parameter is optional.
Default value: The bitwise zero value of TEnum.
TEnumThe
TEnum value associated with
value if it is defined in
TEnum;
otherwise,
defaultValue, even if it is undefined.