user518333
user518333

Reputation: 45

System.Reflection

let us consider im having an application AAA. From my application im loaded an assembly named as BBB.When im in BBB path, i need to get the AAA Assembly name at run time. how to accomplish this? Thanks in advance

Upvotes: 1

Views: 181

Answers (1)

veljkoz
veljkoz

Reputation: 8512

The call to:

Assembly.GetExecutingAssembly()

will return the assembly it's written in (the currently executing assembly). Or in your case, maybe you'll need:

Assembly.GetEntryAssembly()

to get the executable assembly (the assembly that the application was started with).

Upvotes: 4

Related Questions