Condividi tramite


WindowsRuntimeBuffer.Create Metodo

Definizione

Overload

Create(Int32)

Restituisce un'interfaccia Windows.Storage.Streams.IBuffer vuota con la capacità massima specificata.

Create(Byte[], Int32, Int32, Int32)

Restituisce un'interfaccia Windows.Storage.Streams.IBuffer che contiene un intervallo specificato di byte copiato da una matrice di byte. Se la capacità specificata è maggiore del numero di byte copiati, il resto del buffer viene riempito con zero.

Create(Int32)

Importante

Questa API non è conforme a CLS.

Restituisce un'interfaccia Windows.Storage.Streams.IBuffer vuota con la capacità massima specificata.

public:
 static Windows::Storage::Streams::IBuffer ^ Create(int capacity);
[System.CLSCompliant(false)]
public static Windows.Storage.Streams.IBuffer Create (int capacity);
[<System.CLSCompliant(false)>]
static member Create : int -> Windows.Storage.Streams.IBuffer
Public Shared Function Create (capacity As Integer) As IBuffer

Parametri

capacity
Int32

Numero massimo di byte che il buffer può contenere.

Restituisce

Interfaccia Windows.Storage.Streams.IBuffer che ha la capacità specificata e una proprietà Length pari a 0 (zero).

Attributi

Eccezioni

capacity è minore di 0 (zero).

Si applica a

Create(Byte[], Int32, Int32, Int32)

Importante

Questa API non è conforme a CLS.

Restituisce un'interfaccia Windows.Storage.Streams.IBuffer che contiene un intervallo specificato di byte copiato da una matrice di byte. Se la capacità specificata è maggiore del numero di byte copiati, il resto del buffer viene riempito con zero.

public:
 static Windows::Storage::Streams::IBuffer ^ Create(cli::array <System::Byte> ^ data, int offset, int length, int capacity);
[System.CLSCompliant(false)]
public static Windows.Storage.Streams.IBuffer Create (byte[] data, int offset, int length, int capacity);
[<System.CLSCompliant(false)>]
static member Create : byte[] * int * int * int -> Windows.Storage.Streams.IBuffer
Public Shared Function Create (data As Byte(), offset As Integer, length As Integer, capacity As Integer) As IBuffer

Parametri

data
Byte[]

Matrice di byte da cui copiare i dati.

offset
Int32

Offset in data da cui iniziare la copia.

length
Int32

Il numero di byte da copiare.

capacity
Int32

Numero massimo di byte che il buffer può contenere; se è maggiore di length, il resto dei byte nel buffer viene inizializzato a 0 (zero).

Restituisce

Interfaccia Windows.Storage.Streams.IBuffer che contiene l'intervallo di byte specificato. Se capacity è maggiore di length, il resto del buffer viene riempito con zero.

Attributi

Eccezioni

capacity, offset o length è minore di 0 (zero).

data è null.

A partire da offset, data non contiene elementi length. -oppure-A partire da offset, data non contiene elementi capacity.

Si applica a