I was wanting to parse a string such as "10.0.20" into a number in order to compare another string with the same format in C#.net
For example I would be comparing these two numbers to see which is lesser than the other: if (10.0.30 < 10.0.30) ....
I am not sure which parsing method I should use for this, as decimal.Parse(string) didn't work in this case.
Thanks for your time.
Edit: @Romoku answered my question I never knew there was a Version class, it's exactly what I needed. Well TIL. Thanks everyone, I would have spent hours digging through forms if it wasn't for you lot.
10.0.30is not valid decimal number. You have to either compare them as strings (using custom comparer) or create your own type (class) which would do this..and compare each segment).