Quick cut/paste for the masses:
public static class Utilities
{
/// <summary>
/// Gets the version info of the executing assembly.
/// </summary>
/// <returns></returns>
public static string GetVersionInfo()
{
string asmName = Assembly.GetExecutingAssembly().FullName; //format = HelloWorld, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
string[] splits = asmName.Split(',');
return splits[1]; //Version 1.0.0.0
}
}
This will return to you this string: ‘Version 1.0.0.0’
StackOverflow Tags: WP7
No comments:
Post a comment