I came across this code. We want to generate confirmation code.
I used this and contacted "CONF-" to it.
Is this good or should I look for another method? my manager said to use sql server's identity field. I thought about using GUID (in C#) and then just take the first 8 letters of it.
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
var random = new Random();
var result = new string(
.Select(s => s[random.Next(s.Length)])