EnumTEnumHasFlag(TEnum, TEnum) 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: 8.1.0
C#
public static bool HasFlag(
	TEnum value,
	TEnum flags
)

Parameters

value  TEnum
An enumeration value of TEnum type.
flags  TEnum
A flags enum 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