ValueAsnReader.TryReadCharacterString 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將下一個值讀取為帶有指定標籤與編碼類型的字串,並將解碼後的值複製到指定的目的緩衝區。
public bool TryReadCharacterString(Span<char> destination, System.Formats.Asn1.UniversalTagNumber encodingType, out int charsWritten, System.Formats.Asn1.Asn1Tag? expectedTag = default);
member this.TryReadCharacterString : Span<char> * System.Formats.Asn1.UniversalTagNumber * int * Nullable<System.Formats.Asn1.Asn1Tag> -> bool
Public Function TryReadCharacterString (destination As Span(Of Char), encodingType As UniversalTagNumber, ByRef charsWritten As Integer, Optional expectedTag As Nullable(Of Asn1Tag) = Nothing) As Boolean
參數
- encodingType
- UniversalTagNumber
其中一個列舉值代表要處理的值類型。
- charsWritten
- Int32
成功時,會收到寫入 destination的字元數。
傳回
true 若 destination 有足夠長度接收該值,則推進讀者;否則 false ,讀取器不前進。
例外狀況
encodingType 不是已知的字串類型。