EnumExtensionsAllFlagsDefinedTEnum(TEnum) Method
Gets whether every single bit value in flags are defined in the TEnum type,
or, when flags is zero, it is checked whether zero is defined in TEnum.
Namespace: KGySoft.CoreLibrariesAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 9.0.0
public static bool AllFlagsDefined<TEnum>(
this TEnum flags
)
where TEnum : struct, new()
<ExtensionAttribute>
Public Shared Function AllFlagsDefined(Of TEnum As {Structure, New}) (
flags As TEnum
) As Boolean
public:
[ExtensionAttribute]
generic<typename TEnum>
where TEnum : value class, gcnew()
static bool AllFlagsDefined(
TEnum flags
)
[<ExtensionAttribute>]
static member AllFlagsDefined :
flags : 'TEnum -> bool when 'TEnum : struct, new()
- flags TEnum
- A flags enum value, whose flags should be checked. It is not checked whether TEnum
is really marked by FlagsAttribute.
- TEnum
- The type of the enum flags.
Boolean, 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
TEnum. 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).