I'm trying to figure out how to compare two strings (Numbers and Multiple Decimals) to see what one is greater numerically.
One string is version information read from the registry being compared against a string value read from a XML file.
This example can simulate what I'm trying to do though. Lets say string One variable is the string variable I read from the registry and string Two variable from the XML.
Dim One As String = "10.0.0.0"
Dim Two As String = "2.0.0.0"
If Two >= One Then MsgBox("Greater") Else MsgBox("Smaller")
The following code won't compare correctly since these are strings and the string comparison see's 10 as less than 2 although 10 is really greater than 2.
I've tried doing some integer conversion to no luck appears the decimals are causing issues.
Does anyone know how this could be converted to a number/integer so that we can convert the strings somehow so 10.0.0.0 would be seen as greater than 2.0.0.0?