共用方式為


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

當由類別實作,以擷取指定的位元組數未經處理的二進位資料。

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

語法

'宣告
Function GetBytes ( _
    index As Integer, _
    buffer As Byte(), _
    bufferIndex As Integer, _
    length As Integer _
) As Integer
int GetBytes(
    int index,
    byte[] buffer,
    int bufferIndex,
    int length
)
int GetBytes(
    int index, 
    array<unsigned char>^ buffer, 
    int bufferIndex, 
    int length
)
abstract GetBytes : 
        index:int * 
        buffer:byte[] * 
        bufferIndex:int * 
        length:int -> int 
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
表示位元組數目的整數值讀入緩衝區。

備註

以未經處理的位元組陣列的形式時, DDEX 提供者提供資料,請呼叫這個方法為唯讀指定位元組數至現有的用戶端緩衝區。這會優於擷取完整的值,在記憶體中所讀取的所有資料和配置。

.NET Framework 安全性

請參閱

參考

IVsDataReader 介面

GetBytes 多載

Microsoft.VisualStudio.Data.Services.SupportEntities 命名空間