Поделиться через


Интерфейс IReadOnlyDictionary<K, T>

Defines properties and methods for the generic type read-only collection of key/value pairs.

Пространство имен:  Microsoft.SqlServer.Management.Sdk.Sfc
Сборка:  Microsoft.SqlServer.Management.Sdk.Sfc (в Microsoft.SqlServer.Management.Sdk.Sfc.dll)

Синтаксис

'Декларация
Public Interface IReadOnlyDictionary(Of K, T) _
    Inherits IReadOnlyCollection(Of T), IReadOnlyCollection, IEnumerable(Of T),  _
    IEnumerable
'Применение
Dim instance As IReadOnlyDictionary(Of K, T)
public interface IReadOnlyDictionary<K, T> : IReadOnlyCollection<T>, 
    IReadOnlyCollection, IEnumerable<T>, IEnumerable
generic<typename K, typename T>
public interface class IReadOnlyDictionary : IReadOnlyCollection<T>, 
    IReadOnlyCollection, IEnumerable<T>, IEnumerable
type IReadOnlyDictionary<'K, 'T> =  
    interface 
        interface IReadOnlyCollection<'T>
        interface IReadOnlyCollection 
        interface IEnumerable<'T>
        interface IEnumerable 
    end
JScript не поддерживает стандартные типы и методы.

Параметры типа

  • K
    The type of keys in the dictionary.
  • T
    The type of values in the dictionary.

Тип IReadOnlyDictionary<K, T> обеспечивает доступ к следующим элементам.

Свойства

  Имя Описание
Открытое свойство Count Gets the number of items that are contained in the collection. (Производный от IReadOnlyCollection.)
Открытое свойство Item Gets the value associated with the specified key.
Открытое свойство Keys Gets the enumeration object containing the keys of the dictionary.
Открытое свойство Values Gets the enumeration object containing the values of the dictionary.

В начало

Методы

  Имя Описание
Открытый метод Contains Determines whether the specified item is contained in the collection. (Производный от IReadOnlyCollection<T>.)
Открытый метод ContainsKey Determines whether the element with the specified key is contained in the dictionary.
Открытый метод CopyTo Copies the elements of the collection to the specified array, starting at a particular array index. (Производный от IReadOnlyCollection<T>.)
Открытый метод GetEnumerator (Производный от IEnumerable<T>.)
Открытый метод TryGetValue Gets the value associated with the specified key.

В начало

См. также

Справочник

Пространство имен Microsoft.SqlServer.Management.Sdk.Sfc