How to create string "Version 1.0" in C#

Posted by Rohit on Stack Overflow See other posts from Stack Overflow or by Rohit
Published on 2010-06-18T12:05:36Z Indexed on 2010/06/18 12:13 UTC
Read the original article Hit count: 169

Filed under:

I have to store versionName of a template. VersionName is autoincremented.If last versionName is "Version 1.0", next should be "version 2.0". First time when a template is created, I have to store "Version 1.0".

I am using

VersionName = "Version "+((LatestVersion+1).ToString())

LatestVersion holds the last version which is 0 in case added for first time.

This seems to be a ugly workaround and doesnot even yield Version 1.0. it yields Version 1. I Tried with Version class as well,it does not work. How to accomplish this.Please suggest

© Stack Overflow or respective owner

Related posts about c#