mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-02-16 13:15:07 +00:00
refactor: Tidying
This commit is contained in:
@@ -4,7 +4,6 @@ using System.Linq;
|
|||||||
using ICD.Common.Properties;
|
using ICD.Common.Properties;
|
||||||
using ICD.Common.Utils.Extensions;
|
using ICD.Common.Utils.Extensions;
|
||||||
#if SIMPLSHARP
|
#if SIMPLSHARP
|
||||||
using System.Globalization;
|
|
||||||
using Crestron.SimplSharp.Reflection;
|
using Crestron.SimplSharp.Reflection;
|
||||||
#else
|
#else
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
@@ -56,9 +55,10 @@ namespace ICD.Common.Utils
|
|||||||
/// Returns true if the given value is an enum.
|
/// Returns true if the given value is an enum.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static bool IsEnum(object value)
|
public static bool IsEnum<T>(T value)
|
||||||
{
|
{
|
||||||
return value != null && IsEnumType(value.GetType());
|
// ReSharper disable once CompareNonConstrainedGenericWithNull
|
||||||
|
return value != null && IsEnumType<T>();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user