diff --git a/src/libraries/System.Collections.Immutable/src/System/Collections/Frozen/FrozenDictionary.cs b/src/libraries/System.Collections.Immutable/src/System/Collections/Frozen/FrozenDictionary.cs index 2364fced46b3fd..8339d5350f7a1b 100644 --- a/src/libraries/System.Collections.Immutable/src/System/Collections/Frozen/FrozenDictionary.cs +++ b/src/libraries/System.Collections.Immutable/src/System/Collections/Frozen/FrozenDictionary.cs @@ -16,7 +16,7 @@ namespace System.Collections.Frozen /// public static class FrozenDictionary { - /// Creates a with the specified key/value pairs. + /// Creates a with the specified key/value pairs. If the same key appears multiple times in the input, the latter one in the sequence takes precedence. /// The key/value pairs to use to populate the dictionary. /// The type of the keys in the dictionary. /// The type of the values in the dictionary. @@ -29,7 +29,7 @@ public static FrozenDictionary Create(params ReadOnl where TKey : notnull => Create(null, source); - /// Creates a with the specified key/value pairs. + /// Creates a with the specified key/value pairs. If the same key appears multiple times in the input, the latter one in the sequence takes precedence. /// The key/value pairs to use to populate the dictionary. /// The comparer implementation to use to compare keys for equality. If , is used. /// The type of the keys in the dictionary. @@ -60,7 +60,7 @@ public static FrozenDictionary Create(IEqualityCompa return CreateFromDictionary(d); } - /// Creates a with the specified key/value pairs. + /// Creates a with the specified key/value pairs. If the same key appears multiple times in the input, the latter one in the sequence takes precedence. /// The key/value pairs to use to populate the dictionary. /// The comparer implementation to use to compare keys for equality. If null, is used. /// The type of the keys in the dictionary. @@ -75,7 +75,7 @@ public static FrozenDictionary ToFrozenDictionary(th GetExistingFrozenOrNewDictionary(source, comparer, out Dictionary? uniqueValues) ?? CreateFromDictionary(uniqueValues!); - /// Creates a from an according to specified key selector function. + /// Creates a from an according to specified key selector function. Unlike the key/value pair-based overloads, this overload throws an if produces duplicate keys. /// The type of the elements of . /// The type of the key returned by . /// An from which to create a . @@ -87,7 +87,7 @@ public static FrozenDictionary ToFrozenDictionary( where TKey : notnull => source.ToDictionary(keySelector, comparer).ToFrozenDictionary(comparer); - /// Creates a from an according to specified key selector and element selector functions. + /// Creates a from an according to specified key selector and element selector functions. Unlike the key/value pair-based overloads, this overload throws an if produces duplicate keys. /// The type of the elements of . /// The type of the key returned by . /// The type of the value returned by .