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().IsEnu m. If
you mean "is it something other than the primitive types int, bool, string
etc." you could check GetType().IsPri mitive or GetType().GetTy peCode(). 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.
"John A Grandy" <johnagrandy-at-gmail-dot-comwrote in message
news:OTzAWDdHJH A.4060@TK2MSFTN GP03.phx.gbl...
Short of brute force , how to determine if a type is not a .net type ...
e.g. a custom type, such as an enum ...
>
You'd think they'd build this in , it's such an obvious need.
"Marc Gravell" <marc.gravell@g mail.comwrote in message
news:c862f03e-b223-47c3-8fcc-a9cb34a56ac4@m4 5g2000hsb.googl egroups.com...
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).
>
Marc
Comment