Reply to comment

Dynamically retrieving the executing assembly version attribute - C#

In our C# project the version attribute is defined in a CS file as: 

assembly: AssemblyVersion("3.6.2.5")]



To dynamically retrieve that via code, use the command:

 

string s = null;
s = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();

Thanks to MadHatter's post at CodeGuru.

 

string

Reply