提交 9fdfb4f8 编写于 作者: N Nick Craver

DNX: Use TypeInfo

上级 23547c9d
...@@ -9,7 +9,7 @@ internal static class TypeExtensions ...@@ -9,7 +9,7 @@ internal static class TypeExtensions
public static bool IsValueType(this Type type) public static bool IsValueType(this Type type)
{ {
#if DNXCORE50 #if DNXCORE50
return typeof(ValueType).IsAssignableFrom(type) && type != typeof(ValueType); return type.GetTypeInfo().IsValueType;
#else #else
return type.IsValueType; return type.IsValueType;
#endif #endif
...@@ -17,7 +17,7 @@ public static bool IsValueType(this Type type) ...@@ -17,7 +17,7 @@ public static bool IsValueType(this Type type)
public static bool IsEnum(this Type type) public static bool IsEnum(this Type type)
{ {
#if DNXCORE50 #if DNXCORE50
return typeof(Enum).IsAssignableFrom(type) && type != typeof(Enum); return type.GetTypeInfo().IsEnum;
#else #else
return type.IsEnum; return type.IsEnum;
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册