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

Definição

Cria uma cadeia preenchida com caracteres escolhidos aleatoriamente 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

Parâmetros

choices
ReadOnlySpan<Char>

Os caracteres a usar para preencher a cadeia.

length
Int32

O comprimento do fio para voltar.

Devoluções

Uma cadeia preenchida com itens selecionados aleatoriamente de choices.

Exceções

choices está vazio.

length não é zero nem um número positivo.

Aplica-se a

Ver também