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