c# - Check if enum type is ulong -
i have enum , want check if enum type ulong.
tried far:
var checkvalue = enum.getunderlyingtype(param.paramtype); // param enum if (checkvalue ulong){ } // doesn't work var checkvalue = param.value; if (checkvalue ulong){ } // doesn't work
any ideas?
enum.getunderlyingtype
returns object of type type
so, indeed not ulong
, it's ulong
type :)
try this:
if (checkvalue == typeof(ulong))
c# types
No comments:
Post a Comment