c# - Type.IsEnum Property in Portable Class Library -


i'm trying code in portable class library using asp.net core 1.0, following instruction:

public static void writemessage<t>(t value) {     if (typeof(t).isenum)     {         debug.print("is enum")     }     else     {         debug.print("not enum")     } } 

but code not compile because compiler says property isenum non present on type.

any suggestions?

some functionality type moved typeinfo in .net core.

typeof(t).gettypeinfo().isenum 

Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -