EnumExtensionsFlagsT Method
Gets the current flags of the source enumeration.
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 T[] Flags<T>(
this Enum sender
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function Flags(Of T) (
sender As Enum
) As T()
Dim sender As Enum
Dim returnValue As T()
returnValue = sender.Flags()
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
generic<typename T>
static array<T>^ Flags(
Enum^ sender
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member Flags :
sender : Enum -> 'T[]
No code example is currently available or this language may not be supported.
- sender Enum
-
The source Enum.
- T
-
The type.
T
The current flags.
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 value As FileAttributes = FileAttributes.ReadOnly Or FileAttributes.Hidden Or FileAttributes.System
Dim flags As FileAttributes() = value.Flags(Of FileAttributes)
For Each flag As FileAttributes In flags
MsgBox(flag.ToString())
Next
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.