PDA

View Full Version : Suggestion: compare versions with different delimiters


SetupJuggler
12-11-2008, 04:14 AM
Hi,
using SUF 8.1.1006.0

Our company product versions look like "xx.xx-zz", sometimes "xx.yy-zz.aa". To compare I use String.CompareFileVersions, but I have to replace "-" to "." before.

My suggestion is to have String.CompareFileVersions with a third optional parameter "Delimiter", with the default value ".".

Prototype:
number String.CompareFileVersions (string Version, string CompareTo, string Delimiter = "." )

Example for my case:

compare_version = String.CompareFileVersions( "1.23-04", "1.23-05", ".-")
-- compare_version results in -1


Best Regards
Udo

Darryl
03-02-2009, 07:56 AM
Thanks for the suggestion.

REF: 18347