WindowsRuntimeBufferExtensions.CopyTo 方法

定义

重载

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
IBuffer

向其复制数据的缓冲区。

属性

例外

sourcedestination 为 null。

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
IBuffer

从中复制数据的缓冲区。

destination
Byte[]

向其复制数据的数组。

属性

例外

sourcedestination 为 null。

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
IBuffer

源缓冲区。

destination
IBuffer

目标缓冲区。

属性

例外

sourcedestination 为 null。

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
IBuffer

向其复制数据的缓冲区。

destinationIndex
UInt32

destination 中开始向其复制数据的索引。

count
Int32

要复制的字节数。

属性

例外

sourcedestination 为 null。

countsourceIndexdestinationIndex 小于 0(零)。

sourceIndex 大于或等于 source 的长度。 -或-sourceIndex 中自 source 开始的字节数小于 count。 -或-从 destinationIndex 开始复制 count 字节将超出 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
IBuffer

从中复制数据的缓冲区。

sourceIndex
UInt32

source 中从其开始复制数据的索引。

destination
Byte[]

向其复制数据的数组。

destinationIndex
Int32

destination 中开始向其复制数据的索引。

count
Int32

要复制的字节数。

属性

例外

sourcedestination 为 null。

countsourceIndexdestinationIndex 小于 0(零)。

sourceIndex 大于或等于 source 的容量。 -或-destinationIndex 大于或等于 destination 的长度。 -或-sourceIndex 中自 source 开始的字节数小于 count。 -或-从 destinationIndex 开始复制 count 字节将超出 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
IBuffer

从中复制数据的缓冲区。

sourceIndex
UInt32

source 中从其开始复制数据的索引。

destination
IBuffer

向其复制数据的缓冲区。

destinationIndex
UInt32

destination 中开始向其复制数据的索引。

count
UInt32

要复制的字节数。

属性

例外

sourcedestination 为 null。

countsourceIndexdestinationIndex 小于 0(零)。

sourceIndex 大于或等于 source 的容量。 -或-destinationIndex 大于或等于 destination 的容量。 -或-sourceIndex 中自 source 开始的字节数小于 count。 -或-从 destinationIndex 开始复制 count 字节将超出 destination 的容量。

适用于