Have a look at this article
A C# Password Generator[
^]
This has certain fields that let you control the password generation
* Exclusions: Specifies the set of characters to exclude in password generation.
* Minimum: Specifies the minimum length of the generated password.
* Maximum: Specifies the maximum length of the generated password.
* ConsecutiveCharacters: Controls generation of consecutive characters in the generated password.
* RepeatingCharacters: Controls generation of repeating characters in the generated password.
* ExcludeSymbols: Excludes symbols from the set of characters used to generate the password
Use of the ConsecutiveCharacters and RepeatingCharacters properties should let you achieve what you require