SortedDictionary<TKey,TValue>.KeyCollection Constructeur
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Initialise une nouvelle instance de la classe SortedDictionary<TKey,TValue>.KeyCollection qui reflète les clés dans le SortedDictionary<TKey,TValue> spécifié.
public:
KeyCollection(System::Collections::Generic::SortedDictionary<TKey, TValue> ^ dictionary);
public KeyCollection (System.Collections.Generic.SortedDictionary<TKey,TValue> dictionary);
new System.Collections.Generic.SortedDictionary<'Key, 'Value>.KeyCollection : System.Collections.Generic.SortedDictionary<'Key, 'Value> -> System.Collections.Generic.SortedDictionary<'Key, 'Value>.KeyCollection
Public Sub New (dictionary As SortedDictionary(Of TKey, TValue))
Paramètres
- dictionary
- SortedDictionary<TKey,TValue>
SortedDictionary<TKey,TValue> dont les clés sont reflétées dans le nouveau SortedDictionary<TKey,TValue>.KeyCollection.
Exceptions
dictionary
a la valeur null
.
Remarques
n’est SortedDictionary<TKey,TValue>.KeyCollection pas une copie statique ; au lieu de cela, le SortedDictionary<TKey,TValue>.KeyCollection fait référence aux clés dans l’original SortedDictionary<TKey,TValue>. Par conséquent, les modifications apportées au SortedDictionary<TKey,TValue> continuent d’être reflétées dans .SortedDictionary<TKey,TValue>.KeyCollection
Ce constructeur est une opération O(1).
S’applique à
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de l’année 2024, nous abandonnerons progressivement le mécanisme de retour d’information GitHub Issues pour le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultez :Soumettre et afficher des commentaires pour