This documentation is archived and is not being maintained.

ReadOnlyDictionary<TKey, TValue> Class

A read-only version of IDictionary<TKey, TValue>.

System::Object
  Microsoft.TeamFoundation.Client::ReadOnlyDictionary<TKey, TValue>

Namespace:  Microsoft.TeamFoundation.Client
Assembly:  Microsoft.TeamFoundation.Client (in Microsoft.TeamFoundation.Client.dll)

generic<typename TKey, typename TValue>
public ref class ReadOnlyDictionary : IDictionary<TKey, TValue>, 
	ICollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, 
	IEnumerable, IDictionary, ICollection

Type Parameters

TKey

The type of the key.

TValue

The type of the value.

The ReadOnlyDictionary<TKey, TValue> type exposes the following members.

  NameDescription
Public methodReadOnlyDictionary<TKey, TValue>Initializes a new instance of ReadOnlyDictionary.
Top

  NameDescription
Public propertyCountGets the number of items in the dictionary.
Public propertyItemGets the value that is paired to the specified key.
Public propertyKeysGets the collection of keys in the dictionary.
Public propertyValuesGets the collection of values in the dictionary.
Top

  NameDescription
Public methodContainsKeyGets a flag that indicates that the specified key occurs in the dictionary.
Public methodEqualsDetermines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetEnumeratorGets an IEnumerator of the items in the dictionary.
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Public methodTryGetValueGets the value that is paired with the specified key and stores it in value.
Top

  NameDescription
Explicit interface implemetationPrivate methodICollection<KeyValuePair<TKey, TValue>>::AddAdds the specified item to this dictionary.
Explicit interface implemetationPrivate methodIDictionary<TKey, TValue>::AddAdds the specified key-value pair to this dictionary.
Explicit interface implemetationPrivate methodIDictionary::AddAdds the specified key-value pair to this dictionary.
Explicit interface implemetationPrivate methodICollection<KeyValuePair<TKey, TValue>>::ClearClears this dictionary.
Explicit interface implemetationPrivate methodIDictionary::ClearClears this dictionary.
Explicit interface implemetationPrivate methodICollection<KeyValuePair<TKey, TValue>>::ContainsChecks whether the specified item is located in this dictionary.
Explicit interface implemetationPrivate methodIDictionary::ContainsChecks whether the specified key is located in this dictionary.
Explicit interface implemetationPrivate methodICollection<KeyValuePair<TKey, TValue>>::CopyToCopies the contents of this dictionary to the specified array at the specified index.
Explicit interface implemetationPrivate methodICollection::CopyToCopies the contents of this dictionary to the specified array, starting at the specified index.
Explicit interface implemetationPrivate propertyICollection<KeyValuePair<TKey, TValue>>::CountGets the number of items in this dictionary.
Explicit interface implemetationPrivate propertyICollection::CountReturns the number of items in the dictionary.
Explicit interface implemetationPrivate methodIDictionary::GetEnumeratorGets an enumerator instance of this dictionary.
Explicit interface implemetationPrivate methodIEnumerable::GetEnumeratorGets an IEnumerator instance of this dictionary.
Explicit interface implemetationPrivate propertyIDictionary::IsFixedSizeReturns true if the size of the dictionary will not change.
Explicit interface implemetationPrivate propertyICollection<KeyValuePair<TKey, TValue>>::IsReadOnlyGets a flag that describes whether this dictionary is read-only.
Explicit interface implemetationPrivate propertyIDictionary::IsReadOnlyReturns true because this is a read-only dictionary.
Explicit interface implemetationPrivate propertyICollection::IsSynchronizedReturns true if the dictionary is synchronized.
Explicit interface implemetationPrivate propertyIDictionary<TKey, TValue>::ItemGets the value that is related to the specified key in this dictionary.
Explicit interface implemetationPrivate propertyIDictionary::ItemReturns the value that is associated with the key in the dictionary.
Explicit interface implemetationPrivate propertyIDictionary::KeysReturns the collection of keys in this dictionary.
Explicit interface implemetationPrivate methodICollection<KeyValuePair<TKey, TValue>>::RemoveRemoves the specified item from this dictionary.
Explicit interface implemetationPrivate methodIDictionary<TKey, TValue>::RemoveRemoves the item that has the specified key from this dictionary.
Explicit interface implemetationPrivate methodIDictionary::RemoveRemoves the specified key from this dictionary.
Explicit interface implemetationPrivate propertyICollection::SyncRootReturns the root synchronization object for the dictionary, if one occurs.
Explicit interface implemetationPrivate propertyIDictionary::ValuesReturns the collection of values in this dictionary.
Top

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show: