You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// <summary>Gets or sets the value associated with the specified key.</summary>
360
360
/// <param name="key">The key of the value to get or set.</param>
361
361
/// <returns>The value associated with the specified key. If the specified key is not found, a get operation throws a <see cref="KeyNotFoundException"/>, and a set operation creates a new element with the specified key.</returns>
362
-
/// <exception cref="ArgumentNullException"><paramref name="key"/> is null.</exception>
362
+
/// <exception cref="ArgumentNullException"><paramref name="key"/> is <see langword="null"/>.</exception>
363
363
/// <exception cref="KeyNotFoundException">The property is retrieved and <paramref name="key"/> does not exist in the collection.</exception>
364
364
/// <remarks>Setting the value of an existing key does not impact its order in the collection.</remarks>
/// <summary>Adds the specified key and value to the dictionary.</summary>
481
481
/// <param name="key">The key of the element to add.</param>
482
-
/// <param name="value">The value of the element to add. The value can be null for reference types.</param>
483
-
/// <exception cref="ArgumentNullException">key is null.</exception>
482
+
/// <param name="value">The value of the element to add. The value can be <see langword="null"/> for reference types.</param>
483
+
/// <exception cref="ArgumentNullException"><paramref name="key"/> is <see langword="null"/>.</exception>
484
484
/// <exception cref="ArgumentException">An element with the same key already exists in the <see cref="OrderedDictionary{TKey, TValue}"/>.</exception>
485
485
publicvoidAdd(TKeykey,TValuevalue)
486
486
{
@@ -491,17 +491,17 @@ public void Add(TKey key, TValue value)
491
491
492
492
/// <summary>Adds the specified key and value to the dictionary if the key doesn't already exist.</summary>
493
493
/// <param name="key">The key of the element to add.</param>
494
-
/// <param name="value">The value of the element to add. The value can be null for reference types.</param>
495
-
/// <exception cref="ArgumentNullException">key is null.</exception>
496
-
/// <returns>true if the key didn't exist and the key and value were added to the dictionary; otherwise, false.</returns>
494
+
/// <param name="value">The value of the element to add. The value can be <see langword="null"/> for reference types.</param>
495
+
/// <exception cref="ArgumentNullException"><paramref name="key"/> is <see langword="null"/>.</exception>
496
+
/// <returns><see langword="true"/> if the key didn't exist and the key and value were added to the dictionary; otherwise, <see langword="false"/>.</returns>
/// <summary>Adds the specified key and value to the dictionary if the key doesn't already exist.</summary>
500
500
/// <param name="key">The key of the element to add.</param>
501
-
/// <param name="value">The value of the element to add. The value can be null for reference types.</param>
501
+
/// <param name="value">The value of the element to add. The value can be <see langword="null"/> for reference types.</param>
502
502
/// <param name="index">The index of the added or existing <paramref name="key"/>. This is always a valid index into the dictionary.</param>
503
-
/// <exception cref="ArgumentNullException">key is null.</exception>
504
-
/// <returns>true if the key didn't exist and the key and value were added to the dictionary; otherwise, false.</returns>
503
+
/// <exception cref="ArgumentNullException"><paramref name="key"/> is <see langword="null"/>.</exception>
504
+
/// <returns><see langword="true"/> if the key didn't exist and the key and value were added to the dictionary; otherwise, <see langword="false"/>.</returns>
505
505
publicboolTryAdd(TKeykey,TValuevalue,outintindex)
506
506
{
507
507
ThrowIfNull(key);
@@ -546,12 +546,13 @@ public void Clear()
546
546
547
547
/// <summary>Determines whether the <see cref="OrderedDictionary{TKey, TValue}"/> contains the specified key.</summary>
548
548
/// <param name="key">The key to locate in the <see cref="OrderedDictionary{TKey, TValue}"/>.</param>
549
-
/// <returns>true if the <see cref="OrderedDictionary{TKey, TValue}"/> contains an element with the specified key; otherwise, false.</returns>
549
+
/// <returns><see langword="true"/> if the <see cref="OrderedDictionary{TKey, TValue}"/> contains an element with the specified key; otherwise, <see langword="false"/>.</returns>
550
+
/// <exception cref="ArgumentNullException"><paramref name="key"/> is <see langword="null"/>.</exception>
550
551
publicboolContainsKey(TKeykey)=>IndexOf(key)>=0;
551
552
552
553
/// <summary>Determines whether the <see cref="OrderedDictionary{TKey, TValue}"/> contains a specific value.</summary>
553
554
/// <param name="value">The value to locate in the <see cref="OrderedDictionary{TKey, TValue}"/>. The value can be null for reference types.</param>
554
-
/// <returns>true if the <see cref="OrderedDictionary{TKey, TValue}"/> contains an element with the specified value; otherwise, false.</returns>
555
+
/// <returns><see langword="true"/> if the <see cref="OrderedDictionary{TKey, TValue}"/> contains an element with the specified value; otherwise, <see langword="false"/>.</returns>
555
556
publicboolContainsValue(TValuevalue)
556
557
{
557
558
intcount=_count;
@@ -607,7 +608,7 @@ public KeyValuePair<TKey, TValue> GetAt(int index)
607
608
/// <summary>Determines the index of a specific key in the <see cref="OrderedDictionary{TKey, TValue}"/>.</summary>
608
609
/// <param name="key">The key to locate.</param>
609
610
/// <returns>The index of <paramref name="key"/> if found; otherwise, -1.</returns>
610
-
/// <exception cref="ArgumentNullException"><paramref name="key"/> is null.</exception>
611
+
/// <exception cref="ArgumentNullException"><paramref name="key"/> is <see langword="null"/>.</exception>
/// <summary>Removes the value with the specified key from the <see cref="OrderedDictionary{TKey, TValue}"/>.</summary>
736
737
/// <param name="key">The key of the element to remove.</param>
737
-
/// <returns></returns>
738
+
/// <returns><see langword="true"/> if the element is successfully found and removed; otherwise, <see langword="false"/>.</returns>
739
+
/// <exception cref="ArgumentNullException"><paramref name="key"/> is <see langword="null"/>.</exception>
738
740
publicboolRemove(TKeykey)=>Remove(key,out_);
739
741
740
742
/// <summary>Removes the value with the specified key from the <see cref="OrderedDictionary{TKey, TValue}"/> and copies the element to the value parameter.</summary>
741
743
/// <param name="key">The key of the element to remove.</param>
/// <exception cref="ArgumentNullException"><paramref name="key"/> is <see langword="null"/>.</exception>
816
+
/// <exception cref="ArgumentException">An element with the same key already exists at an index different to <paramref name="index"/>.</exception>
817
+
/// <exception cref="ArgumentOutOfRangeException"><paramref name="index"/> is less than 0 or greater than or equal to <see cref="Count"/>.</exception>
811
818
publicvoidSetAt(intindex,TKeykey,TValuevalue)
812
819
{
813
820
if((uint)index>=(uint)_count)
@@ -910,7 +917,8 @@ public void TrimExcess(int capacity)
910
917
/// When this method returns, contains the value associated with the specified key, if the key is found;
911
918
/// otherwise, the default value for the type of the value parameter.
912
919
/// </param>
913
-
/// <returns>true if the <see cref="OrderedDictionary{TKey, TValue}"/> contains an element with the specified key; otherwise, false.</returns>
920
+
/// <returns><see langword="true"/> if the <see cref="OrderedDictionary{TKey, TValue}"/> contains an element with the specified key; otherwise, <see langword="false"/>.</returns>
921
+
/// <exception cref="ArgumentNullException"><paramref name="key"/> is <see langword="null"/>.</exception>
/// <summary>Gets the value associated with the specified key.</summary>
@@ -920,7 +928,8 @@ public void TrimExcess(int capacity)
920
928
/// otherwise, the default value for the type of the value parameter.
921
929
/// </param>
922
930
/// <param name="index">The index of <paramref name="key"/> if found; otherwise, -1.</param>
923
-
/// <returns>true if the <see cref="OrderedDictionary{TKey, TValue}"/> contains an element with the specified key; otherwise, false.</returns>
931
+
/// <returns><see langword="true"/> if the <see cref="OrderedDictionary{TKey, TValue}"/> contains an element with the specified key; otherwise, <see langword="false"/>.</returns>
932
+
/// <exception cref="ArgumentNullException"><paramref name="key"/> is <see langword="null"/>.</exception>
0 commit comments