How check if type is class?
Try calling GetTypeInfo()
to get at this information.
This is ok, on: .net Core 1.1
using System.Reflection;
bool isClass = obj.GetType().GetTypeInfo().IsClass;
In .NET Core 2.2 you can do:
bool isClass = obj.GetType().IsClass;
The following will no longer work:
bool isClass = obj.GetTypeInfo().IsClass;
bool isClass = obj.GetType().GetTypeInfo().IsClass;