Using the Process.FileVersionInfo property

The Process object has a new FileVersionInfo property. It returns the full version number of the executable file that corresponds to a process. The peculiarity of this property is that depending on the situation, it can act either as a string or as an object. That is, if a text value is supposed to be used, it returns a string having the major_number.minor_number.build_number.private_number format. In other cases, it behaves like an object that has its own sub properties that return version number parts: major, minor, build and private numbers.

Here is a code snippet that demonstrates how to use the Process.FileVersionInfo property:


Add a little SmartBear to your life

Stay on top of your Software game with the latest developer tips, best practices and news, delivered straight to your inbox

By submitting this form, you agree to our
Terms of Use and Privacy Policy

Thanks for Subscribing

Keep an eye on your inbox for more great content.

Continue Reading