共用方式為


EntityDataReader.GetBytes 方法

[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 msdn.com/data/ef。]

將位元組資料流從指定的資料行 (從 dataIndex 代表的位置開始) 讀取到緩衝區 (從 bufferIndex 代表的位置開始)。

命名空間:  System.Data.Entity.Core.EntityClient
組件:  EntityFramework (在 EntityFramework.dll 中)

語法

'宣告
Public Overrides Function GetBytes ( _
    ordinal As Integer, _
    dataOffset As Long, _
    buffer As Byte(), _
    bufferOffset As Integer, _
    length As Integer _
) As Long
'用途
Dim instance As EntityDataReader 
Dim ordinal As Integer 
Dim dataOffset As Long 
Dim buffer As Byte()
Dim bufferOffset As Integer 
Dim length As Integer 
Dim returnValue As Long 

returnValue = instance.GetBytes(ordinal, _
    dataOffset, buffer, bufferOffset, _
    length)
public override long GetBytes(
    int ordinal,
    long dataOffset,
    byte[] buffer,
    int bufferOffset,
    int length
)
public:
virtual long long GetBytes(
    int ordinal, 
    long long dataOffset, 
    array<unsigned char>^ buffer, 
    int bufferOffset, 
    int length
) override
abstract GetBytes : 
        ordinal:int * 
        dataOffset:int64 * 
        buffer:byte[] * 
        bufferOffset:int * 
        length:int -> int64  
override GetBytes : 
        ordinal:int * 
        dataOffset:int64 * 
        buffer:byte[] * 
        bufferOffset:int * 
        length:int -> int64
public override function GetBytes(
    ordinal : int, 
    dataOffset : long, 
    buffer : byte[], 
    bufferOffset : int, 
    length : int
) : long

參數

  • ordinal
    類型:System.Int32
    以零為基底的資料行序數。
  • dataOffset
    類型:System.Int64
    要開始讀取作業之資料列中的來源索引。
  • buffer
    類型:System.Byte[]
    要將資料複製到其中的目的緩衝區。
  • bufferOffset
    類型:System.Int32
    要對其複製資料的緩衝區索引。
  • length
    類型:System.Int32
    要讀取的最大字元數。

傳回值

類型:System.Int64
讀取的實際位元組數目。

Implements

IDataRecord.GetBytes(Int32, Int64, Byte[], Int32, Int32)

請參閱

參考

EntityDataReader 類別

System.Data.Entity.Core.EntityClient 命名空間