MemoryMarshal.TryGetString Metoda

Definicja

Próbuje pobrać podstawowy ciąg z elementu System.ReadOnlyMemory<Char>.

public:
 static bool TryGetString(ReadOnlyMemory<char> memory, [Runtime::InteropServices::Out] System::String ^ % text, [Runtime::InteropServices::Out] int % start, [Runtime::InteropServices::Out] int % length);
public static bool TryGetString (ReadOnlyMemory<char> memory, out string? text, out int start, out int length);
public static bool TryGetString (ReadOnlyMemory<char> memory, out string text, out int start, out int length);
static member TryGetString : ReadOnlyMemory<char> * string * int * int -> bool
Public Shared Function TryGetString (memory As ReadOnlyMemory(Of Char), ByRef text As String, ByRef start As Integer, ByRef length As Integer) As Boolean

Parametry

memory
ReadOnlyMemory<Char>

Pamięć tylko do odczytu zawierająca blok znaków.

text
String

Po powrocie metody ciąg zawarty w buforze pamięci.

start
Int32

Lokalizacja początkowa w pliku text.

length
Int32

Liczba znaków w pliku text.

Zwraca

true jeśli metoda pomyślnie pobierze podstawowy ciąg; w przeciwnym razie , false.

Dotyczy