Random.GetString(ReadOnlySpan<Char>, Int32) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
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.