Class EnumExtensions
- Namespace
- LfrlAnvil.Extensions
- Assembly
- LfrlAnvil.Core.dll
Contains Enum extension methods.
public static class EnumExtensions
- Inheritance
-
EnumExtensions
- Inherited Members
Methods
GetMaxNameLength<T>()
Returns the length of the longest enum member name.
[Pure]
public static int GetMaxNameLength<T>() where T : struct, Enum
Returns
- int
Length of the longest enum member name.
Type Parameters
TEnum type.
ToBitmask<T>(T)
Creates a new Bitmask<T> instance out of the provided value.
[Pure]
public static Bitmask<T> ToBitmask<T>(this T value) where T : struct, Enum
Parameters
valueTSource value.
Returns
- Bitmask<T>
New Bitmask<T> instance.
Type Parameters
TEnum type.