CborReader.TryReadByteString(Span<Byte>, Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
會將下一個資料項目讀取為位元組串(大型 2)。
public:
bool TryReadByteString(Span<System::Byte> destination, [Runtime::InteropServices::Out] int % bytesWritten);
public bool TryReadByteString(Span<byte> destination, out int bytesWritten);
member this.TryReadByteString : Span<byte> * int -> bool
Public Function TryReadByteString (destination As Span(Of Byte), ByRef bytesWritten As Integer) As Boolean
參數
- bytesWritten
- Int32
成功時,會收到寫入 destination的位元組數。
傳回
true若destination有足夠長度接收該值且讀取器前進;否則,。 false
例外狀況
下一個資料項目沒有正確的主要類型。
備註
此方法接受無限長度的字串,並將其串接到單一字串。