473,480 Members | 2,314 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Program version info

Lee
Hi All,

I need to put the program version info into it's about box. How do I get
the various version number (major, minor, rev, etc, etc)

I have tried this (major part only) but am getting a method was expected
error

strversion = "Version:" +
System.Diagnostics.FileVersionInfo.GetVersionInfo( System.Reflection.Assembly.GetExecutingAssembly(). Location).FileMajorPart();

Thanks
Nov 16 '05 #1
2 1968
Lee wrote:
Hi All,

I need to put the program version info into it's about box. How do I
get the various version number (major, minor, rev, etc, etc)


Hi. Have a look at:

System.Reflection.Assembly.GetExecutingAssembly(). GetName().Version

It returns a System.Version object containing Major, Minor and Revision
properties.

--
Martin Sommer
Nov 16 '05 #2
On Wed, 24 Nov 2004 13:05:49 -0500, Lee wrote:
Hi All,

I need to put the program version info into it's about box. How do I get
the various version number (major, minor, rev, etc, etc)

I have tried this (major part only) but am getting a method was expected
error

strversion = "Version:" +
System.Diagnostics.FileVersionInfo.GetVersionInfo( System.Reflection.Assembly.GetExecutingAssembly(). Location).FileMajorPart();


Try
System.Reflection.Assembly.GetExecutingAssembly(). GetName().Version.ToString();
--
Tom Porterfield
Nov 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2021
by: Chris | last post by:
I have been learning C and want to write a program and need someone to point me in the write direction. I want to write a program to store all my webpage bookmarks in possibly one file. I want it...
2
10704
by: David | last post by:
How do I add file version info to a C# .NET command line utility? I'd like to update the file version, description, company name, etc. that you see when you right-click the EXE and get its...
10
13540
by: OppThumb | last post by:
Hi, I've been searching this newsgroup for an answer to my question, and the closest I've come asks my question, but in reverse ("How to figure out the program from plan/package"). I've -- shall...
7
1708
by: jeffc | last post by:
Not sure exactly what my question is or what forum to ask on. I know how to get version info from a particular file. e.g. FileVersionInfo.GetVersionInfo(filePath) What I'd like to do is get...
0
6912
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7052
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
6981
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5348
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4790
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3000
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2989
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1304
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
188
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.