語言

WindowsRuntimeBufferExtensions.CopyTo 方法

定義

多載

名稱 Description
CopyTo(Byte[], IBuffer)

將來源陣列中所有位元組複製到目的緩衝區(Windows。Storage.Streams.IBuffer),兩者皆從偏移 0(零)開始。 此方法不會更新目的緩衝區的長度。

CopyTo(IBuffer, Byte[])

從來源緩衝區(Windows.Storage.Streams.IBuffer)從兩端的偏移量 0(零)開始,傳送到目的地陣列。

CopyTo(IBuffer, IBuffer)

從來源緩衝區(Windows.Storage.Streams.IBuffer)到目的地緩衝區,兩者的偏移量 0(零)開始。

CopyTo(Byte[], Int32, IBuffer, UInt32, Int32)

從來源陣列複製位元組到目的緩衝區(Windows。Storage.Streams.IBuffer),指定來源陣列的起始索引、目的緩衝區的起始索引,以及要複製的位元組數。 此方法不會更新目的緩衝區的 Length 屬性。

CopyTo(IBuffer, UInt32, Byte[], Int32, Int32)

從來源緩衝區複製位元組(Windows.Storage.Streams.IBuffer)到目的地陣列,指定來源緩衝區的起始索引、目的陣列的起始索引,以及要複製的位元組數。

CopyTo(IBuffer, UInt32, IBuffer, UInt32, UInt32)

從來源緩衝區複製位元組(Windows.Storage.Streams.IBuffer)到目的地緩衝區,指定來源的起始索引、目的地的起始索引,以及要複製的位元組數。

CopyTo(Byte[], IBuffer)

重要

此 API 不符合 CLS 規範。

將來源陣列中所有位元組複製到目的緩衝區(Windows。Storage.Streams.IBuffer),兩者皆從偏移 0(零)開始。 此方法不會更新目的緩衝區的長度。

public:
[System::Runtime::CompilerServices::Extension]
 static void CopyTo(cli::array <System::Byte> ^ source, Windows::Storage::Streams::IBuffer ^ destination);
[System.CLSCompliant(false)]
public static void CopyTo(this byte[] source, Windows.Storage.Streams.IBuffer destination);
[<System.CLSCompliant(false)>]
static member CopyTo : byte[] * Windows.Storage.Streams.IBuffer -> unit
<Extension()>
Public Sub CopyTo (source As Byte(), destination As IBuffer)

參數

source
Byte[]

用來複製資料的陣列。

destination
Windows.Storage.Streams.IBuffer

用來複製資料的緩衝區。

屬性

例外狀況

source 或 destination 為空值。

的 source 大小超過了的 destination容量。

適用於

CopyTo(IBuffer, Byte[])

重要

此 API 不符合 CLS 規範。

從來源緩衝區(Windows.Storage.Streams.IBuffer)從兩端的偏移量 0(零)開始,傳送到目的地陣列。

public:
[System::Runtime::CompilerServices::Extension]
 static void CopyTo(Windows::Storage::Streams::IBuffer ^ source, cli::array <System::Byte> ^ destination);
[System.CLSCompliant(false)]
public static void CopyTo(this Windows.Storage.Streams.IBuffer source, byte[] destination);
[<System.CLSCompliant(false)>]
static member CopyTo : Windows.Storage.Streams.IBuffer * byte[] -> unit
<Extension()>
Public Sub CopyTo (source As IBuffer, destination As Byte())

參數

source
Windows.Storage.Streams.IBuffer

用來複製資料的緩衝區。

destination
Byte[]

用來複製資料的陣列。

屬性

例外狀況

source 或 destination 為空值。

的 source 大小大於 的 destination大小。

適用於

CopyTo(IBuffer, IBuffer)

重要

此 API 不符合 CLS 規範。

從來源緩衝區(Windows.Storage.Streams.IBuffer)到目的地緩衝區,兩者的偏移量 0(零)開始。

public:
[System::Runtime::CompilerServices::Extension]
 static void CopyTo(Windows::Storage::Streams::IBuffer ^ source, Windows::Storage::Streams::IBuffer ^ destination);
[System.CLSCompliant(false)]
public static void CopyTo(this Windows.Storage.Streams.IBuffer source, Windows.Storage.Streams.IBuffer destination);
[<System.CLSCompliant(false)>]
static member CopyTo : Windows.Storage.Streams.IBuffer * Windows.Storage.Streams.IBuffer -> unit
<Extension()>
Public Sub CopyTo (source As IBuffer, destination As IBuffer)

參數

source
Windows.Storage.Streams.IBuffer

來源緩衝區。

destination
Windows.Storage.Streams.IBuffer

目的地緩衝區。

屬性

例外狀況

source 或 destination 為空值。

的 source 大小超過了的 destination容量。

適用於

CopyTo(Byte[], Int32, IBuffer, UInt32, Int32)

重要

此 API 不符合 CLS 規範。

從來源陣列複製位元組到目的緩衝區(Windows。Storage.Streams.IBuffer),指定來源陣列的起始索引、目的緩衝區的起始索引,以及要複製的位元組數。 此方法不會更新目的緩衝區的 Length 屬性。

public:
[System::Runtime::CompilerServices::Extension]
 static void CopyTo(cli::array <System::Byte> ^ source, int sourceIndex, Windows::Storage::Streams::IBuffer ^ destination, System::UInt32 destinationIndex, int count);
[System.CLSCompliant(false)]
public static void CopyTo(this byte[] source, int sourceIndex, Windows.Storage.Streams.IBuffer destination, uint destinationIndex, int count);
[<System.CLSCompliant(false)>]
static member CopyTo : byte[] * int * Windows.Storage.Streams.IBuffer * uint32 * int -> unit
<Extension()>
Public Sub CopyTo (source As Byte(), sourceIndex As Integer, destination As IBuffer, destinationIndex As UInteger, count As Integer)

參數

source
Byte[]

用來複製資料的陣列。

sourceIndex
Int32

索引開始 source 複製資料。

destination
Windows.Storage.Streams.IBuffer

用來複製資料的緩衝區。

destinationIndex
UInt32

索引開始 destination 複製資料到。

count
Int32

要複製的位元組數。

屬性

例外狀況

source 或 destination 為空值。

count, sourceIndex, 或 destinationIndex 小於0(零)。

sourceIndex 大於或等於 的 source長度。 -或-從 開始source的位元組sourceIndex數小count於 。 -或-從 開始複製 count 位元組 destinationIndex會超過 的 destination容量。

適用於

CopyTo(IBuffer, UInt32, Byte[], Int32, Int32)

重要

此 API 不符合 CLS 規範。

從來源緩衝區複製位元組(Windows.Storage.Streams.IBuffer)到目的地陣列,指定來源緩衝區的起始索引、目的陣列的起始索引,以及要複製的位元組數。

public:
[System::Runtime::CompilerServices::Extension]
 static void CopyTo(Windows::Storage::Streams::IBuffer ^ source, System::UInt32 sourceIndex, cli::array <System::Byte> ^ destination, int destinationIndex, int count);
[System.CLSCompliant(false)]
public static void CopyTo(this Windows.Storage.Streams.IBuffer source, uint sourceIndex, byte[] destination, int destinationIndex, int count);
[<System.CLSCompliant(false)>]
static member CopyTo : Windows.Storage.Streams.IBuffer * uint32 * byte[] * int * int -> unit
<Extension()>
Public Sub CopyTo (source As IBuffer, sourceIndex As UInteger, destination As Byte(), destinationIndex As Integer, count As Integer)

參數

source
Windows.Storage.Streams.IBuffer

用來複製資料的緩衝區。

sourceIndex
UInt32

索引開始 source 複製資料。

destination
Byte[]

用來複製資料的陣列。

destinationIndex
Int32

索引開始 destination 複製資料到。

count
Int32

要複製的位元組數。

屬性

例外狀況

source 或 destination 為空值。

count, sourceIndex, 或 destinationIndex 小於0(零)。

sourceIndex 大於或等於 的 source容量。 -或-destinationIndex 大於或等於 的 destination長度。 -或-從 開始source的位元組sourceIndex數小count於 。 -或從 開始複製 count 位元組 destinationIndex,會超過的 destination大小。

適用於

CopyTo(IBuffer, UInt32, IBuffer, UInt32, UInt32)

重要

此 API 不符合 CLS 規範。

從來源緩衝區複製位元組(Windows.Storage.Streams.IBuffer)到目的地緩衝區,指定來源的起始索引、目的地的起始索引,以及要複製的位元組數。

public:
[System::Runtime::CompilerServices::Extension]
 static void CopyTo(Windows::Storage::Streams::IBuffer ^ source, System::UInt32 sourceIndex, Windows::Storage::Streams::IBuffer ^ destination, System::UInt32 destinationIndex, System::UInt32 count);
[System.CLSCompliant(false)]
public static void CopyTo(this Windows.Storage.Streams.IBuffer source, uint sourceIndex, Windows.Storage.Streams.IBuffer destination, uint destinationIndex, uint count);
[<System.CLSCompliant(false)>]
static member CopyTo : Windows.Storage.Streams.IBuffer * uint32 * Windows.Storage.Streams.IBuffer * uint32 * uint32 -> unit
<Extension()>
Public Sub CopyTo (source As IBuffer, sourceIndex As UInteger, destination As IBuffer, destinationIndex As UInteger, count As UInteger)

參數

source
Windows.Storage.Streams.IBuffer

用來複製資料的緩衝區。

sourceIndex
UInt32

索引開始 source 複製資料。

destination
Windows.Storage.Streams.IBuffer

用來複製資料的緩衝區。

destinationIndex
UInt32

索引開始 destination 複製資料到。

count
UInt32

要複製的位元組數。

屬性

例外狀況

source 或 destination 為空值。

count, sourceIndex, 或 destinationIndex 小於0(零)。

sourceIndex 大於或等於 的 source容量。 -或-destinationIndex 大於或等於 的 destination容量。 -或-從 開始source的位元組sourceIndex數小count於 。 -或-從 開始複製 count 位元組 destinationIndex會超過 的 destination容量。

適用於