EnumExtensionsHasFlagAnyT Method
Determines whether the source Enum contains any of the specified flags.
Namespace: DevCase.Extensions.EnumExtensionsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[EditorBrowsableAttribute(EditorBrowsableState.Always)]
public static bool HasFlagAny<T>(
this Enum sender,
T[] flags
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function HasFlagAny(Of T) (
sender As Enum,
flags As T()
) As Boolean
Dim sender As Enum
Dim flags As T()
Dim returnValue As Boolean
returnValue = sender.HasFlagAny(flags)
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
generic<typename T>
static bool HasFlagAny(
Enum^ sender,
array<T>^ flags
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member HasFlagAny :
sender : Enum *
flags : 'T[] -> bool
No code example is currently available or this language may not be supported.
- sender Enum
-
The source Enum.
- flags T
-
The flags to check.
- T
-
The type.
Boolean if the source
Enum contains any of the specified flags;
otherwise,
.
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).
This is a code example.
No code example is currently available or this language may not be supported.
Dim hwnd As IntPtr = Process.GetProcessesByName("notepad").FirstOrDefault().MainWindowHandle
Dim windowInfo As New WindowInfo(hwnd)
Dim windowState As NativeWindowState = windowInfo.WindowPlacement.WindowState
Dim isMinimized As Boolean = windowState.HasFlagAny({NativeWindowState.Minimize,
NativeWindowState.ForceMinimize,
NativeWindowState.ShowMinimized,
NativeWindowState.ShowMinNoActive})
Console.WriteLine($"isMinimized: {isMinimized}")
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.