共用方式為


DbUpdatableDataRecord.GetBytes 方法

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

將欄位值擷取成位元組陣列。

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

語法

'宣告
<SuppressMessageAttribute("Microsoft.Usage", "CA2201:DoNotRaiseReservedExceptionTypes")> _
Public Overrides Function GetBytes ( _
    i As Integer, _
    dataIndex As Long, _
    buffer As Byte(), _
    bufferIndex As Integer, _
    length As Integer _
) As Long
'用途
Dim instance As DbUpdatableDataRecord 
Dim i As Integer 
Dim dataIndex As Long 
Dim buffer As Byte()
Dim bufferIndex As Integer 
Dim length As Integer 
Dim returnValue As Long 

returnValue = instance.GetBytes(i, dataIndex, _
    buffer, bufferIndex, length)
[SuppressMessageAttribute("Microsoft.Usage", "CA2201:DoNotRaiseReservedExceptionTypes")]
public override long GetBytes(
    int i,
    long dataIndex,
    byte[] buffer,
    int bufferIndex,
    int length
)
[SuppressMessageAttribute(L"Microsoft.Usage", L"CA2201:DoNotRaiseReservedExceptionTypes")]
public:
virtual long long GetBytes(
    int i, 
    long long dataIndex, 
    array<unsigned char>^ buffer, 
    int bufferIndex, 
    int length
) override
[<SuppressMessageAttribute("Microsoft.Usage", "CA2201:DoNotRaiseReservedExceptionTypes")>]
abstract GetBytes : 
        i:int * 
        dataIndex:int64 * 
        buffer:byte[] * 
        bufferIndex:int * 
        length:int -> int64 
[<SuppressMessageAttribute("Microsoft.Usage", "CA2201:DoNotRaiseReservedExceptionTypes")>]
override GetBytes : 
        i:int * 
        dataIndex:int64 * 
        buffer:byte[] * 
        bufferIndex:int * 
        length:int -> int64
public override function GetBytes(
    i : int, 
    dataIndex : long, 
    buffer : byte[], 
    bufferIndex : int, 
    length : int
) : long

參數

  • dataIndex
    類型:System.Int64
    要開始複製資料的索引。
  • buffer
    類型:System.Byte[]
    要將資料複製到其中的目的端緩衝區。
  • bufferIndex
    類型:System.Int32
    目的端緩衝區中開始複製的索引。
  • length
    類型:System.Int32
    要複製的位元組數目。

傳回值

類型:System.Int64
已複製的位元組數目。

Implements

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

請參閱

參考

DbUpdatableDataRecord 類別

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