|
203 | 203 |
|
204 | 204 | This code example is part of a larger example provided for the <xref:System.Collections.Generic.SortedDictionary%602> class.
|
205 | 205 |
|
206 |
| - [!code-csharp[Generic.SortedDictionary#2](~/samples/snippets/csharp/VS_Snippets_CLR/Generic.SortedDictionary/CS/source.cs#2)] |
207 |
| - [!code-vb[Generic.SortedDictionary#2](~/samples/snippets/visualbasic/VS_Snippets_CLR/Generic.SortedDictionary/VB/source.vb#2)] |
| 206 | + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/Generic.SortedDictionary/CS/source.cs" interactive="try-dotnet-method" id="Snippet2"::: |
| 207 | + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/Generic.SortedDictionary/VB/source.vb" id="Snippet2"::: |
208 | 208 |
|
209 | 209 | ]]></format>
|
210 | 210 | </remarks>
|
|
262 | 262 | ## Examples
|
263 | 263 | The following code example creates a <xref:System.Collections.Generic.SortedDictionary%602> with a case-insensitive comparer for the current culture. The example adds four elements, some with lower-case keys and some with upper-case keys. The example then attempts to add an element with a key that differs from an existing key only by case, catches the resulting exception, and displays an error message. Finally, the example displays the elements in case-insensitive sort order.
|
264 | 264 |
|
265 |
| - [!code-csharp[Generic.SortedDictionary.ctor_IComp#1](~/samples/snippets/csharp/VS_Snippets_CLR/Generic.SortedDictionary.ctor_IComp/CS/source.cs#1)] |
266 |
| - [!code-vb[Generic.SortedDictionary.ctor_IComp#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/Generic.SortedDictionary.ctor_IComp/VB/source.vb#1)] |
| 265 | + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/Generic.SortedDictionary.ctor_IComp/CS/source.cs" interactive="try-dotnet" id="Snippet1"::: |
| 266 | + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/Generic.SortedDictionary.ctor_IComp/VB/source.vb" id="Snippet1"::: |
267 | 267 |
|
268 | 268 | ]]></format>
|
269 | 269 | </remarks>
|
|
327 | 327 | ## Examples
|
328 | 328 | The following code example shows how to use <xref:System.Collections.Generic.SortedDictionary%602> to create a sorted copy of the information in a <xref:System.Collections.Generic.Dictionary%602>, by passing the <xref:System.Collections.Generic.Dictionary%602> to the <xref:System.Collections.Generic.SortedDictionary%602.%23ctor%28System.Collections.Generic.IComparer%7B%600%7D%29> constructor.
|
329 | 329 |
|
330 |
| - [!code-csharp[Generic.SortedDictionary.ctor_IDic#1](~/samples/snippets/csharp/VS_Snippets_CLR/Generic.SortedDictionary.ctor_IDic/CS/source.cs#1)] |
331 |
| - [!code-vb[Generic.SortedDictionary.ctor_IDic#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/Generic.SortedDictionary.ctor_IDic/VB/source.vb#1)] |
| 330 | + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/Generic.SortedDictionary.ctor_IDic/CS/source.cs" interactive="try-dotnet" id="Snippet1"::: |
| 331 | + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/Generic.SortedDictionary.ctor_IDic/VB/source.vb" id="Snippet1"::: |
332 | 332 |
|
333 | 333 | ]]></format>
|
334 | 334 | </remarks>
|
|
393 | 393 | ## Examples
|
394 | 394 | The following code example shows how to use <xref:System.Collections.Generic.SortedDictionary%602> to create a case-insensitive sorted copy of the information in a case-insensitive <xref:System.Collections.Generic.Dictionary%602>, by passing the <xref:System.Collections.Generic.Dictionary%602> to the <xref:System.Collections.Generic.SortedDictionary%602.%23ctor%28System.Collections.Generic.IDictionary%7B%600%2C%601%7D%2CSystem.Collections.Generic.IComparer%7B%600%7D%29> constructor. In this example, the case-insensitive comparers are for the current culture.
|
395 | 395 |
|
396 |
| - [!code-csharp[Generic.SortedDictionary.ctor_IDicIComp#1](~/samples/snippets/csharp/VS_Snippets_CLR/Generic.SortedDictionary.ctor_IDicIComp/CS/source.cs#1)] |
397 |
| - [!code-vb[Generic.SortedDictionary.ctor_IDicIComp#1](~/samples/snippets/visualbasic/VS_Snippets_CLR/Generic.SortedDictionary.ctor_IDicIComp/VB/source.vb#1)] |
| 396 | + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/Generic.SortedDictionary.ctor_IDicIComp/CS/source.cs" interactive="try-dotnet" id="Snippet1"::: |
| 397 | + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/Generic.SortedDictionary.ctor_IDicIComp/VB/source.vb" id="Snippet1"::: |
398 | 398 |
|
399 | 399 | ]]></format>
|
400 | 400 | </remarks>
|
|
468 | 468 |
|
469 | 469 | This code example is part of a larger example provided for the <xref:System.Collections.Generic.SortedDictionary%602> class.
|
470 | 470 |
|
471 |
| - [!code-csharp[Generic.SortedDictionary#2](~/samples/snippets/csharp/VS_Snippets_CLR/Generic.SortedDictionary/CS/source.cs#2)] |
472 |
| - [!code-vb[Generic.SortedDictionary#2](~/samples/snippets/visualbasic/VS_Snippets_CLR/Generic.SortedDictionary/VB/source.vb#2)] |
| 471 | + :::code language="csharp" source="~/samples/snippets/csharp/VS_Snippets_CLR/Generic.SortedDictionary/CS/source.cs" interactive="try-dotnet-method" id="Snippet2"::: |
| 472 | + :::code language="vb" source="~/samples/snippets/visualbasic/VS_Snippets_CLR/Generic.SortedDictionary/VB/source.vb" id="Snippet2"::: |
473 | 473 |
|
474 | 474 | ]]></format>
|
475 | 475 | </remarks>
|
|
0 commit comments