/// <summary> /// Randoms the string. /// </summary> /// <param name="maxLength">Length of the max.</param> /// <param name="characterGroup">The character group.</param> /// <returns>System.String.</returns> public static string RandomString(int maxLength, RandomCharacterGroup characterGroup) { switch (characterGroup) { case RandomCharacterGroup.AlphaOnly: return(RandomString(maxLength, AlphaChars)); case RandomCharacterGroup.NumericOnly: return(RandomString(maxLength, NumericChars)); case RandomCharacterGroup.AlphaNumericOnly: return(RandomString(maxLength, AlphaNumericChars)); default: return(RandomString(maxLength, AllValidChars)); } }
/// <summary> /// Randoms the string. /// </summary> /// <param name="maxLength">Length of the max.</param> /// <param name="characterGroup">The character group.</param> /// <returns>System.String.</returns> public static string RandomString(int maxLength, RandomCharacterGroup characterGroup) { switch (characterGroup) { case RandomCharacterGroup.AlphaOnly: return RandomString(maxLength, AlphaChars); case RandomCharacterGroup.NumericOnly: return RandomString(maxLength, NumericChars); case RandomCharacterGroup.AlphaNumericOnly: return RandomString(maxLength, AlphaNumericChars); default: return RandomString(maxLength, AllValidChars); } }