This commit is contained in:
Chris Cameron
2018-03-09 14:14:37 -05:00
parent 02ecff187d
commit 825fb55bd8

View File

@@ -533,17 +533,7 @@ namespace ICD.Common.Utils
// ReSharper disable once CompareNonConstrainedGenericWithNull
throw new ArgumentException(string.Format("{0} is not an enum", value == null ? "NULL" : value.GetType().Name), "value");
return ToEnum((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;
return (Enum)(object)value;
}
#endregion