From 8026dc077b889335d032c2d29c4e91417f97e47f Mon Sep 17 00:00:00 2001 From: WilliamAntonRohm Date: Thu, 1 Aug 2019 11:20:28 -0700 Subject: [PATCH 1/3] added Try .NET interactive example decorations --- xml/System.Collections.Generic/Dictionary`2.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xml/System.Collections.Generic/Dictionary`2.xml b/xml/System.Collections.Generic/Dictionary`2.xml index 621ec01686b..845f587b4b6 100644 --- a/xml/System.Collections.Generic/Dictionary`2.xml +++ b/xml/System.Collections.Generic/Dictionary`2.xml @@ -130,7 +130,7 @@ Finally, the example demonstrates the method. [!code-cpp[Generic.Dictionary#1](~/samples/snippets/cpp/VS_Snippets_CLR/Generic.Dictionary/cpp/source.cpp#1)] - [!code-csharp[Generic.Dictionary#1](~/samples/snippets/csharp/VS_Snippets_CLR/Generic.Dictionary/CS/source.cs#1)] + [!code-csharp-interactive[Generic.Dictionary#1](~/samples/snippets/csharp/VS_Snippets_CLR/Generic.Dictionary/CS/source.cs#1)] [!code-vb[Generic.Dictionary#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/Generic.Dictionary/VB/source.vb#1)] ]]> @@ -206,7 +206,7 @@ This code example is part of a larger example provided for the class. [!code-cpp[Generic.Dictionary#2](~/samples/snippets/cpp/VS_Snippets_CLR/Generic.Dictionary/cpp/source.cpp#2)] - [!code-csharp[Generic.Dictionary#2](~/samples/snippets/csharp/VS_Snippets_CLR/Generic.Dictionary/CS/source.cs#2)] + [!code-csharp-interactive[Generic.Dictionary#2](~/samples/snippets/csharp/VS_Snippets_CLR/Generic.Dictionary/CS/source.cs#2)] [!code-vb[Generic.Dictionary#2](~/samples/snippets/visualbasic/VS_Snippets_CLR/Generic.Dictionary/VB/source.vb#2)] ]]> @@ -707,7 +707,7 @@ This code example is part of a larger example provided for the class. [!code-cpp[Generic.Dictionary#2](~/samples/snippets/cpp/VS_Snippets_CLR/Generic.Dictionary/cpp/source.cpp#2)] - [!code-csharp[Generic.Dictionary#2](~/samples/snippets/csharp/VS_Snippets_CLR/Generic.Dictionary/CS/source.cs#2)] + [!code-csharp-interactive[Generic.Dictionary#2](~/samples/snippets/csharp/VS_Snippets_CLR/Generic.Dictionary/CS/source.cs#2)] [!code-vb[Generic.Dictionary#2](~/samples/snippets/visualbasic/VS_Snippets_CLR/Generic.Dictionary/VB/source.vb#2)] ]]> @@ -1205,7 +1205,7 @@ This code example is part of a larger example provided for the class. `openWith` is the name of the Dictionary used in this example. [!code-cpp[Generic.Dictionary#2](~/samples/snippets/cpp/VS_Snippets_CLR/Generic.Dictionary/cpp/source.cpp#2)] - [!code-csharp[Generic.Dictionary#2](~/samples/snippets/csharp/VS_Snippets_CLR/Generic.Dictionary/CS/source.cs#2)] + [!code-csharp-interactive[Generic.Dictionary#2](~/samples/snippets/csharp/VS_Snippets_CLR/Generic.Dictionary/CS/source.cs#2)] [!code-vb[Generic.Dictionary#2](~/samples/snippets/visualbasic/VS_Snippets_CLR/Generic.Dictionary/VB/source.vb#2)] [!code-cpp[Generic.Dictionary#3](~/samples/snippets/cpp/VS_Snippets_CLR/Generic.Dictionary/cpp/source.cpp#3)] [!code-csharp[Generic.Dictionary#3](~/samples/snippets/csharp/VS_Snippets_CLR/Generic.Dictionary/CS/source.cs#3)] From ea86e94c995b4886c56ba348267b86e619e85a02 Mon Sep 17 00:00:00 2001 From: WilliamAntonRohm Date: Thu, 1 Aug 2019 11:30:06 -0700 Subject: [PATCH 2/3] added Try .NET interactive example decorations --- xml/System.Collections.Generic/Dictionary`2.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/xml/System.Collections.Generic/Dictionary`2.xml b/xml/System.Collections.Generic/Dictionary`2.xml index 845f587b4b6..fe0115a2013 100644 --- a/xml/System.Collections.Generic/Dictionary`2.xml +++ b/xml/System.Collections.Generic/Dictionary`2.xml @@ -119,6 +119,9 @@ ## Examples + + [!INCLUDE[interactive-note](~/includes/csharp-interactive-note.md)] + The following code example creates an empty of strings with string keys and uses the method to add some elements. The example demonstrates that the method throws an when attempting to add a duplicate key. The example uses the property (the indexer in C#) to retrieve values, demonstrating that a is thrown when a requested key is not present, and showing that the value associated with a key can be replaced. @@ -201,6 +204,9 @@ ## Examples + + [!INCLUDE[interactive-note](~/includes/csharp-interactive-note.md)] + The following code example creates an empty of strings with string keys and uses the method to add some elements. The example demonstrates that the method throws an when attempting to add a duplicate key. This code example is part of a larger example provided for the class. @@ -702,6 +708,9 @@ ## Examples + + [!INCLUDE[interactive-note](~/includes/csharp-interactive-note.md)] + The following code example creates an empty of strings with string keys and uses the method to add some elements. The example demonstrates that the method throws an when attempting to add a duplicate key. This code example is part of a larger example provided for the class. @@ -1198,6 +1207,9 @@ ## Examples + + [!INCLUDE[interactive-note](~/includes/csharp-interactive-note-some.md)] + The following code example uses the property (the indexer in C#) to retrieve values, demonstrating that a is thrown when a requested key is not present, and showing that the value associated with a key can be replaced. The example also shows how to use the method as a more efficient way to retrieve values if a program often must try key values that are not in the dictionary. From 2aa71f69b4a139daa766b9eea7a6219d511a46ed Mon Sep 17 00:00:00 2001 From: Maira Wenzel Date: Tue, 6 Aug 2019 16:05:43 -0700 Subject: [PATCH 3/3] Update Dictionary`2.xml --- xml/System.Collections.Generic/Dictionary`2.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xml/System.Collections.Generic/Dictionary`2.xml b/xml/System.Collections.Generic/Dictionary`2.xml index fe0115a2013..6a48ff502cf 100644 --- a/xml/System.Collections.Generic/Dictionary`2.xml +++ b/xml/System.Collections.Generic/Dictionary`2.xml @@ -205,7 +205,7 @@ ## Examples - [!INCLUDE[interactive-note](~/includes/csharp-interactive-note.md)] + [!INCLUDE[interactive-note](~/includes/csharp-interactive-note-some.md)] The following code example creates an empty of strings with string keys and uses the method to add some elements. The example demonstrates that the method throws an when attempting to add a duplicate key. @@ -2963,4 +2963,4 @@ Unlike the method, this - \ No newline at end of file +