How can I generate a random 8 character alphanumeric string in C#?
A solution without using Random :
Random
var chars = Enumerable.Repeat("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", 8); var randomStr = new string(chars.SelectMany(str => str) .OrderBy(c => Guid.NewGuid()) .Take(8).ToArray());