EnumExtensionsAllFlagsDefined(Enum) Method

Gets whether every single bit value in flags are defined in the enum type of flags, or when flags is zero, it is checked whether zero is defined in the enum type of flags.

Definition

Namespace: KGySoft.CoreLibraries
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0
C#
public static bool AllFlagsDefined(
	this Enum? flags
)

Parameters

flags  Enum
The enum value.

Return Value

Boolean
true, if flags is a zero value and zero is defined, or if flags is nonzero and its every bit has a defined name.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Enum. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Remarks

  Note

For better performance use the generic AllFlagsDefined overload whenever it is possible.

See Also