Determine if type is a system type

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to determine if a System.Type represents a system type (i.e., a type
that is defined in the .NET framework). The System.Type.UnderlyingSystemType
seems like the type of thing that I'm after, but that property always seems
to return the same type as the original type (i.e., type is
type.UnderlyingSystemType always seems to be True).

Thanks for any help.
Lance
 
I want to determine if a System.Type represents a system type (i.e., a type
that is defined in the .NET framework).

You can check the Assembly property of the type and see if it matches
a list of known assemblies that are in the .NET framework. But keep in
mind that such a list can be different from one framework version to
another.



Mattias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top