If you mean to separate types that the core libraries define
(System.dll, etc) from your own types, then there isn't anything built
in. The most generic approach would be to check the declaring assembly
against a list that you pre-define (or perhaps use the strong name
etc).
It depends precisely what you mean - it's not entirely clear. If you just
want to know whether the type is an enum or not, check GetType().IsEnum. If
you mean "is it something other than the primitive types int, bool, string
etc." you could check GetType().IsPrimitive or GetType().GetTypeCode(). If
you mean "is it something defined in the framework class library or not",
then you have to try something along the lines of what Marc says.
Indeed - actually, I like that fundamentally there is no distinction,
and all types are (largely) equal citizens...
Marc
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.