MemoryMarshal.TryGetString 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.
Tries to get the underlying string from a 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
Parameters
- memory
- ReadOnlyMemory<Char>
Read-only memory containing a block of characters.
- text
- String
When the method returns, the string contained in the memory buffer.
- start
- Int32
The starting location in text
.
- length
- Int32
The number of characters in text
.
Returns
true
if the method successfully retrieves the underlying string; otherwise, false
.
Applies to
GitHub पर हमारे साथ सहयोग करें
इस सामग्री का स्रोत GitHub पर पाया जा सकता है, जहाँ आप समस्याएँ बना और समीक्षा भी कर सकते हैं और अनुरोध खींच सकते हैं. अधिक जानकारी के लिए, हमारे योगदानकर्ता गाइड देखें.