Langage

WindowsRuntimeBuffer.Create Méthode

Définition

Surcharges

Nom Description
Create(Int32)

Retourne un Windows vide. Interface Storage.Streams.IBuffer qui a la capacité maximale spécifiée.

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

Retourne un Windows. Interface Storage.Streams.IBuffer qui contient une plage d’octets spécifiée copiée à partir d’un tableau d’octets. Si la capacité spécifiée est supérieure au nombre d’octets copiés, le reste de la mémoire tampon est rempli à zéro.

Create(Int32)

Important

Cette API n’est pas conforme CLS.

Retourne un Windows vide. Interface Storage.Streams.IBuffer qui a la capacité maximale spécifiée.

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

Paramètres

capacity
Int32

Nombre maximal d’octets que la mémoire tampon peut contenir.

Retours

Windows.Storage.Streams.IBuffer

Un Windows. Interface Storage.Streams.IBuffer qui a la capacité spécifiée et une propriété Length égale à 0 (zéro).

Attributs

Exceptions

capacity est inférieur à 0 (zéro).

S’applique à

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

Important

Cette API n’est pas conforme CLS.

Retourne un Windows. Interface Storage.Streams.IBuffer qui contient une plage d’octets spécifiée copiée à partir d’un tableau d’octets. Si la capacité spécifiée est supérieure au nombre d’octets copiés, le reste de la mémoire tampon est rempli à zéro.

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

Paramètres

data
Byte[]

Tableau d’octets à copier.

offset
Int32

Décalage à data partir duquel la copie commence.

length
Int32

Nombre d’octets à copier.

capacity
Int32

Nombre maximal d’octets que la mémoire tampon peut contenir ; s’il est supérieur lengthà , le reste des octets de la mémoire tampon est initialisé à 0 (zéro).

Retours

Windows.Storage.Streams.IBuffer

Un Windows. Interface Storage.Streams.IBuffer qui contient la plage d’octets spécifiée. Si capacity elle est supérieure lengthà , le reste de la mémoire tampon est rempli à zéro.

Attributs

Exceptions

capacity, offsetou length est inférieur à 0 (zéro).

data a la valeur null.

À partir de offset, data ne contient pas d’éléments length . -ou-Starting at offset, data ne contient pas d’éléments capacity .

S’applique à