Share via


PointCollection Klasse

Definition

Stellt eine Auflistung von Punktwerten dar, auf die vom Index einzeln zugegriffen werden kann.

public ref class PointCollection sealed : IIterable<Point>, IVector<Point>
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [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 PointCollection final : IIterable<Point>, IVector<Point>
/// [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)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
class PointCollection final : IIterable<Point>, IVector<Point>
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[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 PointCollection : IEnumerable<Point>, IList<Point>
[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)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
public sealed class PointCollection : IEnumerable<Point>, IList<Point>
Public NotInheritable Class PointCollection
Implements IEnumerable(Of Point), IList(Of Point)
<object property="oneOrMorePoints"/>
Vererbung
Object Platform::Object IInspectable PointCollection
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

Eine PointCollection ist aufzählbar, sodass Sie sprachspezifische Syntax wie foreach in C# verwenden können, um die Elemente in der Auflistung aufzulisten. Der Compiler führt die Typumwandlung für Sie durch, und Sie müssen nicht explizit in IEnumerable<Point> umgewandelt werden. Wenn Sie eine explizite Umwandlung durchführen müssen, z. B. wenn Sie GetEnumerator aufrufen möchten, wandeln Sie mit einer Point-Einschränkung in IEnumerable<T> um.

Konstruktoren

PointCollection()

Initialisiert eine neue instance der PointCollection-Klasse.

Eigenschaften

Size

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

Methoden

Append(Point)

Fügt der Auflistung ein neues Element hinzu.

Clear()

Entfernt alle Elemente aus der Auflistung.

First()

Gibt einen Iterator für die Elemente in der Auflistung zurück.

GetAt(UInt32)

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

GetMany(UInt32, Point[])

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

GetView()

Ruft eine unveränderliche Ansicht in die Auflistung ab.

IndexOf(Point, UInt32)

Ruft den Index des angegebenen Elements ab.

InsertAt(UInt32, Point)

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(Point[])

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

SetAt(UInt32, Point)

Legt den Wert am angegebenen Index auf den angegebenen Point-Wert fest.

Gilt für:

Weitere Informationen