IVsDataReader.GetBytes 方法 (String, array<Byte , Int32, Int32)
當由類別實作,以擷取指定的位元組數未經處理的二進位資料。
命名空間: Microsoft.VisualStudio.Data.Services.SupportEntities
組件: Microsoft.VisualStudio.Data.Services (在 Microsoft.VisualStudio.Data.Services.dll 中)
語法
'宣告
Function GetBytes ( _
name As String, _
buffer As Byte(), _
bufferIndex As Integer, _
length As Integer _
) As Integer
int GetBytes(
string name,
byte[] buffer,
int bufferIndex,
int length
)
int GetBytes(
String^ name,
array<unsigned char>^ buffer,
int bufferIndex,
int length
)
abstract GetBytes :
name:string *
buffer:byte[] *
bufferIndex:int *
length:int -> int
function GetBytes(
name : String,
buffer : byte[],
bufferIndex : int,
length : int
) : int
參數
- name
型別:System.String
項目名稱可以擷取未經處理的二進位資料。
- buffer
型別:array<System.Byte[]
指定資料,將位元組陣列應該放置的陣列。如果 nullNull 參照 (即 Visual Basic 中的 Nothing),這個方法會傳回要求的大小陣列以便將所有指定的資料。
- bufferIndex
型別:System.Int32
開頭的索引位元組陣列的指定以 buffer 參數。
- length
型別:System.Int32
要讀取的位元組數讀入位元組陣列的指定以 buffer 參數。
傳回值
型別:System.Int32
表示位元組數目的整數值讀入緩衝區。
備註
以未經處理的位元組陣列的形式時, DDEX 提供者提供資料,請呼叫這個方法為唯讀指定位元組數至現有的用戶端緩衝區。這會優於擷取完整的值,在記憶體中所讀取的所有資料和配置。
.NET Framework 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。