Mega Code Archive

 
Categories / C# Tutorial / Assembly
 

Get Entry Assembly

using System; using System.Reflection; using System; using System.Reflection; public class MainClass {   static void Main(string[] args)   {     Assembly EntryAssembly;     EntryAssembly = Assembly.GetEntryAssembly();     if(EntryAssembly.EntryPoint == null)       Console.WriteLine("The assembly has no entry point.");     else       Console.WriteLine(EntryAssembly.EntryPoint.ToString());   } }