WindowsRuntimeBufferExtensions.ToArray Método

Definição

Sobrecargas

ToArray(IBuffer)

Retorna uma nova matriz que é criada usando o conteúdo do buffer especificado (Windows.Storage.Streams.IBuffer).Returns a new array that is created from the contents of the specified buffer (Windows.Storage.Streams.IBuffer). O valor da matriz é o valor da propriedade Length do IBuffer.The size of the array is the value of the Length property of the IBuffer.

ToArray(IBuffer, UInt32, Int32)

Retorna uma nova matriz que é criada usando o conteúdo do buffer especificado (Windows.Storage.Streams.IBuffer), começando em um deslocamento especificado e incluindo um número especificado de bytes.Returns a new array that is created from the contents of the specified buffer (Windows.Storage.Streams.IBuffer), starting at a specified offset and including a specified number of bytes.

ToArray(IBuffer)

Importante

Esta API não está em conformidade com CLS.

Retorna uma nova matriz que é criada usando o conteúdo do buffer especificado (Windows.Storage.Streams.IBuffer).Returns a new array that is created from the contents of the specified buffer (Windows.Storage.Streams.IBuffer). O valor da matriz é o valor da propriedade Length do IBuffer.The size of the array is the value of the Length property of the IBuffer.

public:
[System::Runtime::CompilerServices::Extension]
 static cli::array <System::Byte> ^ ToArray(Windows::Storage::Streams::IBuffer ^ source);
[System.CLSCompliant(false)]
public static byte[] ToArray (this Windows.Storage.Streams.IBuffer source);
[<System.CLSCompliant(false)>]
static member ToArray : Windows.Storage.Streams.IBuffer -> byte[]
<Extension()>
Public Function ToArray (source As IBuffer) As Byte()

Parâmetros

source
IBuffer

O buffer cujos conteúdos populam a nova matriz.The buffer whose contents populate the new array.

Retornos

Byte[]

Uma matriz de bytes que contém os bytes no IBuffer especificado, começando no deslocamento 0 (zero) e incluindo um número de bytes igual ao valor da propriedade Length do IBuffer.A byte array that contains the bytes in the specified IBuffer, beginning at offset 0 (zero) and including a number of bytes equal to the value of the Length property of the IBuffer.

Atributos

Exceções

source é nulo.source is null.

Aplica-se a

ToArray(IBuffer, UInt32, Int32)

Importante

Esta API não está em conformidade com CLS.

Retorna uma nova matriz que é criada usando o conteúdo do buffer especificado (Windows.Storage.Streams.IBuffer), começando em um deslocamento especificado e incluindo um número especificado de bytes.Returns a new array that is created from the contents of the specified buffer (Windows.Storage.Streams.IBuffer), starting at a specified offset and including a specified number of bytes.

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

Parâmetros

source
IBuffer

O buffer cujos conteúdos populam a nova matriz.The buffer whose contents populate the new array.

sourceIndex
UInt32

O índice em source do qual começar a copiar dados.The index in source to begin copying data from.

count
Int32

O número de bytes a serem copiados.The number of bytes to copy.

Retornos

Byte[]

Uma matriz de bytes que contém o intervalo especificado de bytes.A byte array that contains the specified range of bytes.

Atributos

Exceções

source é nulo.source is null.

count ou sourceIndex é menor que 0 (zero).count or sourceIndex is less than 0 (zero).

sourceIndex é maior ou igual à capacidade de source.sourceIndex is greater than or equal to the capacity of source. Ou então, o número de bytes em source, começando em sourceIndex, é menor que count.-or-The number of bytes in source, beginning at sourceIndex, is less than count.

Aplica-se a