|
82 | 82 | ## Examples
|
83 | 83 | The following example demonstrates how to use a <xref:System.Resources.ResXResourceReader> to iterate through the resources in a .resx file. First, the <xref:System.Resources.ResXResourceReader> `rsxr` is created for the file `items.resx`. Next, the <xref:System.Resources.ResXResourceReader.GetEnumerator%2A> method is used to create an <xref:System.Collections.IDictionaryEnumerator> to iterate through the resources and display the contents to the console.
|
84 | 84 |
|
85 |
| - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Resources.ResXResourceReader Example/CPP/resxresourcereader.cpp" id="Snippet1"::: |
86 | 85 | :::code language="csharp" source="~/snippets/csharp/System.Resources/ResXResourceReader/Overview/resxresourcereader.cs" id="Snippet1":::
|
87 | 86 | :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Resources.ResXResourceReader Example/VB/resxresourcereader.vb" id="Snippet1":::
|
88 | 87 |
|
|
219 | 218 | ## Examples
|
220 | 219 | The following example creates a new instance of the <xref:System.Resources.ResXResourceReader> class for the specified file, iterates through the resources of the file, and displays the contents to the console.
|
221 | 220 |
|
222 |
| - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Resources.ResXResourceReader Example/CPP/resxresourcereader.cpp" id="Snippet1"::: |
223 | 221 | :::code language="csharp" source="~/snippets/csharp/System.Resources/ResXResourceReader/Overview/resxresourcereader.cs" id="Snippet1":::
|
224 | 222 | :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Resources.ResXResourceReader Example/VB/resxresourcereader.vb" id="Snippet1":::
|
225 | 223 |
|
|
552 | 550 | ## Examples
|
553 | 551 | The following example displays the resources of a file to the console, and then uses the <xref:System.Resources.ResXResourceReader.Close%2A> method to shut down the reader and to make its resources available for other processes.
|
554 | 552 |
|
555 |
| - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Resources.ResXResourceReader Example/CPP/resxresourcereader.cpp" id="Snippet1"::: |
556 | 553 | :::code language="csharp" source="~/snippets/csharp/System.Resources/ResXResourceReader/Overview/resxresourcereader.cs" id="Snippet1":::
|
557 | 554 | :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Resources.ResXResourceReader Example/VB/resxresourcereader.vb" id="Snippet1":::
|
558 | 555 |
|
|
845 | 842 | ## Examples
|
846 | 843 | The following example uses the <xref:System.Resources.ResXResourceReader.GetMetadataEnumerator%2A> method to iterate through the metadata resources in an XML resource file. This code example is part of a larger example provided for the <xref:System.Resources.ResXResourceReader.UseResXDataNodes%2A> property.
|
847 | 844 |
|
848 |
| - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Resources.ResXResourceReader Example/CPP/useresxdatanodes.cpp" id="Snippet4"::: |
849 | 845 | :::code language="csharp" source="~/snippets/csharp/System.Resources/ResXResourceReader/Overview/useresxdatanodes.cs" id="Snippet4":::
|
850 | 846 | :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Resources.ResXResourceReader Example/VB/useresxdatanodes.vb" id="Snippet4":::
|
851 | 847 |
|
|
982 | 978 | ## Examples
|
983 | 979 | The following example enumerates and displays resource items in an XML file. Initially, <xref:System.Resources.ResXResourceReader.UseResXDataNodes%2A> is set to `false` to show both data and metadata items as they occur in the resource file. The second enumeration has the <xref:System.Resources.ResXResourceReader.UseResXDataNodes%2A> set to `true` so that resource data elements are returned as <xref:System.Resources.ResXDataNode> objects.
|
984 | 980 |
|
985 |
| - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Resources.ResXResourceReader Example/CPP/useresxdatanodes.cpp" id="Snippet2"::: |
986 | 981 | :::code language="csharp" source="~/snippets/csharp/System.Resources/ResXResourceReader/Overview/useresxdatanodes.cs" id="Snippet2":::
|
987 | 982 | :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Resources.ResXResourceReader Example/VB/useresxdatanodes.vb" id="Snippet2":::
|
988 | 983 |
|
|
0 commit comments