Random.GetString(ReadOnlySpan<Char>, Int32) Méthode

Définition

Crée une chaîne remplie avec des caractères choisis au hasard à partir de choices.

public:
 System::String ^ GetString(ReadOnlySpan<char> choices, int length);
public string GetString(ReadOnlySpan<char> choices, int length);
member this.GetString : ReadOnlySpan<char> * int -> string
Public Function GetString (choices As ReadOnlySpan(Of Char), length As Integer) As String

Paramètres

choices
ReadOnlySpan<Char>

Caractères à utiliser pour remplir la chaîne.

length
Int32

Longueur de la chaîne à retourner.

Retours

Chaîne remplie avec des éléments sélectionnés au hasard à partir de choices.

Exceptions

choices est vide.

length n’est pas zéro ou un nombre positif.

S’applique à

Voir aussi