Class EnumExtensions
Enumeration Based Extension Methods
Inheritance
System.Object
EnumExtensions
Namespace: GDX
Syntax
[VisualScriptingCompatible((short)2)]
public static class EnumExtensions
Methods
| Improve this Doc View SourceHasFlags<T>(T, T)
Determine if the provide flags (needles) are found in the haystack.
Declaration
public static bool HasFlags<T>(this T haystack, T needles)
where T : struct, Enum
Parameters
| Type | Name | Description |
|---|---|---|
| T | haystack | A predefined flag based enumeration. |
| T | needles | A set of flags to search for in the predefined enumeration. |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if the needles are found in the haystack, otherwise false. |
Type Parameters
| Name | Description |
|---|---|
| T | The enumeration's type. |
Remarks
Faster then System.Enum.HasFlag(System.Enum).