Share via


DoubleCollection Klasse

Definition

Stellt eine geordnete Auflistung von Double-Werten dar.

public ref class DoubleCollection sealed : IIterable<double>, IVector<double>
/// [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 DoubleCollection final : IIterable<double>, IVector<double>
/// [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 DoubleCollection final : IIterable<double>, IVector<double>
[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 DoubleCollection : IEnumerable<double>, IList<double>
[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 DoubleCollection : IEnumerable<double>, IList<double>
Public NotInheritable Class DoubleCollection
Implements IEnumerable(Of Double), IList(Of Double)
Vererbung
Object Platform::Object IInspectable DoubleCollection
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 DoubleCollection 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<Double> umwandeln. Wenn Sie eine explizite Umwandlung durchführen müssen, z. B. wenn Sie GetEnumerator aufrufen möchten, wandeln Sie mit einer Double-Einschränkung in IEnumerable<T> um.

Konstruktoren

DoubleCollection()

Initialisiert eine neue instance der DoubleCollection-Klasse.

Eigenschaften

Size

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

Methoden

Append(Double)

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, Double[])

Ruft mehrere Elemente in einem einzigen Durchlauf durch den Iterator ab.

GetView()

Ruft eine unveränderliche Ansicht in die Auflistung ab.

IndexOf(Double, UInt32)

Ruft den Index des angegebenen Elements ab.

InsertAt(UInt32, Double)

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

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

SetAt(UInt32, Double)

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

Gilt für:

Weitere Informationen