Re: Funny Comparison with Float
Rich Armstrong <[email protected]> Fri, 7 Mar 2008 14:28:56 -0600
| Newsgroups | gmane.comp.windows.devel.dotnet.clr |
|---|---|
| Message-ID | <[email protected]> |
Even a two-part System.Version has one advantage over string or numeric alternatives: what to call the tenth version. Assuming the ninth was called 1.9, 1.10 works fine for System.Version, but it's not so good for numeric representations. If you had the foresight to number the first version 1.01, then the issue won't arise till the hundredth version (or the thousandth if you started at 1.001, etc.). Sometimes people get sloppy when referring to versions, writing "1.3" when "1.03" would be more accurate. System.Version forgives that sort of sloppiness. -----Original Message----- From: Discussion of development on the .NET platform using any managed language [mailto:[email protected]] On Behalf Of David Nicholson Sent: Friday, March 7, 2008 10:13 AM To: [email protected] Subject: Re: [DOTNET-CLR] Funny Comparison with Float On Thu, 6 Mar 2008 15:22:18 +0000, Jon Skeet <[email protected]> wrote: >Rich Armstrong wrote: >> Jon Skeet wrote: >>>> Assuming it's a version number in a normal kind of way, it should really >>>> be a decimal (or a string). >> >> ... or even a System.Version. > >Well, that depends on what it's versioning. If you're versioning >something which has nothing to do with .NET, and only needs a major and >minor number, I'm not sure I'd use a version number with 4 parts where >the class describes itself in terms of versioning a CLR assembly. > >I'm sure it would work, but it also has disadvantages such as ToString() >including the two unnecessary parts. > >Jon I didn't even know there was such a class, but looking at the docs you can keep it to two parts if you want (including ToString()). David. =================================== This list is hosted by DevelopMentorR http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com