Assembly Entry Point
The following code explain how to get the entry point of assembly and much more information from assembly:
public static void Main(string[] args) { Assembly myAssInfo; myAssInfo = Assembly.GetEntryAssembly(); // to get the entry point if (myAssInfo.EntryPoint == null) { Console.WriteLine("The assembly has no entry point."); } else { Console.WriteLine(myAssInfo.EntryPoint.ToString()); } // to get other info like location , code base & etc Console.WriteLine("Location: ", myAssInfo.Location); Console.WriteLine("Code Base: ", myAssInfo.CodeBase); Console.WriteLine("Escaped Code Base: ", myAssInfo.EscapedCodeBase); Console.WriteLine("Loaded from GAC: ", myAssInfo.GlobalAssemblyCache);
}
|
No responses found. Be the first to respond and make money from revenue sharing program.
|