How I can generate a 5-digit ID in C#
-
generate a random no , convert it to string, take out the first five characters and then convert it back to no. You can look at how to generate random nos in the System.Security.Cryptography namespace. There is a class for random no generation. Hope this helps. Cheers Kannan
-
generate a random no , convert it to string, take out the first five characters and then convert it back to no. You can look at how to generate random nos in the System.Security.Cryptography namespace. There is a class for random no generation. Hope this helps. Cheers Kannan
-
cool!! and thx.. but can you give me a code sample how i can generate a #? becouse i can´t find any code sample in the msdn. thx
I am still pretty new to C#, but on a hunch I would check out the Random class... :rolleyes: