语言

CborWriter.Encode 方法

定义

重载

名称 说明
Encode()

返回包含编码值的新数组。

Encode(Span<Byte>)

将数据的编码表示形式 destination写入 。

Encode()

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

返回包含编码值的新数组。

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

返回

Byte[]

包含编码值的精确大小的数组。

例外

编写器不包含完整的 CBOR 值或根级值的序列。

适用于

Encode(Span<Byte>)

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

将数据的编码表示形式 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

参数

destination
Span<Byte>

要在其中写入的缓冲区。

返回

写入 到 destination的字节数。

例外

编写器不包含完整的 CBOR 值或根级值的序列。

目标缓冲区不够大,无法容纳编码的值。

适用于