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
Post a Comment