Partager via


AsnWriter.WriteCharacterString Method

Definition

Overloads

WriteCharacterString(UniversalTagNumber, String, Nullable<Asn1Tag>)

Write the provided string using the specified encoding type using the specified tag corresponding to the encoding type.

WriteCharacterString(UniversalTagNumber, ReadOnlySpan<Char>, Nullable<Asn1Tag>)

Write the provided string using the specified encoding type using the specified tag corresponding to the encoding type.

WriteCharacterString(UniversalTagNumber, String, Nullable<Asn1Tag>)

Source:
AsnWriter.Text.cs
Source:
AsnWriter.Text.cs
Source:
AsnWriter.Text.cs

Write the provided string using the specified encoding type using the specified tag corresponding to the encoding type.

public void WriteCharacterString (System.Formats.Asn1.UniversalTagNumber encodingType, string value, System.Formats.Asn1.Asn1Tag? tag = default);
member this.WriteCharacterString : System.Formats.Asn1.UniversalTagNumber * string * Nullable<System.Formats.Asn1.Asn1Tag> -> unit
Public Sub WriteCharacterString (encodingType As UniversalTagNumber, value As String, Optional tag As Nullable(Of Asn1Tag) = Nothing)

Parameters

encodingType
UniversalTagNumber

One of the enumeration values representing the encoding to use.

value
String

The string to write.

tag
Nullable<Asn1Tag>

The tag to write, or null for the universal tag that is appropriate to the requested encoding type.

Exceptions

value is null

encodingType is not a restricted character string encoding type. -or- encodingType is a restricted character string encoding type that is not currently supported by this method.

tag.TagClass is Universal, but tag.TagValue is not correct for the method.

Applies to

WriteCharacterString(UniversalTagNumber, ReadOnlySpan<Char>, Nullable<Asn1Tag>)

Source:
AsnWriter.Text.cs
Source:
AsnWriter.Text.cs
Source:
AsnWriter.Text.cs

Write the provided string using the specified encoding type using the specified tag corresponding to the encoding type.

public void WriteCharacterString (System.Formats.Asn1.UniversalTagNumber encodingType, ReadOnlySpan<char> str, System.Formats.Asn1.Asn1Tag? tag = default);
member this.WriteCharacterString : System.Formats.Asn1.UniversalTagNumber * ReadOnlySpan<char> * Nullable<System.Formats.Asn1.Asn1Tag> -> unit
Public Sub WriteCharacterString (encodingType As UniversalTagNumber, str As ReadOnlySpan(Of Char), Optional tag As Nullable(Of Asn1Tag) = Nothing)

Parameters

encodingType
UniversalTagNumber

One of the enumeration values representing the encoding to use.

str
ReadOnlySpan<Char>

The string to write.

tag
Nullable<Asn1Tag>

The tag to write, or null for the universal tag that is appropriate to the requested encoding type.

Exceptions

encodingType is not a restricted character string encoding type. -or- encodingType is a restricted character string encoding type that is not currently supported by this method.

tag.TagClass is Universal, but tag.TagValue is not correct for the method.

Applies to