From 5cd947c0611eab37ec63c28bba9a7841f60081c8 Mon Sep 17 00:00:00 2001 From: Jack Kanarish Date: Tue, 10 Apr 2018 11:06:21 -0400 Subject: [PATCH] fix casting issue --- ICD.Common.Utils/EnumUtils.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ICD.Common.Utils/EnumUtils.cs b/ICD.Common.Utils/EnumUtils.cs index 03b6b90..af3f1e9 100644 --- a/ICD.Common.Utils/EnumUtils.cs +++ b/ICD.Common.Utils/EnumUtils.cs @@ -321,7 +321,7 @@ namespace ICD.Common.Utils throw new ArgumentException(string.Format("{0} is not an enum", value == null ? "NULL" : value.GetType().Name), "value"); int maxEnumValue = (GetValues().Max(v => (int)(object)v) * 2) -1 ; - return Enumerable.Range(1, maxEnumValue).Cast().Where(v => HasFlags(value, v)); + return Enumerable.Range(1, maxEnumValue).Select(i => (T)(object)i ).Where(v => HasFlags(value, v)); } ///