Share via


BlockCollection Klasse

Definition

Stellt eine Auflistung von Block-Elementen dar.

public ref class BlockCollection sealed : IIterable<Block ^>, IVector<Block ^>
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class BlockCollection final : IIterable<Block>, IVector<Block>
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class BlockCollection final : IIterable<Block>, IVector<Block>
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class BlockCollection : IEnumerable<Block>, IList<Block>
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class BlockCollection : IEnumerable<Block>, IList<Block>
Public NotInheritable Class BlockCollection
Implements IEnumerable(Of Block), IList(Of Block)
Vererbung
Object Platform::Object IInspectable BlockCollection
Attribute
Implementiert

Windows-Anforderungen

Gerätefamilie
Windows 10 (eingeführt in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (eingeführt in v1.0)

Hinweise

Auflisten der Sammlung in C# oder Microsoft Visual Basic

Sie können ein BlockCollection-Objekt in C# oder Microsoft Visual Basic durchlaufen. In vielen Fällen, z. B. mithilfe der foreach-Syntax , führt der Compiler diese Umwandlung für Sie durch, und Sie müssen nicht explizit in IEnumerable<Block> umgewandelt werden. Wenn Sie eine explizite Umwandlung durchführen müssen, z. B. wenn Sie GetEnumerator aufrufen möchten, wandeln Sie das Auflistungsobjekt mit einer Block-Einschränkung in IEnumerable<T> um.

Eigenschaften

Size

Ruft die Größe (Anzahl) der Auflistung ab.

Methoden

Append(Block)

Fügt der Auflistung ein neues Element hinzu.

Clear()

Entfernt alle Elemente aus der Auflistung.

First()

Gibt den Iterator für die Iteration über die Elemente in der Auflistung zurück.

GetAt(UInt32)

Gibt das Element zurück, das sich am angegebenen Index befindet.

GetMany(UInt32, Block[])

Ruft mehrere Elemente in einem einzelnen Durchgang durch den Iterator ab.

GetView()

Ruft eine unveränderliche Ansicht in die Auflistung ab.

IndexOf(Block, UInt32)

Ruft den Index des angegebenen Elements ab.

InsertAt(UInt32, Block)

Fügt das angegebene Element am angegebenen Index ein.

RemoveAt(UInt32)

Entfernt das Element am angegebenen Index.

RemoveAtEnd()

Entfernt das letzte Element in der Auflistung.

ReplaceAll(Block[])

Löscht zunächst die Auflistung und fügt dann das bereitgestellte Array als neue Elemente ein.

SetAt(UInt32, Block)

Legt den Wert am angegebenen Index auf den angegebenen Blockwert fest.

Gilt für:

Weitere Informationen