Is there a datatype within C# that if you put to for example 0001, and add 1, will be 0开发者_StackOverflow社区002?
No, but you could emulate this functionality with an integer and:
String.Format("{0:0000}", no);
Just use int.
int i=1;
Console.WriteLine(i.ToString("0000"));
i++;
Console.WriteLine(i.ToString("0000"));
Here's the result:
0001
0002
精彩评论