Reading the current Namespace.Class, Assemble at runtime

  • Thread starter Thread starter Mike Walters
  • Start date Start date
M

Mike Walters

Reading the current Namespace.Class, Assemble at runtime


I am trying to get the Assemble, Namespace and Class name of a form at
runtime. I have several assembles and namespaces in my app, I need to
determine what namespace.class, assemble I am currently processing.

Thanks
Mike Walters
 
Look at the System.Reflection namespace.
The method Assembly.GetExecutingAssembly will give you a reference to the
current assembly that your code is running in - an instance of the Assembly
class. Then you can call GetName on it to retrieve the name of the assembly.
There are other classes such as Module, AssemblyName, etc in the
System.Reflection namespace. These should help you get going in the right
direction.
Also look at the methods of the 'Type' class.
sorry - I don't have any examples right now but you should find some in the
MSDN help files.

hope this helps..
Imran.
 

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