Try Get Chars Method
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.
Decodes into a span of chars a set of bytes from the specified read-only span if the destination is large enough.
public: virtual bool TryGetChars(ReadOnlySpan<System::Byte> bytes, Span<char> chars, [Runtime::InteropServices::Out] int % charsWritten);
public virtual bool TryGetChars (ReadOnlySpan<byte> bytes, Span<char> chars, out int charsWritten);
abstract member TryGetChars : ReadOnlySpan<byte> * Span<char> * int -> bool override this.TryGetChars : ReadOnlySpan<byte> * Span<char> * int -> bool
Public Overridable Function TryGetChars (bytes As ReadOnlySpan(Of Byte), chars As Span(Of Char), ByRef charsWritten As Integer) As Boolean
Upon successful completion of the operation, the number of chars decoded into
true if all of the characters were decoded into the destination;
false if the destination was too small to contain all the decoded chars.