WindowsRuntimeBufferExtensions.CopyTo Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
CopyTo(Byte[], IBuffer) |
Copies all bytes from the source array to the destination buffer (Windows.Storage.Streams.IBuffer), starting at offset 0 (zero) in both. The method does not update the length of the destination buffer. |
CopyTo(IBuffer, Byte[]) |
Copies all bytes from the source buffer (Windows.Storage.Streams.IBuffer) to the destination array, starting at offset 0 (zero) in both. |
CopyTo(IBuffer, IBuffer) |
Copies all bytes from the source buffer (Windows.Storage.Streams.IBuffer) to the destination buffer, starting at offset 0 (zero) in both. |
CopyTo(Byte[], Int32, IBuffer, UInt32, Int32) |
Copies bytes from the source array to the destination buffer (Windows.Storage.Streams.IBuffer), specifying the starting index in the source array, the starting index in the destination buffer, and the number of bytes to copy. The method does not update the Length property of the destination buffer. |
CopyTo(IBuffer, UInt32, Byte[], Int32, Int32) |
Copies bytes from the source buffer (Windows.Storage.Streams.IBuffer) to the destination array, specifying the starting index in the source buffer, the starting index in the destination array, and the number of bytes to copy. |
CopyTo(IBuffer, UInt32, IBuffer, UInt32, UInt32) |
Copies bytes from the source buffer (Windows.Storage.Streams.IBuffer) to the destination buffer, specifying the starting index in the source, the starting index in the destination, and the number of bytes to copy. |
CopyTo(Byte[], IBuffer)
Important
This API is not CLS-compliant.
Copies all bytes from the source array to the destination buffer (Windows.Storage.Streams.IBuffer), starting at offset 0 (zero) in both. The method does not update the length of the destination buffer.
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)
Parameters
- source
- Byte[]
The array to copy data from.
- destination
- IBuffer
The buffer to copy data to.
- Attributes
Exceptions
source
or destination
is null.
The size of source
exceeds the capacity of destination
.
Applies to
CopyTo(IBuffer, Byte[])
Important
This API is not CLS-compliant.
Copies all bytes from the source buffer (Windows.Storage.Streams.IBuffer) to the destination array, starting at offset 0 (zero) in both.
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())
Parameters
- source
- IBuffer
The buffer to copy data from.
- destination
- Byte[]
The array to copy data to.
- Attributes
Exceptions
source
or destination
is null.
The size of source
exceeds the size of destination
.
Applies to
CopyTo(IBuffer, IBuffer)
Important
This API is not CLS-compliant.
Copies all bytes from the source buffer (Windows.Storage.Streams.IBuffer) to the destination buffer, starting at offset 0 (zero) in both.
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)
Parameters
- source
- IBuffer
The source buffer.
- destination
- IBuffer
The destination buffer.
- Attributes
Exceptions
source
or destination
is null.
The size of source
exceeds the capacity of destination
.
Applies to
CopyTo(Byte[], Int32, IBuffer, UInt32, Int32)
Important
This API is not CLS-compliant.
Copies bytes from the source array to the destination buffer (Windows.Storage.Streams.IBuffer), specifying the starting index in the source array, the starting index in the destination buffer, and the number of bytes to copy. The method does not update the Length property of the destination buffer.
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)
Parameters
- source
- Byte[]
The array to copy data from.
- sourceIndex
- Int32
The index in source
to begin copying data from.
- destination
- IBuffer
The buffer to copy data to.
- destinationIndex
- UInt32
The index in destination
to begin copying data to.
- count
- Int32
The number of bytes to copy.
- Attributes
Exceptions
source
or destination
is null.
count
, sourceIndex
, or destinationIndex
is less than 0 (zero).
sourceIndex
is greater than or equal to the length of source
. -or-The number of bytes in source
, beginning at sourceIndex
, is less than count
. -or-Copying count
bytes, beginning at destinationIndex
, would exceed the capacity of destination
.
Applies to
CopyTo(IBuffer, UInt32, Byte[], Int32, Int32)
Important
This API is not CLS-compliant.
Copies bytes from the source buffer (Windows.Storage.Streams.IBuffer) to the destination array, specifying the starting index in the source buffer, the starting index in the destination array, and the number of bytes to copy.
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)
Parameters
- source
- IBuffer
The buffer to copy data from.
- sourceIndex
- UInt32
The index in source
to begin copying data from.
- destination
- Byte[]
The array to copy data to.
- destinationIndex
- Int32
The index in destination
to begin copying data to.
- count
- Int32
The number of bytes to copy.
- Attributes
Exceptions
source
or destination
is null.
count
, sourceIndex
, or destinationIndex
is less than 0 (zero).
sourceIndex
is greater than or equal to the capacity of source
. -or-destinationIndex
is greater than or equal to the length of destination
. -or-The number of bytes in source
, beginning at sourceIndex
, is less than count
. -or-Copying count
bytes, beginning at destinationIndex
, would exceed the size of destination
.
Applies to
CopyTo(IBuffer, UInt32, IBuffer, UInt32, UInt32)
Important
This API is not CLS-compliant.
Copies bytes from the source buffer (Windows.Storage.Streams.IBuffer) to the destination buffer, specifying the starting index in the source, the starting index in the destination, and the number of bytes to copy.
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)
Parameters
- source
- IBuffer
The buffer to copy data from.
- sourceIndex
- UInt32
The index in source
to begin copying data from.
- destination
- IBuffer
The buffer to copy data to.
- destinationIndex
- UInt32
The index in destination
to begin copying data to.
- count
- UInt32
The number of bytes to copy.
- Attributes
Exceptions
source
or destination
is null.
count
, sourceIndex
, or destinationIndex
is less than 0 (zero).
sourceIndex
is greater than or equal to the capacity of source
. -or-destinationIndex
is greater than or equal to the capacity of destination
. -or-The number of bytes in source
, beginning at sourceIndex
, is less than count
. -or-Copying count
bytes, beginning at destinationIndex
, would exceed the capacity of destination
.