Getting list of available classes in framework

A

_AnonCoward

It occurred to me recently that I would like to programmatically get a list
of all the classes available to me for a given framework (i.e.: 1.0, 1.1,
2.0). Any ideas on how to approach that problem?


Thanx,

Ralf
 
H

Herfried K. Wagner [MVP]

_AnonCoward said:
It occurred to me recently that I would like to programmatically get a
list
of all the classes available to me for a given framework (i.e.: 1.0, 1.1,
2.0). Any ideas on how to approach that problem?

Check out the 'Assembly' class. This class can be used to load assemblies
and determine the types defined in the assembly.
 
A

_AnonCoward

: > It occurred to me recently that I would like to programmatically get a
: > list
: > of all the classes available to me for a given framework (i.e.: 1.0,
1.1,
: > 2.0). Any ideas on how to approach that problem?
:
: Check out the 'Assembly' class. This class can be used to load assemblies
: and determine the types defined in the assembly.
:
: --
: M S Herfried K. Wagner
: M V P <URL:http://dotnet.mvps.org/>
: V B <URL:http://classicvb.org/petition/>


Will do. Thanx,

Ralf
 
K

Ken Tucker [MVP]

Hi,

Maybe this vb 2005 code will help. It will list all classes for
the loaded assemblies.

For Each asm As Reflection.Assembly In
My.Application.Info.LoadedAssemblies
For Each t As Type In asm.GetTypes
Trace.WriteLine(String.Format("Name {0} Namespace {1}",
t.Name, t.Namespace))
Next
Next


Ken
 
A

_AnonCoward

Thanx,

Ralf


: Hi,
:
: Maybe this vb 2005 code will help. It will list all classes
for
: the loaded assemblies.
:
: For Each asm As Reflection.Assembly In
: My.Application.Info.LoadedAssemblies
: For Each t As Type In asm.GetTypes
: Trace.WriteLine(String.Format("Name {0} Namespace {1}",
: t.Name, t.Namespace))
: Next
: Next
:
:
: Ken
: ----------------------
: : > It occurred to me recently that I would like to programmatically get a
: > list
: > of all the classes available to me for a given framework (i.e.: 1.0,
1.1,
: > 2.0). Any ideas on how to approach that problem?
: >
: >
: > Thanx,
: >
: > Ralf
: >
: >
:
:
 

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

Top