Is there a way to find all classes within a namespace
(programmatically)? I've played around with reflection a bit and it
seems that you can only find members of classes, not classes within a
namespace.

e.g., How would I find all classes within the namespace "System.Web"?

Any ideas?


Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com

Re: Finding all classes within a namespace by Frank

Frank
Sun Jun 13 09:51:44 CDT 2004

Hi,

> Is there a way to find all classes within a namespace
> (programmatically)? I've played around with reflection a bit and it
> seems that you can only find members of classes, not classes within a
> namespace.
>
> e.g., How would I find all classes within the namespace "System.Web"?
>

Since a namespace is only a "virtual" structure (which means that there is
no "Namespace"-Class, every class just knows her Namespace) you need to get
all the Types and check the "Namespace"-Property ...

Regards,

Frank Eller
www.frankeller.de



Re: Finding all classes within a namespace by thenedman2004

thenedman2004
Sun Jun 13 13:02:50 CDT 2004

> Frank Eller [MVP]wrote:
"]Hi,
>
> Is there a way to find all classes within a namespace
> (programmatically)? I've played around with reflection a bit and it
> seems that you can only find members of classes, not classes within
a
> namespace.
>
> e.g., How would I find all classes within the namespace
"System.Web"?
>
>
Since a namespace is only a "virtual" structure (which means that
there is
no "Namespace"-Class, every class just knows her Namespace) you need
to get
all the Types and check the "Namespace"-Property ...

Regards,

Frank Eller
www.frankeller.de[/quote:da0876ead6]

Thanks, that makes sense now. How would I get all possible .NET
classes ? (in order to then query the namespace property)


Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com