mirror of
https://github.com/ICDSystems/ICD.Common.Utils.git
synced 2026-04-12 12:07:05 +00:00
refactor: Tidying
This commit is contained in:
parent
591240d973
commit
fd3143ea6c
1 changed files with 3 additions and 3 deletions
|
|
@ -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>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue