Reputation: 1032
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.
Upvotes: 2
Views: 1852
Reputation: 244722
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.
Upvotes: 8