Show / Hide Table of Contents

GetEncodedLength Method

GetEncodedLength()

Get the length the encoding will be.

C#
public int GetEncodedLength()

Returns

int

The total length of the result of a call to Encode.

Exceptions

Type Condition
TlvException

The method is called before a schema has been completely entered.

Remarks

Note that this will only return the length if a full schema has been entered. Otherwise it will thorw an exception.

Call this only after the schema has been completely entered (the outermost Nested TLV has been closed). If you call this before the schema has been completely entered, it can throw an exception.

In this article
Back to top Generated by DocFX