﻿<?xml version="1.0" encoding="utf-8"?><Type Name="IDictionary&lt;TKey,TValue&gt;" FullName="System.Collections.Generic.IDictionary&lt;TKey,TValue&gt;"><TypeSignature Language="C#" Value="public interface IDictionary&lt;TKey,TValue&gt; : System.Collections.Generic.ICollection&lt;System.Collections.Generic.KeyValuePair&lt;TKey,TValue&gt;&gt;, System.Collections.Generic.IEnumerable&lt;System.Collections.Generic.KeyValuePair&lt;TKey,TValue&gt;&gt;" /><TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract IDictionary`2&lt;TKey, TValue&gt; implements class System.Collections.Generic.ICollection`1&lt;valuetype System.Collections.Generic.KeyValuePair`2&lt;!TKey, !TValue&gt;&gt;, class System.Collections.Generic.IEnumerable`1&lt;valuetype System.Collections.Generic.KeyValuePair`2&lt;!TKey, !TValue&gt;&gt;, class System.Collections.IEnumerable" /><AssemblyInfo><AssemblyName>mscorlib</AssemblyName><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><TypeParameters><TypeParameter Name="TKey" /><TypeParameter Name="TValue" /></TypeParameters><Interfaces><Interface><InterfaceName>System.Collections.Generic.ICollection&lt;System.Collections.Generic.KeyValuePair&lt;TKey,TValue&gt;&gt;</InterfaceName></Interface><Interface><InterfaceName>System.Collections.Generic.IEnumerable&lt;System.Collections.Generic.KeyValuePair&lt;TKey,TValue&gt;&gt;</InterfaceName></Interface></Interfaces><Docs><typeparam name="TKey">To be added.</typeparam><typeparam name="TValue">To be added.</typeparam><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The <see cref="T:System.Collections.Generic.IDictionary`2" /> interface is the base interface for generic collections of key/value pairs.</para><para>Each element is a key/value pair stored in a <see cref="T:System.Collections.Generic.KeyValuePair`2" /> object.</para><para>Each pair must have a unique key. Implementations can vary in whether they allow <paramref name="key" /> to be null. The value can be null and does not have to be unique. The <see cref="T:System.Collections.Generic.IDictionary`2" /> interface allows the contained keys and values to be enumerated, but it does not imply any particular sort order.</para><para>The foreach statement of the C# language (For Each in Visual Basic, for each in C++) requires the type of each element in the collection. Since each element of the <see cref="T:System.Collections.Generic.IDictionary`2" /> is a key/value pair, the element type is not the type of the key or the type of the value. Instead, the element type is <see cref="T:System.Collections.Generic.KeyValuePair`2" />. For example:</para><para>code reference: Generic.IDictionary#11</para><para>The foreach statement is a wrapper around the enumerator, which only allows reading from, not writing to, the collection.</para><block subset="none" type="note"><para>Because keys can be inherited and their behavior changed, their absolute uniqueness cannot be guaranteed by comparisons using the <see cref="M:System.Type.Equals(System.Object)" /> method. </para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Represents a generic collection of key/value pairs.</para></summary></Docs><Members><Member MemberName="Add"><MemberSignature Language="C#" Value="public void Add (TKey key, TValue value);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Add(!TKey key, !TValue value) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue><Parameters><Parameter Name="key" Type="TKey" /><Parameter Name="value" Type="TValue" /></Parameters><Docs><param name="key">The <see langword="TKey" /> to use as the key of the entry to add.</param><param name="value">The <see langword="TValue" />  to use as the value of the entry to add.</param><summary><para>Adds an entry with the provided key and value to the current instance.</para></summary><remarks><para>You can also use the <see cref="P:System.Collections.Generic.IDictionary&lt;TKey,TValue&gt;.Item(TKey)" /><see langword="(TKey)" /> property to add new elements by setting the value of a key that does not exist in the dictionary. However, if the specified key already exists in the dictionary, setting the  <see cref="P:System.Collections.Generic.IDictionary&lt;TKey,TValue&gt;.Item(TKey)" /><see langword="(TKey)" /> property overwrites the old value. In contrast, the <see cref="M:System.Collections.Generic.IDictionary&lt;TKey,TValue&gt;.Add(TKey,TValue)" /><see langword="(TKey,TValue)" /> method does not modify existing elements.</para><para>Implementations can vary in how they determine equality of objects.</para></remarks><since version=".NET 2.0" /><exception cref="T:System.ArgumentException"><para>An entry with the same key already exists in the current instance.</para></exception><exception cref="T:System.NotSupportedException"><para>The current instance is read-only.</para></exception></Docs></Member><Member MemberName="ContainsKey"><MemberSignature Language="C#" Value="public bool ContainsKey (TKey key);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance bool ContainsKey(!TKey key) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Boolean</ReturnType></ReturnValue><Parameters><Parameter Name="key" Type="TKey" /></Parameters><Docs><param name="key">The key to locate in the current instance.</param><summary><para>Determines whether the current instance contains an entry with the specified key.</para></summary><returns><para><see langword="true" /> if the current instance contains an entry with the key; otherwise, <see langword="false" />.</para></returns><remarks><para>Implementations can vary in how they determine equality of objects.</para></remarks><since version=".NET 2.0" /></Docs></Member><Member MemberName="Item"><MemberSignature Language="C#" Value="public TValue this[TKey key] { get; set; }" /><MemberSignature Language="ILAsm" Value=".property instance !TValue Item(!TKey)" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>TValue</ReturnType></ReturnValue><Parameters><Parameter Name="key" Type="TKey" /></Parameters><Docs><param name="key">The key of the element to get or set.</param><summary><para>Gets or sets the element in the current instance that is associated with the specified key.</para></summary><value><para>The value associated with the given key.</para></value><remarks><para>This property provides the ability to access a specific element in the collection.</para><para>You can also use the <see cref="P:System.Collections.Generic.IDictionary&lt;TKey,TValue&gt;.Item(TKey)" /><see langword="(TKey)" /> property to add new elements by setting the value of a key that does not exist in the dictionary. However, if the specified key already exists in the dictionary, setting the  <see cref="P:System.Collections.Generic.IDictionary&lt;TKey,TValue&gt;.Item(TKey)" /><see langword="(TKey)" /> property overwrites the old value. In contrast, the <see cref="M:System.Collections.Generic.IDictionary&lt;TKey,TValue&gt;.Add(TKey,TValue)" /><see langword="(TKey,TValue)" /> method does not modify existing elements.</para><para>Implementations can vary in how they determine equality of objects.</para></remarks><since version=".NET 2.0" /><exception cref="T:System.ArgumentException"><para>The property is read but <paramref name="key" /> is not found.</para></exception><exception cref="T:System.NotSupportedException"><para>The property is set and the current instance is read-only.</para></exception></Docs></Member><Member MemberName="Keys"><MemberSignature Language="C#" Value="public System.Collections.Generic.ICollection&lt;TKey&gt; Keys { get; }" /><MemberSignature Language="ILAsm" Value=".property instance class System.Collections.Generic.ICollection`1&lt;!TKey&gt; Keys" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Collections.Generic.ICollection&lt;TKey&gt;</ReturnType></ReturnValue><Docs><value><para>A collection containing the keys of the current instance. </para></value><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The order of the keys in the returned <see cref="T:System.Collections.Generic.ICollection`1" /> is unspecified, but it is guaranteed to be the same order as the corresponding values in the <see cref="T:System.Collections.Generic.ICollection`1" /> returned by the <see cref="P:System.Collections.Generic.IDictionary`2.Values" /> property.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets an <see cref="T:System.Collections.Generic.ICollection`1" /> containing the keys of the <see cref="T:System.Collections.Generic.IDictionary`2" />.</para></summary></Docs></Member><Member MemberName="Remove"><MemberSignature Language="C#" Value="public bool Remove (TKey key);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance bool Remove(!TKey key) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Boolean</ReturnType></ReturnValue><Parameters><Parameter Name="key" Type="TKey" /></Parameters><Docs><param name="key">The key of the entry to remove.</param><summary><para>Removes the entry with the specified key from the current instance.</para></summary><returns><para><see langword="true" />  if the element is successfully removed; otherwise, <see langword="false" />.<block subset="none" type="note"><para>This method also returns <see langword="false" /> if <paramref name="key" /> was not found.</para></block></para></returns><remarks><para>Implementations can vary in how they determine equality of objects.</para></remarks><since version=".NET 2.0" /><exception cref="T:System.NotSupportedException"><para>The current instance is read-only.</para></exception></Docs></Member><Member MemberName="TryGetValue"><MemberSignature Language="C#" Value="public bool TryGetValue (TKey key, out TValue value);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance bool TryGetValue(!TKey key, !TValue value) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Boolean</ReturnType></ReturnValue><Parameters><Parameter Name="key" Type="TKey" /><Parameter Name="value" Type="TValue&amp;" RefType="out" /></Parameters><Docs><param name="key">To be added.</param><param name="value">To be added.</param><summary>To be added.</summary><returns>To be added.</returns><remarks>To be added.</remarks><since version=".NET 2.0" /></Docs></Member><Member MemberName="Values"><MemberSignature Language="C#" Value="public System.Collections.Generic.ICollection&lt;TValue&gt; Values { get; }" /><MemberSignature Language="ILAsm" Value=".property instance class System.Collections.Generic.ICollection`1&lt;!TValue&gt; Values" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Collections.Generic.ICollection&lt;TValue&gt;</ReturnType></ReturnValue><Docs><value><para>A collection containing the values in the current instance.</para></value><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The order of the values in the returned <see cref="T:System.Collections.Generic.ICollection`1" /> is unspecified, but it is guaranteed to be the same order as the corresponding keys in the <see cref="T:System.Collections.Generic.ICollection`1" /> returned by the <see cref="P:System.Collections.Generic.IDictionary`2.Keys" /> property.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets an <see cref="T:System.Collections.Generic.ICollection`1" /> containing the values in the <see cref="T:System.Collections.Generic.IDictionary`2" />.</para></summary></Docs></Member></Members></Type>