Del via


AsnWriter.PushOctetString(Nullable<Asn1Tag>) Method

Definition

Begin writing an Octet String value with a specified tag.

public System.Formats.Asn1.AsnWriter.Scope PushOctetString (System.Formats.Asn1.Asn1Tag? tag = default);
member this.PushOctetString : Nullable<System.Formats.Asn1.Asn1Tag> -> System.Formats.Asn1.AsnWriter.Scope
Public Function PushOctetString (Optional tag As Nullable(Of Asn1Tag) = Nothing) As AsnWriter.Scope

Parameters

tag
Nullable<Asn1Tag>

The tag to write, or null for the default tag (Universal 4).

Returns

A disposable value which will automatically call PopOctetString(Nullable<Asn1Tag>).

Remarks

This method is just an accelerator for writing an Octet String value where the contents are also ASN.1 data encoded under the same encoding system. When PopOctetString(Nullable<Asn1Tag>) is called the entire nested contents are normalized as a single Octet String value, encoded correctly for the current encoding rules. This method does not necessarily create a Constructed encoding, and it is not invalid to write values other than Octet String inside this Push/Pop.

Applies to