string name = Assembly.GetEntryAssembly().GetName().Name;
or
string name = Assembly.GetExecutingAssembly().GetName().Name;
Alternatively, you can get the Assembly object from any known type in the assembly:
Assembly assy = typeof({class name here}).Assembly;
It also allows another option to get only the name:
string name = typeof({class name here}).Assembly.GetName().Name;
source share