From 74ee70deeb31cb0e357a85d42ef7a05cf0bf85a6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Mar 2026 03:09:42 +0000 Subject: [PATCH 1/2] Initial plan From f87a7d87515f887537e5b377a81c88b1a8533c61 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 19 Mar 2026 03:16:29 +0000 Subject: [PATCH 2/2] Fix ImmutableDictionary ArgumentException docs: clarify duplicate-key-same-value behavior Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com> --- xml/System.Collections.Immutable/ImmutableDictionary.xml | 8 ++++++++ .../ImmutableDictionary`2+Builder.xml | 2 +- .../ImmutableDictionary`2.xml | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/xml/System.Collections.Immutable/ImmutableDictionary.xml b/xml/System.Collections.Immutable/ImmutableDictionary.xml index 74c6d61dd39..7de46261b7c 100644 --- a/xml/System.Collections.Immutable/ImmutableDictionary.xml +++ b/xml/System.Collections.Immutable/ImmutableDictionary.xml @@ -935,6 +935,7 @@ Enumerates a sequence of key/value pairs and produces an immutable dictionary of its contents. An immutable dictionary that contains the key/value pairs in the specified sequence. To be added. + An element with the same key but a different value already exists in the dictionary. @@ -1049,6 +1050,7 @@ Enumerates a sequence of key/value pairs and produces an immutable dictionary of its contents by using the specified key comparer. An immutable dictionary that contains the key/value pairs in the specified sequence. To be added. + An element with the same key but a different value already exists in the dictionary. @@ -1126,6 +1128,7 @@ Enumerates a sequence of key/value pairs and produces an immutable dictionary of its contents by using the specified key and value comparers. An immutable dictionary that contains the key/value pairs in the specified sequence. To be added. + An element with the same key but a different value already exists in the dictionary. @@ -1179,6 +1182,7 @@ Constructs an immutable dictionary from an existing collection of elements, applying a transformation function to the source keys. The immutable dictionary that contains elements from , with keys transformed by applying . To be added. + An element with the same key but a different value already exists in the dictionary. @@ -1242,6 +1246,7 @@ Constructs an immutable dictionary based on some transformation of a sequence. The immutable dictionary that contains elements from , with keys transformed by applying . To be added. + An element with the same key but a different value already exists in the dictionary. @@ -1306,6 +1311,7 @@ Enumerates and transforms a sequence, and produces an immutable dictionary of its contents. An immutable dictionary that contains the items in the specified sequence. To be added. + An element with the same key but a different value already exists in the dictionary. @@ -1380,6 +1386,7 @@ Enumerates and transforms a sequence, and produces an immutable dictionary of its contents by using the specified key comparer. An immutable dictionary that contains the items in the specified sequence. To be added. + An element with the same key but a different value already exists in the dictionary. @@ -1463,6 +1470,7 @@ Enumerates and transforms a sequence, and produces an immutable dictionary of its contents by using the specified key and value comparers. An immutable dictionary that contains the items in the specified sequence. To be added. + An element with the same key but a different value already exists in the dictionary. diff --git a/xml/System.Collections.Immutable/ImmutableDictionary`2+Builder.xml b/xml/System.Collections.Immutable/ImmutableDictionary`2+Builder.xml index 44a410dd8ad..537183bca6d 100644 --- a/xml/System.Collections.Immutable/ImmutableDictionary`2+Builder.xml +++ b/xml/System.Collections.Immutable/ImmutableDictionary`2+Builder.xml @@ -188,7 +188,7 @@ To be added. is null. - An element with the same key already exists in the dictionary. + An element with the same key but a different value already exists in the dictionary. The dictionary is read-only. diff --git a/xml/System.Collections.Immutable/ImmutableDictionary`2.xml b/xml/System.Collections.Immutable/ImmutableDictionary`2.xml index 16f6906f140..8d3a98b4dc5 100644 --- a/xml/System.Collections.Immutable/ImmutableDictionary`2.xml +++ b/xml/System.Collections.Immutable/ImmutableDictionary`2.xml @@ -1051,7 +1051,7 @@ This example shows how to create a new immutable dictionary by adding and removi To be added. is . - An element with the same key already exists in the . + An element with the same key but a different value already exists in the . The is read-only.