Class EnumExtensions
Provides extension methods to System.Enum.
Inheritance
System.Object
Namespace: Umbraco.Core
Assembly: Umbraco.Core.dll
Syntax
public static class EnumExtensions
Methods
View SourceHasFlagAll<T>(T, T)
Determines whether all the flags/bits are set within the enum value.
Declaration
[Obsolete("Use Enum.HasFlag() or bitwise operations (if performance is important) instead.")]
public static bool HasFlagAll<T>(this T value, T flags)
where T : Enum
Parameters
Type | Name | Description |
---|---|---|
T | value | The enum value. |
T | flags | The flags. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Type Parameters
Name | Description |
---|---|
T | The enum type. |
HasFlagAny<T>(T, T)
Determines whether any of the flags/bits are set within the enum value.
Declaration
public static bool HasFlagAny<T>(this T value, T flags)
where T : Enum
Parameters
Type | Name | Description |
---|---|---|
T | value | The value. |
T | flags | The flags. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Type Parameters
Name | Description |
---|---|
T | The enum type. |