var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; var random = new Random(); var list = Enumerable.Repeat(0, 8).Select(x=>chars[random.Next(chars.Length)]); ... ... <看更多>
Just two remarks: RandomChar should be a method because it returns a different result each time - this is just a convention that we usually ... ... <看更多>