RandomNumberGenerator.GetString(ReadOnlySpan<Char>, Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a string populated with characters chosen at random from choices.
public:
static System::String ^ GetString(ReadOnlySpan<char> choices, int length);
public static string GetString (ReadOnlySpan<char> choices, int length);
static member GetString : ReadOnlySpan<char> * int -> string
Public Shared Function GetString (choices As ReadOnlySpan(Of Char), length As Integer) As String
Parameters
- choices
- ReadOnlySpan<Char>
The characters to use to populate the string.
- length
- Int32
The length of string to return.
Returns
A string populated with random choices.
Exceptions
choices
is empty.
length
is not zero or a positive number.
Applies to
Vertu í samstarfi við okkur á GitHub
Heimildina fyrir þetta efni er að finna á GitHub, þar sem þú getur líka búið til og farið yfir vandamál og sameinað beiðnir. Frekari upplýsingar er að finna í framlagshandbók okkar.