/// <summary> /// Generate a random string consisted of letters /// </summary> /// <param name="length">length of the string generated</param> /// <returns></returns> public static string GenerateLetterStrings(int length) { RandomStringGenerator rsg = new RandomStringGenerator(); rsg.IsUsingNumeric = false; rsg.IsUsingSpecialChars = false; return rsg.Generate(length); }
public static int RandomInt() { return(Math.Abs(RandomStringGenerator.GenerateLetterStrings(10).GetHashCode() / 100)); }
public static string RandomString(int length) { return(RandomStringGenerator.GenerateLetterStrings(length)); }