SqlChars.Read(Int64, Char[], Int32, Int32) 方法

定義

將此 SqlChars 實例的字元複製到傳入的緩衝區,並回傳複製的字元數量。

public:
 long Read(long offset, cli::array <char> ^ buffer, int offsetInBuffer, int count);
public long Read(long offset, char[] buffer, int offsetInBuffer, int count);
member this.Read : int64 * char[] * int * int -> int64
Public Function Read (offset As Long, buffer As Char(), offsetInBuffer As Integer, count As Integer) As Long

參數

offset
Int64

一個 Int64long 偏移到實例中 SqlChars 所包含值的值。

buffer
Char[]

要複製到的字元陣列緩衝區。

offsetInBuffer
Int32

一個 Int32 整數偏移到緩衝區開始複製。

count
Int32

一個 Int32 整數值,代表要複製的字元數。

傳回

一個 Int64long 代表複製位元組數量的值。

備註

若嘗試讀取超過 MaxLength,則會拋出例外。

count 指定複製的字元數超過從值到末尾的 offsetInBuffer 可用字元,則僅複製可用字元。

如果目的緩衝區是空參考,則會拋出例外。

若目的緩衝區無法接收到請求的字元數量,則會拋出例外。

適用於

另請參閱