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
Popular Articles
Last viewed:
- Tutorial for Configuring Silverlight 4, Entity Framework and WCF RIA Services in Separate Component Assemblies (DLL’s)
- Microsoft Word Spell Checker Doesn't Check Cut and Pasted Text
- Deploy Crystal Reports 2008 Run-time on Remote Server
- C# Free Component to Generate PDF - Convert HTML to PDF
- Explanation of Cross Domain and Client Access Policy files for Silverlight
- SQL Create Table Add Description to Column
Recent comments
- Awsome!!
8 hours 54 min ago - C# insert image
23 hours 47 min ago - jkll
3 days 11 hours ago - Thank You
4 days 11 hours ago - Another approach
6 days 12 hours ago - Issue
1 week 2 hours ago - thanks
1 week 13 hours ago - Calendar date time
1 week 18 hours ago - Nice Explanation
1 week 22 hours ago - ramya
1 week 3 days ago

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