Here is the super easy way to do that. Following code snippet will give you 8 digit alphanumeric random string.
Guid g = Guid.NewGuid();
string random = g.ToString();
In the 3rd line you can replace 8 with whatever number (10, 12 etc) and then you may find - that you can replace with empty string.
Please "Mark as answer", if this helped.
Kannan1986, if this helps please login to Mark As Answer. |
Reply | Alert Moderator