public static GenerateString ( int minSize = 40, int maxSize = 40 ) : string | ||
minSize | int | The inclusive lower bound of the size of the string returned. |
maxSize | int | The exclusive upper bound of the size of the string returned. |
Résultat | string |
public static string GenerateString(int minSize = 40, int maxSize = 40)
{
// Create the string builder with a specific capacity
var builder = new StringBuilder(GenerateNumber(minSize, maxSize));
// Fill the string builder
for (var i = 0; i < builder.Capacity; i++)
{
builder.Append(AllowedChars[GenerateNumber(AllowedChars.Length - 1)]);
}
return builder.ToString();
}