I’m trying to port some code to WinRT/Metro and I’ve hit a problem I’m not sure of the work around for. It seems Type is missing the access functions for IsPrimitive and IsSubclassOf(myClass) amongst others. Is anyone aware of how to get this functionality in Windows 8?
Share
Those methods are relocated; you need to add a
usingdirective:then use
someType.GetTypeInfo().IsSubclassOf(...)andsomeType.GetTypeInfo().IsPrimitive.(the
usingdirective is necessary becauseGetTypeInfo()is an extension method fromSystem.Reflection.IntrospectionExtensions).