AsnWriter.WriteCharacterString 方法

定义

重载

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

使用指定的编码类型,以及与编码类型相对应的指定标记写入提供的字符串。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)

参数

encodingType
UniversalTagNumber

枚举值之一,表示要使用的编码。One of the enumeration values representing the encoding to use.

value
String

要写入的字符串。The string to write.

tag
Nullable<Asn1Tag>

要写入的标记,或使用 null 作为符合请求的编码类型的通用标记。The tag to write, or null for the universal tag that is appropriate to the requested encoding type.

例外

valuenullvalue is null

encodingType 不是受限制的字符串编码类型。encodingType is not a restricted character string encoding type. -或- encodingType 是此方法当前不支持的受限制的字符串编码类型。-or- encodingType is a restricted character string encoding type that is not currently supported by this method.

tag.TagClasstag.TagClass Universal,但 tag.TagValueis Universal, but tag.TagValue 对于此方法而言是不正确的。is not correct for the method.

适用于

产品 Introduced

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

使用指定的编码类型,以及与编码类型相对应的指定标记写入提供的字符串。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)

参数

encodingType
UniversalTagNumber

枚举值之一,表示要使用的编码。One of the enumeration values representing the encoding to use.

str
ReadOnlySpan<Char>

要写入的字符串。The string to write.

tag
Nullable<Asn1Tag>

要写入的标记,或使用 null 作为符合请求的编码类型的通用标记。The tag to write, or null for the universal tag that is appropriate to the requested encoding type.

例外

encodingType 不是受限制的字符串编码类型。encodingType is not a restricted character string encoding type. -或- encodingType 是此方法当前不支持的受限制的字符串编码类型。-or- encodingType is a restricted character string encoding type that is not currently supported by this method.

tag.TagClasstag.TagClass Universal,但 tag.TagValueis Universal, but tag.TagValue 对于此方法而言是不正确的。is not correct for the method.

适用于

产品 Introduced