简体   繁体   中英

How to determine using C# Reflection if a class is a WinRT type

Is there anyway at runtime to determine if a type is a WinRT class? Ie if its WinRT then behave in one way, if its not then behave in another?

From http://blogs.msdn.com/b/ptorr/archive/2012/05/27/loading-winrt-types-via-reflection-in-windows-8.aspx

It looks like you can get the AssemblyQualifiedName and see if it contains ContentType=WindowsRuntime .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM