Alex Rivera | Logout

Version Numbers float, decimal or double

Asked 2010-11-12T13:41:04.980
13

I have a document management system where documents can have multiple versions. Each version is saved and users can view version history.

What I would like to know is: What datatype should I use for version numbers? Decimal, Float or Double? I'm using .NET and C#.

Version numbers start at 0.1 and each published major version will be rounded to the next whole number. i.e. 0.4 goes to 1.0 and 1.3 goes to 2.0 etc.

When a version numbers hits 0.9 and a minor version is added I would like the number to go to 0.10 not 1.0, when I add to it. This is the biggest issue.

Any suggestions are appreciated.

Thanks.

Edit
Report

1 Answer

5

How about two integers? One for major and one for minor revisions?

answered 2010-11-12T13:42:49.563

Your Answer