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 | |
|---|---|---|
![]() |
ReadOnlyDictionary<TKey, TValue> | Initializes a new instance of ReadOnlyDictionary. |
Top
Properties
| Name | Description | |
|---|---|---|
![]() |
Count | Gets the number of items in the dictionary. |
![]() |
Item | Gets the value that is paired to the specified key. |
![]() |
Keys | Gets the collection of keys in the dictionary. |
![]() |
Values | Gets the collection of values in the dictionary. |
Top
Methods
| Name | Description | |
|---|---|---|
![]() |
ContainsKey | Gets a flag that indicates that the specified key occurs in the dictionary. |
![]() |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
![]() |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() |
GetEnumerator | Gets an IEnumerator of the items in the dictionary. |
![]() |
GetHashCode | Serves as the default hash function. (Inherited from Object.) |
![]() |
GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
![]() |
TryGetValue | Gets the value that is paired with the specified key and stores it in value. |
Top
Explicit Interface Implementations
| Name | Description | |
|---|---|---|
![]() ![]() |
ICollection<KeyValuePair<TKey, TValue>>.Add | Adds the specified item to this dictionary. |
![]() ![]() |
IDictionary<TKey, TValue>.Add | Adds the specified key-value pair to this dictionary. |
![]() ![]() |
IDictionary.Add | Adds the specified key-value pair to this dictionary. |
![]() ![]() |
ICollection<KeyValuePair<TKey, TValue>>.Clear | Clears this dictionary. |
![]() ![]() |
IDictionary.Clear | Clears this dictionary. |
![]() ![]() |
ICollection<KeyValuePair<TKey, TValue>>.Contains | Checks whether the specified item is located in this dictionary. |
![]() ![]() |
IDictionary.Contains | Checks whether the specified key is located in this dictionary. |
![]() ![]() |
ICollection<KeyValuePair<TKey, TValue>>.CopyTo | Copies the contents of this dictionary to the specified array at the specified index. |
![]() ![]() |
ICollection.CopyTo | Copies the contents of this dictionary to the specified array, starting at the specified index. |
![]() ![]() |
ICollection<KeyValuePair<TKey, TValue>>.Count | Gets the number of items in this dictionary. |
![]() ![]() |
ICollection.Count | Returns the number of items in the dictionary. |
![]() ![]() |
IDictionary.GetEnumerator | Gets an enumerator instance of this dictionary. |
![]() ![]() |
IEnumerable.GetEnumerator | Gets an IEnumerator instance of this dictionary. |
![]() ![]() |
IDictionary.IsFixedSize | Returns true if the size of the dictionary will not change. |
![]() ![]() |
ICollection<KeyValuePair<TKey, TValue>>.IsReadOnly | Gets a flag that describes whether this dictionary is read-only. |
![]() ![]() |
IDictionary.IsReadOnly | Returns true because this is a read-only dictionary. |
![]() ![]() |
ICollection.IsSynchronized | Returns true if the dictionary is synchronized. |
![]() ![]() |
IDictionary<TKey, TValue>.Item | Gets the value that is related to the specified key in this dictionary. |
![]() ![]() |
IDictionary.Item | Returns the value that is associated with the key in the dictionary. |
![]() ![]() |
IDictionary.Keys | Returns the collection of keys in this dictionary. |
![]() ![]() |
ICollection<KeyValuePair<TKey, TValue>>.Remove | Removes the specified item from this dictionary. |
![]() ![]() |
IDictionary<TKey, TValue>.Remove | Removes the item that has the specified key from this dictionary. |
![]() ![]() |
IDictionary.Remove | Removes the specified key from this dictionary. |
![]() ![]() |
ICollection.SyncRoot | Returns the root synchronization object for the dictionary, if one occurs. |
![]() ![]() |
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.
.gif)
.gif)
.gif)
.gif)
.gif)
.gif)