AA2Install.Tests.GZipTests.RandomString C# (CSharp) 메소드

RandomString() 공개 정적인 메소드

public static RandomString ( int length ) : string
length int
리턴 string
        public static string RandomString(int length)
        {
            const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
            var random = new Random();
            return new string(Enumerable.Repeat(chars, length)
              .Select(s => s[random.Next(s.Length)]).ToArray());
        }