I need to retrieve the major and minor version of the application, and instead of instantiating a new Version class with new Version(Application.ProductVersion);
is there a static copy of the Version class that already exists? If so, I can't find it, can someone point me in that direction, or is it only possible for me to manipulate the Application.ProductVersion
string like above?
zachattack05
70
Posting Pro in Training
Recommended Answers
Jump to Postusing System; using System.Reflection; public class Example { public static void Main() { // Get the version of the current assembly. Assembly assem = Assembly.GetExecutingAssembly(); AssemblyName assemName = assem.GetName(); Version ver = assemName.Version; Console.WriteLine("{0}, Version {1}", assemName.Name, ver.ToString()); } }
There is no static version, as …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.