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
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.

C#
public void WriteCharacterString (System.Formats.Asn1.UniversalTagNumber encodingType, string value, System.Formats.Asn1.Asn1Tag? tag = default);

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-

 <code data-dev-comment-type="paramref">encodingType</code> 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

.NET 9 og aðrar útgáfur
Vara Útgáfur
.NET 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9
.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)

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

Source:
AsnWriter.Text.cs
Source:
AsnWriter.Text.cs
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.

C#
public void WriteCharacterString (System.Formats.Asn1.UniversalTagNumber encodingType, ReadOnlySpan<char> str, System.Formats.Asn1.Asn1Tag? tag = default);

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-

 <code data-dev-comment-type="paramref">encodingType</code> 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

.NET 9 og aðrar útgáfur
Vara Útgáfur
.NET 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9
.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)