How to retrieve the assembly version, name, etc. contained in the ‘AssemblyInfo.cs’, from inside the running app?

Platform: WinForms|Category: General

Here is a way to do this:

1) string strVersion = Application.ProductVersion;
2) Assembly assembly = Assembly.GetCallingAssembly();
string strVersion = assembly.GetName().Version.ToString();

The Application class offers also access to additional information like ProductName and so on.

(Information provided by Holger Persch in our forums)