Compare Version Numbers - Printable Version +- Support Forums (https://www.supportforums.net) +-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87) +--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18) +---- Forum: Visual Basic and the .NET Framework (https://www.supportforums.net/forumdisplay.php?fid=19) +---- Thread: Compare Version Numbers (/showthread.php?tid=18503) |
Compare Version Numbers - cipherwar - 05-04-2011 Hallo, I try to compare the version of my program with the version-number given by a PHP Serverapplication, both are Strings like x.y.z.a But comparison with "<" does not work. My code is like this: Code: Public Function versionCheck(ByVal sURL As String) As String and this: Code: Dim infoString As String Seems as if the comparison of "1.0.0.0" and "1.0.0.1" with character "<" does not work. Any idea what's going wrong here?? RE: Compare Version Numbers - KoBE - 05-04-2011 (05-04-2011, 03:45 AM)cipherwar Wrote: Seems as if the comparison of "1.0.0.0" and "1.0.0.1" with character "<" does not work. Are you just trying to see if the strings are equal? This should work for you. Code: . RE: Compare Version Numbers - cipherwar - 05-04-2011 thk, i implemented now this: versionIsActual = String.Compare(My.Application.Info.Version.ToString, actualVersion) RE: Compare Version Numbers - Modestep - 05-10-2011 You can try: Code: if string1 <> string2 then |