WindowsRuntimeBufferExtensions.CopyTo 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| 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 为 null。
超出容量的大小sourcedestination。
适用于
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 为 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
- Windows.Storage.Streams.IBuffer
源缓冲区。
- destination
- Windows.Storage.Streams.IBuffer
目标缓冲区。
- 属性
例外
source 或 destination 为 null。
超出容量的大小sourcedestination。
适用于
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 为 null。
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 为 null。
count、 sourceIndex或 destinationIndex 小于 0(零)。
sourceIndex 大于或等于其容量 source。 -or-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 为 null。
count、 sourceIndex或 destinationIndex 小于 0(零)。
sourceIndex 大于或等于其容量 source。 -or-destinationIndex 大于或等于其容量 destination。 -或-以字节数开头的字节source数小于sourceIndex。count -或-复制 count 字节,从头 destinationIndex开始,将超过容量 destination。