共用方式為


CborWriter.Encode Method

Definition

Overloads

Encode()

Returns a new array containing the encoded value.

Encode(Span<Byte>)

Writes the encoded representation of the data to destination.

Encode()

Source:
CborWriter.cs
Source:
CborWriter.cs
Source:
CborWriter.cs

Returns a new array containing the encoded value.

public:
 cli::array <System::Byte> ^ Encode();
public byte[] Encode ();
member this.Encode : unit -> byte[]
Public Function Encode () As Byte()

Returns

Byte[]

A precisely-sized array containing the encoded value.

Exceptions

The writer does not contain a complete CBOR value or sequence of root-level values.

Applies to

Encode(Span<Byte>)

Source:
CborWriter.cs
Source:
CborWriter.cs
Source:
CborWriter.cs

Writes the encoded representation of the data to destination.

public:
 int Encode(Span<System::Byte> destination);
public int Encode (Span<byte> destination);
member this.Encode : Span<byte> -> int
Public Function Encode (destination As Span(Of Byte)) As Integer

Parameters

destination
Span<Byte>

The buffer in which to write.

Returns

The number of bytes written to destination.

Exceptions

The writer does not contain a complete CBOR value or sequence of root-level values.

The destination buffer is not large enough to hold the encoded value.

Applies to