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 安全性

请参阅

参考

DataReader 类

GetBytes 重载

Microsoft.VisualStudio.Data.Framework 命名空间

GetBytes