IReadOnlyDictionary<TKey,TValue>.Keys 属性

定义

获取包含只读字典中的密钥的可枚举集合。Gets an enumerable collection that contains the keys in the read-only dictionary.

public:
 property System::Collections::Generic::IEnumerable<TKey> ^ Keys { System::Collections::Generic::IEnumerable<TKey> ^ get(); };
public System.Collections.Generic.IEnumerable<TKey> Keys { get; }
member this.Keys : seq<'Key>
Public ReadOnly Property Keys As IEnumerable(Of TKey)

属性值

IEnumerable<TKey>

包含只读字典中的密钥的可枚举集合。An enumerable collection that contains the keys in the read-only dictionary.

注解

可枚举集合中键的顺序是未指定的,但实现必须保证键的顺序与 Values 属性返回的可枚举集合中对应值的顺序相同。The order of the keys in the enumerable collection is unspecified, but the implementation must guarantee that the keys are in the same order as the corresponding values in the enumerable collection that is returned by the Values property.

适用于