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.
Namespace: KGySoft.CoreLibrariesAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0
public static bool AllFlagsDefined(
this Enum? flags
)
<ExtensionAttribute>
Public Shared Function AllFlagsDefined (
flags As Enum
) As Boolean
public:
[ExtensionAttribute]
static bool AllFlagsDefined(
Enum^ flags
)
[<ExtensionAttribute>]
static member AllFlagsDefined :
flags : Enum -> bool
- flags Enum
- The enum value.
Booleantrue, if
flags is a zero value and zero is defined,
or if
flags is nonzero and its every bit has a defined name.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).
For better performance use the generic
AllFlagsDefined overload whenever it is possible.