Sunday, December 02, 2012

Reflection: Assembly.GetExecutingAssembly

Consider the following call sequence.

 

Assembly

When we execute the following code

Console.WriteLine("Executing :" + Assembly.GetExecutingAssembly().GetName().Name.ToString());
Console.WriteLine("Calling :" + Assembly.GetCallingAssembly().GetName().Name.ToString());
Console.WriteLine("Entry :" + Assembly.GetEntryAssembly().GetName().Name.ToString());

Output will be



Executing: OneMoreLib


Calling: AnotherLib


Entry: MyApp

No comments:

Post a Comment