WindowsRuntimeBufferExtensions.ToArray Metodo

Definizione

Overload

Nome Descrizione
ToArray(IBuffer)

Restituisce una nuova matrice creata dal contenuto del buffer specificato (Windows. Storage.Streams.IBuffer). La dimensione della matrice è il valore della proprietà Length di IBuffer.

ToArray(IBuffer, UInt32, Int32)

Restituisce una nuova matrice creata dal contenuto del buffer specificato (Windows. Storage.Streams.IBuffer), a partire da un offset specificato e incluso un numero specificato di byte.

ToArray(IBuffer)

Importante

Questa API non è conforme a CLS.

Restituisce una nuova matrice creata dal contenuto del buffer specificato (Windows. Storage.Streams.IBuffer). La dimensione della matrice è il valore della proprietà Length di 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()

Parametri

source
IBuffer

Buffer il cui contenuto popola la nuova matrice.

Valori restituiti

Byte[]

Matrice di byte che contiene i byte nell'oggetto IBuffer specificato, a partire dall'offset 0 (zero) e che include un numero di byte uguale al valore della proprietà Length di IBuffer.

Attributi

Eccezioni

source è null.

Si applica a

ToArray(IBuffer, UInt32, Int32)

Importante

Questa API non è conforme a CLS.

Restituisce una nuova matrice creata dal contenuto del buffer specificato (Windows. Storage.Streams.IBuffer), a partire da un offset specificato e incluso un numero specificato di byte.

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()

Parametri

source
IBuffer

Buffer il cui contenuto popola la nuova matrice.

sourceIndex
UInt32

Indice in source da cui iniziare la copia dei dati.

count
Int32

Numero di byte da copiare.

Valori restituiti

Byte[]

Matrice di byte contenente l'intervallo di byte specificato.

Attributi

Eccezioni

source è null.

count o sourceIndex è minore di 0 (zero).

sourceIndex è maggiore o uguale alla capacità di source. -oppure-Il numero di byte in source, a partire da sourceIndex, è minore di count.

Si applica a