Shaitan00 Posted November 20, 2006 Posted November 20, 2006 I have 2 strings (sOldVersion & sNewVersion) that have the form xxx.xxx.xxx (3 sections) ... for example: 1.2.3 1.10.33 2.1.15 7.80.1 These correspond to VERSIONS of one of our components (and they are retireved a strings in-code). My problem is I need to determine if "sNewVersion" is greater, equal, or less then "sOlderVersion" ... and I can't just cast these as integers (obviouslly)... Anyone have a clue how I could accomplish such a comparaison? One solution I thought of (but have not yet implemented) would be to break down each version section (high, med, low), cast them as integers, and compare like that (I am sure I can get it to work, but is there a nicer way to do this?) Any help, hints, or ideas would be greatly appreciated. Thanks, Quote
Killian35 Posted November 20, 2006 Posted November 20, 2006 Give Version a try. Dim v1 As New Version("1.10.33") Dim v2 As New Version("1.2.3") Debug.WriteLine(v1.CompareTo(v2)) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.