DoubleCollection Classe

Définition

Représente une collection ordonnée de valeurs Double .

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)
Héritage
Object Platform::Object IInspectable DoubleCollection
Attributs
Implémente

Configuration requise pour Windows

Famille d’appareils
Windows 10 (introduit dans 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduit dans v1.0)

Remarques

Énumération de la collection en C# ou Microsoft Visual Basic

Une DoubleCollection étant énumérable, vous pouvez utiliser une syntaxe spécifique au langage, telle que foreach en C# pour énumérer les éléments de la collection. Le compilateur effectue le casting de type pour vous et vous n’aurez pas besoin de caster IEnumerable<Double> explicitement. Si vous avez besoin d’un cast explicite, par exemple si vous souhaitez appeler GetEnumerator, effectuez un cast en IEnumerable<T> avec une contrainte Double .

Constructeurs

DoubleCollection()

Initialise une nouvelle instance de la classe DoubleCollection.

Propriétés

Size

Obtient la taille (nombre) de la collection.

Méthodes

Append(Double)

Ajoute un nouvel élément à la collection.

Clear()

Supprime tous les éléments de la collection.

First()

Retourne un itérateur pour les éléments de la collection.

GetAt(UInt32)

Retourne l’élément situé à l’index spécifié.

GetMany(UInt32, Double[])

Récupère plusieurs éléments en un seul passage par l’itérateur.

GetView()

Obtient une vue immuable dans la collection.

IndexOf(Double, UInt32)

Récupère l’index de l’élément spécifié.

InsertAt(UInt32, Double)

Insère l’élément spécifié à l’index spécifié.

RemoveAt(UInt32)

Supprime l'élément à l'index spécifié.

RemoveAtEnd()

Supprime le dernier élément de la collection.

ReplaceAll(Double[])

Efface initialement la collection, puis insère le tableau fourni en tant que nouveaux éléments.

SetAt(UInt32, Double)

Définit la valeur à l’index spécifié sur la valeur Double spécifiée.

S’applique à

Voir aussi