How to get current Assembly?

  • Thread starter Thread starter Andy Bates
  • Start date Start date
A

Andy Bates

Hi -

Can someone tell me how I can get the assembly that the current code is
executing in?

TIA

- Andy
 
Hi Andy,

You can use Assembly.GetExecutingAssembly() to gets the Assembly that the
current code is running from. It is a static method of Assembly class.
If you want to get the assembly's location, you should refer to CodeBase or
Location property.

Hope this helps,

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Andy Bates" <[email protected]>
| Subject: How to get current Assembly?
| Date: Thu, 16 Oct 2003 22:45:54 +0100
| Lines: 10
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| NNTP-Posting-Host: cpc3-farn1-6-0-cust68.glfd.cable.ntl.com 81.105.30.68
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP12.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:191946
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| Hi -
|
| Can someone tell me how I can get the assembly that the current code is
| executing in?
|
| TIA
|
| - Andy
|
|
|
 

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