SqlBytes.Read(Int64, Byte[], Int32, Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
從此 SqlBytes 實例複製位元組到傳入緩衝區,並回傳複製的位元組數量。
public:
long Read(long offset, cli::array <System::Byte> ^ buffer, int offsetInBuffer, int count);
public long Read(long offset, byte[] buffer, int offsetInBuffer, int count);
member this.Read : int64 * byte[] * int * int -> int64
Public Function Read (offset As Long, buffer As Byte(), offsetInBuffer As Integer, count As Integer) As Long
參數
- buffer
- Byte[]
要複製到的位元組陣列緩衝區。
傳回
一個 Int64 長值代表複製的位元組數。
備註
若嘗試讀取超過 MaxLength,則會拋出例外。
如果 count 指定要複製的位元組數超過從 offset 值到末尾可用的位元組,則只複製可用的位元組。
如果目的緩衝區是空參考,則會拋出例外。
若目的緩衝區無法接收到請求的字元數量,則會拋出例外。