Skip to content

Commit b4ec0e4

Browse files
v-mepamairaw
andauthored
.NET Interactive: Enable_try_dotnet_to_batch_7a (#4192)
* enable_try_dotnet_to_batch_7a * Update xml/System.Collections.Generic/ICollection`1.xml Co-authored-by: Maira Wenzel <[email protected]> * reverting_syntax * missing_interactive_2208_updated * Update xml/System.Collections.Generic/Dictionary`2.xml Co-authored-by: Maira Wenzel <[email protected]> Co-authored-by: Maira Wenzel <[email protected]>
1 parent d97d95f commit b4ec0e4

File tree

5 files changed

+39
-39
lines changed

5 files changed

+39
-39
lines changed

xml/System.Collections.Generic/Dictionary`2.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -757,9 +757,9 @@
757757
758758
This code example is part of a larger example provided for the <xref:System.Collections.Generic.Dictionary%602> class.
759759
760-
[!code-cpp[Generic.Dictionary#2](~/samples/snippets/cpp/VS_Snippets_CLR/Generic.Dictionary/cpp/source.cpp#2)]
761-
[!code-csharp-interactive[Generic.Dictionary#2](~/samples/snippets/csharp/VS_Snippets_CLR/Generic.Dictionary/CS/source.cs#2)]
762-
[!code-vb[Generic.Dictionary#2](~/samples/snippets/visualbasic/VS_Snippets_CLR/Generic.Dictionary/VB/source.vb#2)]
760+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/Generic.Dictionary/cpp/source.cpp" id="Snippet2":::
761+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/Generic.Dictionary/CS/source.cs" id="Snippet2":::
762+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/Generic.Dictionary/VB/source.vb" id="Snippet2":::
763763
764764
]]></format>
765765
</remarks>

xml/System.Collections.Generic/ICollection`1.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@
6262
The `BoxCollection` class implements the <xref:System.Collections.Generic.ICollection%601.Contains%2A> method to use the default equality to determine whether a `Box` is in the collection. This method is used by the <xref:System.Collections.Generic.ICollection%601.Add%2A> method so that each `Box` added to the collection has a unique set of dimensions. The `BoxCollection` class also provides an overload of the <xref:System.Collections.Generic.ICollection%601.Contains%2A> method that takes a specified <xref:System.Collections.Generic.EqualityComparer%601> object, such as `BoxSameDimensions` and `BoxSameVol` classes in the example.
6363
6464
This example also implements an <xref:System.Collections.Generic.IEnumerator%601> interface for the `BoxCollection` class so that the collection can be enumerated.
65-
66-
[!code-csharp[System.Collections.Generic.BoxExamples#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.collections.generic.boxexamples/cs/program.cs#1)]
67-
[!code-vb[System.Collections.Generic.BoxExamples#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.collections.generic.boxexamples/vb/program.vb#1)]
65+
66+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.collections.generic.boxexamples/cs/program.cs" interactive="try-dotnet" id="Snippet1":::
67+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.collections.generic.boxexamples/vb/program.vb" id="Snippet1":::
6868
6969
]]></format>
7070
</remarks>

xml/System.Collections.Generic/IDictionary`2.xml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@
6464
6565
The `foreach` statement of the C# language (`For Each` in Visual Basic, `for each` in C++) returns an object of the type of the elements in the collection. Since each element of the <xref:System.Collections.Generic.IDictionary%602> 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 <xref:System.Collections.Generic.KeyValuePair%602>. For example:
6666
67-
[!code-cpp[Generic.IDictionary#11](~/samples/snippets/cpp/VS_Snippets_CLR/Generic.IDictionary/cpp/source2.cpp#11)]
68-
[!code-csharp[Generic.IDictionary#11](~/samples/snippets/csharp/VS_Snippets_CLR/Generic.IDictionary/CS/source2.cs#11)]
69-
[!code-vb[Generic.IDictionary#11](~/samples/snippets/visualbasic/VS_Snippets_CLR/Generic.IDictionary/VB/source2.vb#11)]
67+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/Generic.IDictionary/cpp/source2.cpp" id="Snippet11":::
68+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/Generic.IDictionary/CS/source2.cs" id="Snippet11":::
69+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/Generic.IDictionary/VB/source2.vb" id="Snippet11":::
7070
7171
The `foreach` statement is a wrapper around the enumerator, which only allows reading from, not writing to, the collection.
7272
@@ -86,10 +86,10 @@
8686
8787
Finally, the example shows how to enumerate the keys and values in the dictionary, and how to enumerate the values alone using the <xref:System.Collections.Generic.IDictionary%602.Values%2A> property.
8888
89-
[!code-cpp[Generic.IDictionary#1](~/samples/snippets/cpp/VS_Snippets_CLR/Generic.IDictionary/cpp/source.cpp#1)]
90-
[!code-csharp[Generic.IDictionary#1](~/samples/snippets/csharp/VS_Snippets_CLR/Generic.IDictionary/CS/source.cs#1)]
91-
[!code-vb[Generic.IDictionary#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/Generic.IDictionary/VB/source.vb#1)]
92-
89+
[!code-cpp[Generic.IDictionary#1](~/samples/snippets/cpp/VS_Snippets_CLR/Generic.IDictionary/cpp/source.cpp#1)]
90+
[!code-csharp[Generic.IDictionary#1](~/samples/snippets/csharp/VS_Snippets_CLR/Generic.IDictionary/CS/source.cs#1)]
91+
[!code-vb[Generic.IDictionary#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/Generic.IDictionary/VB/source.vb#1)]
92+
9393
]]></format>
9494
</remarks>
9595
<block subset="none" type="overrides">
@@ -157,10 +157,10 @@
157157
158158
This code is part of a larger example that can be compiled and executed. See <xref:System.Collections.Generic.IDictionary%602?displayProperty=nameWithType>.
159159
160-
[!code-cpp[Generic.IDictionary#2](~/samples/snippets/cpp/VS_Snippets_CLR/Generic.IDictionary/cpp/source.cpp#2)]
161-
[!code-csharp[Generic.IDictionary#2](~/samples/snippets/csharp/VS_Snippets_CLR/Generic.IDictionary/CS/source.cs#2)]
162-
[!code-vb[Generic.IDictionary#2](~/samples/snippets/visualbasic/VS_Snippets_CLR/Generic.IDictionary/VB/source.vb#2)]
163-
160+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR/Generic.IDictionary/cpp/source.cpp" id="Snippet2":::
161+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/Generic.IDictionary/CS/source.cs" interactive="try-dotnet-method" id="Snippet2":::
162+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/Generic.IDictionary/VB/source.vb" id="Snippet2":::
163+
164164
]]></format>
165165
</remarks>
166166
<exception cref="T:System.ArgumentNullException">

xml/System.Collections.Generic/LinkedListNode`1.xml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@
5454
## Examples
5555
The following code example creates a <xref:System.Collections.Generic.LinkedListNode%601>, adds it to a <xref:System.Collections.Generic.LinkedList%601>, and tracks the values of its properties as the <xref:System.Collections.Generic.LinkedList%601> changes.
5656
57-
[!code-cpp[System.Collections.Generic.LinkedListNode#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Collections.Generic.LinkedListNode/cpp/llnctor.cpp#1)]
58-
[!code-csharp[System.Collections.Generic.LinkedListNode#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Collections.Generic.LinkedListNode/CS/llnctor.cs#1)]
59-
[!code-vb[System.Collections.Generic.LinkedListNode#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Collections.Generic.LinkedListNode/VB/llnctor.vb#1)]
57+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Collections.Generic.LinkedListNode/cpp/llnctor.cpp" id="Snippet1":::
58+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Collections.Generic.LinkedListNode/CS/llnctor.cs" interactive="try-dotnet" id="Snippet1":::
59+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Collections.Generic.LinkedListNode/VB/llnctor.vb" id="Snippet1":::
6060
6161
]]></format>
6262
</remarks>
@@ -112,9 +112,9 @@
112112
## Examples
113113
The following code example creates a <xref:System.Collections.Generic.LinkedListNode%601>, adds it to a <xref:System.Collections.Generic.LinkedList%601>, and tracks the values of its properties as the <xref:System.Collections.Generic.LinkedList%601> changes.
114114
115-
[!code-cpp[System.Collections.Generic.LinkedListNode#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Collections.Generic.LinkedListNode/cpp/llnctor.cpp#1)]
116-
[!code-csharp[System.Collections.Generic.LinkedListNode#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Collections.Generic.LinkedListNode/CS/llnctor.cs#1)]
117-
[!code-vb[System.Collections.Generic.LinkedListNode#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Collections.Generic.LinkedListNode/VB/llnctor.vb#1)]
115+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Collections.Generic.LinkedListNode/cpp/llnctor.cpp" id="Snippet1":::
116+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Collections.Generic.LinkedListNode/CS/llnctor.cs" interactive="try-dotnet" id="Snippet1":::
117+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Collections.Generic.LinkedListNode/VB/llnctor.vb" id="Snippet1":::
118118
119119
]]></format>
120120
</remarks>
@@ -165,9 +165,9 @@
165165
## Examples
166166
The following code example creates a <xref:System.Collections.Generic.LinkedListNode%601>, adds it to a <xref:System.Collections.Generic.LinkedList%601>, and tracks the values of its properties as the <xref:System.Collections.Generic.LinkedList%601> changes.
167167
168-
[!code-cpp[System.Collections.Generic.LinkedListNode#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Collections.Generic.LinkedListNode/cpp/llnctor.cpp#1)]
169-
[!code-csharp[System.Collections.Generic.LinkedListNode#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Collections.Generic.LinkedListNode/CS/llnctor.cs#1)]
170-
[!code-vb[System.Collections.Generic.LinkedListNode#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Collections.Generic.LinkedListNode/VB/llnctor.vb#1)]
168+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Collections.Generic.LinkedListNode/cpp/llnctor.cpp" id="Snippet1":::
169+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Collections.Generic.LinkedListNode/CS/llnctor.cs" interactive="try-dotnet" id="Snippet1":::
170+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Collections.Generic.LinkedListNode/VB/llnctor.vb" id="Snippet1":::
171171
172172
]]></format>
173173
</remarks>
@@ -212,10 +212,10 @@
212212
213213
## Examples
214214
The following code example creates a <xref:System.Collections.Generic.LinkedListNode%601>, adds it to a <xref:System.Collections.Generic.LinkedList%601>, and tracks the values of its properties as the <xref:System.Collections.Generic.LinkedList%601> changes.
215-
216-
[!code-cpp[System.Collections.Generic.LinkedListNode#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Collections.Generic.LinkedListNode/cpp/llnctor.cpp#1)]
217-
[!code-csharp[System.Collections.Generic.LinkedListNode#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Collections.Generic.LinkedListNode/CS/llnctor.cs#1)]
218-
[!code-vb[System.Collections.Generic.LinkedListNode#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Collections.Generic.LinkedListNode/VB/llnctor.vb#1)]
215+
216+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Collections.Generic.LinkedListNode/cpp/llnctor.cpp" id="Snippet1":::
217+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Collections.Generic.LinkedListNode/CS/llnctor.cs" interactive="try-dotnet" id="Snippet1":::
218+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Collections.Generic.LinkedListNode/VB/llnctor.vb" id="Snippet1":::
219219
220220
]]></format>
221221
</remarks>
@@ -261,9 +261,9 @@
261261
## Examples
262262
The following code example creates a <xref:System.Collections.Generic.LinkedListNode%601>, adds it to a <xref:System.Collections.Generic.LinkedList%601>, and tracks the values of its properties as the <xref:System.Collections.Generic.LinkedList%601> changes.
263263
264-
[!code-cpp[System.Collections.Generic.LinkedListNode#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Collections.Generic.LinkedListNode/cpp/llnctor.cpp#1)]
265-
[!code-csharp[System.Collections.Generic.LinkedListNode#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Collections.Generic.LinkedListNode/CS/llnctor.cs#1)]
266-
[!code-vb[System.Collections.Generic.LinkedListNode#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Collections.Generic.LinkedListNode/VB/llnctor.vb#1)]
264+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Collections.Generic.LinkedListNode/cpp/llnctor.cpp" id="Snippet1":::
265+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Collections.Generic.LinkedListNode/CS/llnctor.cs" interactive="try-dotnet" id="Snippet1":::
266+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Collections.Generic.LinkedListNode/VB/llnctor.vb" id="Snippet1":::
267267
268268
]]></format>
269269
</remarks>
@@ -322,9 +322,9 @@
322322
## Examples
323323
The following code example creates a <xref:System.Collections.Generic.LinkedListNode%601>, adds it to a <xref:System.Collections.Generic.LinkedList%601>, and tracks the values of its properties as the <xref:System.Collections.Generic.LinkedList%601> changes.
324324
325-
[!code-cpp[System.Collections.Generic.LinkedListNode#1](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Collections.Generic.LinkedListNode/cpp/llnctor.cpp#1)]
326-
[!code-csharp[System.Collections.Generic.LinkedListNode#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Collections.Generic.LinkedListNode/CS/llnctor.cs#1)]
327-
[!code-vb[System.Collections.Generic.LinkedListNode#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Collections.Generic.LinkedListNode/VB/llnctor.vb#1)]
325+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Collections.Generic.LinkedListNode/cpp/llnctor.cpp" id="Snippet1":::
326+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Collections.Generic.LinkedListNode/CS/llnctor.cs" interactive="try-dotnet" id="Snippet1":::
327+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Collections.Generic.LinkedListNode/VB/llnctor.vb" id="Snippet1":::
328328
329329
]]></format>
330330
</remarks>

xml/System/Array.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@
114114

115115
The following code example shows how <xref:System.Array.Copy%2A?displayProperty=nameWithType> copies elements between an array of type integer and an array of type <xref:System.Object>.
116116

117-
[!code-cpp[Classic Array Example#1](~/samples/snippets/cpp/VS_Snippets_CLR_Classic/classic Array Example/CPP/source.cpp#1)]
118-
[!code-csharp[Classic Array Example#1](~/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array Example/CS/source.cs#1)]
119-
[!code-vb[Classic Array Example#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_Classic/classic Array Example/VB/source.vb#1)]
117+
:::code language="cpp" source="~/samples/snippets/cpp/VS_Snippets_CLR_Classic/classic Array Example/CPP/source.cpp" id="Snippet1":::
118+
:::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR_Classic/classic Array Example/CS/source.cs" interactive="try-dotnet" id="Snippet1":::
119+
:::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR_Classic/classic Array Example/VB/source.vb" id="Snippet1":::
120120

121121
The following code example creates and initializes an <xref:System.Array> and displays its properties and its elements.
122122

0 commit comments

Comments
 (0)