I am New to .net,I hope it would be great help for me I want auto generation of numbers in c#. Actually i have EmpCode with E and C followed by 3digit no. I have two text boxes. one box is for selecting E or C and another one for number which i want automatically generate like E001,E002
I want auto generation of numbers in c#. like E001,E002
Collapse
X
-
Tags: None
-
Code:List<String> numbers = new List<String>(); string code = "E"; //Or "C" for(int i = 0; i <= 999; i++) { numbers.Add(String.Format("{0}{1:000}", code, i)); }
Comment