Click here to Skip to main content
15,897,371 members
Home / Discussions / C#
   

C#

 
GeneralRe: Extending Hashtable - is there a better way? Pin
engsrini23-Jan-08 8:43
engsrini23-Jan-08 8:43 
GeneralCreating a WPF app with notpad and command-line compiler. Pin
CataclysmicQuantum23-Jan-08 6:29
CataclysmicQuantum23-Jan-08 6:29 
GeneralRe: Creating a WPF app with notpad and command-line compiler. Pin
led mike23-Jan-08 6:54
led mike23-Jan-08 6:54 
GeneralRe: Creating a WPF app with notpad and command-line compiler. Pin
CataclysmicQuantum23-Jan-08 7:03
CataclysmicQuantum23-Jan-08 7:03 
GeneralRe: Creating a WPF app with notpad and command-line compiler. Pin
led mike23-Jan-08 7:19
led mike23-Jan-08 7:19 
GeneralRe: Creating a WPF app with notpad and command-line compiler. Pin
CataclysmicQuantum23-Jan-08 7:37
CataclysmicQuantum23-Jan-08 7:37 
GeneralRe: Creating a WPF app with notpad and command-line compiler. Pin
NormDroid25-Jan-08 10:05
professionalNormDroid25-Jan-08 10:05 
GeneralName of DLL [SOLVED] Pin
#realJSOP23-Jan-08 5:24
professional#realJSOP23-Jan-08 5:24 
Is it possible to get the name of the DLL your code is executing in?

For instance, I have MyLib.DLL that contains the class "MyClass". Inside MyClass, I have a function that needs to know the name of the DLL it's running in.

How does one accomplish that in .Net?

It's done like this:

Module mod = Assembly.GetExecutingAssembly().GetModules()[0];
string name = mod.Name;



"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001


modified on Wednesday, January 23, 2008 11:32:24 AM

GeneralRe: Name of DLL [SOLVED] Pin
Justin Perez23-Jan-08 5:37
Justin Perez23-Jan-08 5:37 
QuestionGenerics [modified] Pin
ArneKruger23-Jan-08 4:06
ArneKruger23-Jan-08 4:06 
GeneralRe: Generics Pin
Alan Balkany23-Jan-08 4:18
Alan Balkany23-Jan-08 4:18 
GeneralRe: Generics [modified] Pin
ArneKruger23-Jan-08 4:31
ArneKruger23-Jan-08 4:31 
GeneralRe: Generics Pin
Alan Balkany23-Jan-08 4:40
Alan Balkany23-Jan-08 4:40 
GeneralRe: Generics Pin
Pete O'Hanlon23-Jan-08 4:35
mvePete O'Hanlon23-Jan-08 4:35 
GeneralRe: Generics Pin
led mike23-Jan-08 4:37
led mike23-Jan-08 4:37 
GeneralRe: Generics Pin
Roger Alsing23-Jan-08 5:06
Roger Alsing23-Jan-08 5:06 
GeneralRe: Generics Pin
ArneKruger23-Jan-08 5:50
ArneKruger23-Jan-08 5:50 
GeneralRe: Generics Pin
led mike23-Jan-08 6:50
led mike23-Jan-08 6:50 
Question[Message Deleted] Pin
Tahir Abbasi23-Jan-08 4:05
Tahir Abbasi23-Jan-08 4:05 
GeneralRe: how to create a Comma Seprated File (.CSV) in C# Pin
Justin Perez23-Jan-08 4:17
Justin Perez23-Jan-08 4:17 
Generalthank u John Pin
Tahir Abbasi23-Jan-08 7:46
Tahir Abbasi23-Jan-08 7:46 
GeneralRe: thank u John Pin
Pete O'Hanlon23-Jan-08 11:21
mvePete O'Hanlon23-Jan-08 11:21 
GeneralRe: how to create a Comma Seprated File (.CSV) in C# Pin
Thomas Stockwell23-Jan-08 8:07
professionalThomas Stockwell23-Jan-08 8:07 
GeneralRe: how to create a Comma Seprated File (.CSV) in C# Pin
Tahir Abbasi23-Jan-08 8:28
Tahir Abbasi23-Jan-08 8:28 
GeneralCan't bind listbox to IList Pin
Alan Balkany23-Jan-08 3:49
Alan Balkany23-Jan-08 3:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.