英語で読む

次の方法で共有


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 byte[] Encode ();

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

.NET 9 (package-provided) およびその他のバージョン
製品 バージョン
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided)

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<byte> destination);

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

.NET 9 (package-provided) およびその他のバージョン
製品 バージョン
.NET 8 (package-provided), 9 (package-provided)
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided)