AsnWriter.TryEncode(Span<Byte>, Int32) Method

Definition

Attempts to write the encoded representation of the data to destination.

C#
public bool TryEncode(Span<byte> destination, out int bytesWritten);

Parameters

destination
Span<Byte>

The buffer in which to write.

bytesWritten
Int32

When this method returns, contains the number of bytes written to destination.

Returns

true if the encode succeeded, false if destination is too small.

Exceptions

Applies to

Toode Versioonid
.NET 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)