I wasted some time this morning writing my own version comparer, trying to write something short and smart that would be able to compare, if, for example,
version 4.56.7 is greater than version 4.3.2.1
turns out C# already has a lib for that :
https://msdn.microsoft.com/en-us/library/system.version.aspx
It can take up to 4 dot-separated components - major, minor, build, and revision.
No comments:
Post a Comment