共用方式為


AdoDotNetReader.GetBytes 方法 (Int32, array<Byte , Int32, Int32)

擷取所指定的位元組數二進位資料。

命名空間:  Microsoft.VisualStudio.Data.Framework.AdoDotNet
組件:  Microsoft.VisualStudio.Data.Framework (在 Microsoft.VisualStudio.Data.Framework.dll 中)

語法

'宣告
Public Overrides Function GetBytes ( _
    index As Integer, _
    buffer As Byte(), _
    bufferIndex As Integer, _
    length As Integer _
) As Integer
public override int GetBytes(
    int index,
    byte[] buffer,
    int bufferIndex,
    int length
)
public:
virtual int GetBytes(
    int index, 
    array<unsigned char>^ buffer, 
    int bufferIndex, 
    int length
) override
abstract GetBytes : 
        index:int * 
        buffer:byte[] * 
        bufferIndex:int * 
        length:int -> int 
override GetBytes : 
        index:int * 
        buffer:byte[] * 
        bufferIndex:int * 
        length:int -> int 
public override function GetBytes(
    index : int, 
    buffer : byte[], 
    bufferIndex : int, 
    length : int
) : int

參數

  • index
    型別:System.Int32
    在目前的資料區塊的索引來擷取的項目。
  • buffer
    型別:array<System.Byte[]
    指定資料,將位元組陣列應該放置的陣列。如果 nullNull 參照 (即 Visual Basic 中的 Nothing),這個方法會傳回要求的大小陣列以便將所有指定的資料。
  • bufferIndex
    型別:System.Int32
    開頭的索引。 buffer 參數所指定的位元組陣列。
  • length
    型別:System.Int32
    要讀取的位元組數目。 buffer 參數所指定的位元組陣列。

傳回值

型別:System.Int32
表示位元組數的數值讀入緩衝區。

實作

IVsDataReader.GetBytes(Int32, array<Byte[], Int32, Int32)

備註

以位元組的形式時,資料提供者提供資料,可以呼叫這個方法加入至唯讀幾個位元組至現有的用戶端緩衝區。這會優於擷取完整的值,在記憶體中所讀取的所有資料和配置。

.NET Framework 安全性

請參閱

參考

AdoDotNetReader 類別

GetBytes 多載

Microsoft.VisualStudio.Data.Framework.AdoDotNet 命名空間