EnumTEnumHasFlag(TEnum, UInt64) Method

Gets whether the bits that are set in the flags parameter are set in the specified value.

Definition

Namespace: KGySoft.CoreLibraries
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0-preview.1
C#
[CLSCompliantAttribute(false)]
public static bool HasFlag(
	TEnum value,
	ulong flags
)

Parameters

value  TEnum
An enumeration value of TEnum type.
flags  UInt64
An unsigned integer value, whose flags should be checked. It is not checked whether TEnum is really marked by FlagsAttribute and whether all bits that are set are defined in the TEnum type.

Return Value

Boolean
, if flags is zero, or when the bits that are set in flags are set in value; otherwise, .

See Also