Show / Hide Table of Contents

WriteValue Method

WriteValue(int, ReadOnlySpan<byte>)

Add a byte array as a value to be written out.

C#
public void WriteValue(int tag, ReadOnlySpan<byte> value)

Parameters

Type Name Description
int tag

The tag that will be written out when this TLV is encoded.

ReadOnlySpan<byte> value

The byte array that is the value.

Exceptions

Type Condition
TlvException

The tag is invalid, or the length is unsupported.

Remarks

When an Encode method is called, the tag and value given will be written out as the T and V of the TLV.

If there is no data, pass an empty Span: ReadOnlySpan<byte>.Empty. In that case, what is written out is simply tag 00.

In this article
Back to top Generated by DocFX