2

I'm trying to compare Office version numbers in vb.NET

How can I determine if: 12.0.64 is greater or less than say 12.0.62 or 14.0.4762

It seems the fact that there is 2 decimals, vb doesn't like it.

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
Ben
  • 1,000
  • 2
  • 15
  • 36

1 Answers1

8

Use the Version class, which is specifically designed to handle version numbers like the ones you're trying to compare.

It provides a CompareTo method that accepts another Version object to compare against, and returns a value indicating their relative values.

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574