Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
A read-only version of IDictionary<TKey, TValue>.
Inheritance Hierarchy
System.Object
  Microsoft.TeamFoundation.Client.ReadOnlyDictionary<TKey, TValue>
Namespace:  Microsoft.TeamFoundation.Client
Assembly:  Microsoft.TeamFoundation.Client (in Microsoft.TeamFoundation.Client.dll)
Syntax
'Declaration
Public Class ReadOnlyDictionary(Of TKey, TValue) _
    Implements IDictionary(Of TKey, TValue), ICollection(Of KeyValuePair(Of TKey, TValue)),  _
    IEnumerable(Of KeyValuePair(Of TKey, TValue)), IEnumerable,  _
    IDictionary, ICollection
public class ReadOnlyDictionary<TKey, TValue> : IDictionary<TKey, TValue>, 
    ICollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, 
    IEnumerable, IDictionary, ICollection
generic<typename TKey, typename TValue>
public ref class ReadOnlyDictionary : IDictionary<TKey, TValue>, 
    ICollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, 
    IEnumerable, IDictionary, ICollection
type ReadOnlyDictionary<'TKey, 'TValue> =  
    class 
        interface IDictionary<'TKey, 'TValue>
        interface ICollection<KeyValuePair<'TKey, 'TValue>>
        interface IEnumerable<KeyValuePair<'TKey, 'TValue>>
        interface IEnumerable 
        interface IDictionary 
        interface ICollection 
    end
JScript does not support generic types or methods.
Type Parameters
- TKey
 The type of the key.
- TValue
 The type of the value.
The ReadOnlyDictionary<TKey, TValue> type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| .gif) | ReadOnlyDictionary<TKey, TValue> | Initializes a new instance of ReadOnlyDictionary. | 
Top
Properties
| Name | Description | |
|---|---|---|
| .gif) | Count | Gets the number of items in the dictionary. | 
| .gif) | Item | Gets the value that is paired to the specified key. | 
| .gif) | Keys | Gets the collection of keys in the dictionary. | 
| .gif) | Values | Gets the collection of values in the dictionary. | 
Top
Methods
| Name | Description | |
|---|---|---|
| .gif) | ContainsKey | Gets a flag that indicates that the specified key occurs in the dictionary. | 
| .gif) | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | 
| .gif) | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | 
| .gif) | GetEnumerator | Gets an IEnumerator of the items in the dictionary. | 
| .gif) | GetHashCode | Serves as the default hash function. (Inherited from Object.) | 
| .gif) | GetType | Gets the Type of the current instance. (Inherited from Object.) | 
| .gif) | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | 
| .gif) | ToString | Returns a string that represents the current object. (Inherited from Object.) | 
| .gif) | TryGetValue | Gets the value that is paired with the specified key and stores it in value. | 
Top
Explicit Interface Implementations
| Name | Description | |
|---|---|---|
| .gif) .gif) | ICollection<KeyValuePair<TKey, TValue>>.Add | Adds the specified item to this dictionary. | 
| .gif) .gif) | IDictionary<TKey, TValue>.Add | Adds the specified key-value pair to this dictionary. | 
| .gif) .gif) | IDictionary.Add | Adds the specified key-value pair to this dictionary. | 
| .gif) .gif) | ICollection<KeyValuePair<TKey, TValue>>.Clear | Clears this dictionary. | 
| .gif) .gif) | IDictionary.Clear | Clears this dictionary. | 
| .gif) .gif) | ICollection<KeyValuePair<TKey, TValue>>.Contains | Checks whether the specified item is located in this dictionary. | 
| .gif) .gif) | IDictionary.Contains | Checks whether the specified key is located in this dictionary. | 
| .gif) .gif) | ICollection<KeyValuePair<TKey, TValue>>.CopyTo | Copies the contents of this dictionary to the specified array at the specified index. | 
| .gif) .gif) | ICollection.CopyTo | Copies the contents of this dictionary to the specified array, starting at the specified index. | 
| .gif) .gif) | ICollection<KeyValuePair<TKey, TValue>>.Count | Gets the number of items in this dictionary. | 
| .gif) .gif) | ICollection.Count | Returns the number of items in the dictionary. | 
| .gif) .gif) | IDictionary.GetEnumerator | Gets an enumerator instance of this dictionary. | 
| .gif) .gif) | IEnumerable.GetEnumerator | Gets an IEnumerator instance of this dictionary. | 
| .gif) .gif) | IDictionary.IsFixedSize | Returns true if the size of the dictionary will not change. | 
| .gif) .gif) | ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly | Gets a flag that describes whether this dictionary is read-only. | 
| .gif) .gif) | IDictionary.IsReadOnly | Returns true because this is a read-only dictionary. | 
| .gif) .gif) | ICollection.IsSynchronized | Returns true if the dictionary is synchronized. | 
| .gif) .gif) | IDictionary<TKey, TValue>.Item | Gets the value that is related to the specified key in this dictionary. | 
| .gif) .gif) | IDictionary.Item | Returns the value that is associated with the key in the dictionary. | 
| .gif) .gif) | IDictionary.Keys | Returns the collection of keys in this dictionary. | 
| .gif) .gif) | ICollection<KeyValuePair<TKey, TValue>>.Remove | Removes the specified item from this dictionary. | 
| .gif) .gif) | IDictionary<TKey, TValue>.Remove | Removes the item that has the specified key from this dictionary. | 
| .gif) .gif) | IDictionary.Remove | Removes the specified key from this dictionary. | 
| .gif) .gif) | ICollection.SyncRoot | Returns the root synchronization object for the dictionary, if one occurs. | 
| .gif) .gif) | IDictionary.Values | Returns the collection of values in this dictionary. | 
Top
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.