mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-15 12:45:01 +00:00
Tidying
This commit is contained in:
@@ -533,17 +533,7 @@ namespace ICD.Common.Utils
|
|||||||
// ReSharper disable once CompareNonConstrainedGenericWithNull
|
// ReSharper disable once CompareNonConstrainedGenericWithNull
|
||||||
throw new ArgumentException(string.Format("{0} is not an enum", value == null ? "NULL" : value.GetType().Name), "value");
|
throw new ArgumentException(string.Format("{0} is not an enum", value == null ? "NULL" : value.GetType().Name), "value");
|
||||||
|
|
||||||
return ToEnum((object)value);
|
return (Enum)(object)value;
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Converts the given enum value to an Enum.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="value"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public static Enum ToEnum(object value)
|
|
||||||
{
|
|
||||||
return (Enum)value;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
Reference in New Issue
Block a user