1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255
|
<?xml version="1.0" encoding="utf-8"?>
<Type Name="ResourceManager" FullName="System.Resources.ResourceManager">
<TypeSignature Maintainer="auto" Language="C#" Value="public class ResourceManager" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi serializable beforefieldinit ResourceManager extends System.Object" />
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00]</AssemblyPublicKey>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ThreadSafetyStatement>Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details.</ThreadSafetyStatement>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.ComVisible(true)</AttributeName>
</Attribute>
</Attributes>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="T:System.Resources.ResourceManager" /> class retrieves resources from a binary .resources file that is embedded in an assembly or from a standalone .resources file. If an app has been localized and localized resources have been deployed in <format type="text/html"><a href="8d5c6044-2919-41d2-8321-274706b295ac">satellite assemblies</a></format>, it looks up culture-specific resources, provides resource fallback when a localized resource does not exist, and supports resource serialization.</para>
<para>For more information about creating and managing resources in desktop apps and win8_appname_long apps, see the following sections:</para>
<list type="bullet">
<item>
<para>
<format type="text/html">
<a href="#desktop">Desktop Apps</a>
</format>
</para>
<list type="bullet">
<item>
<para>
<format type="text/html">
<a href="#creating_resources">Creating Resources</a>
</format>
</para>
</item>
<item>
<para>
<format type="text/html">
<a href="#instantiating">Instantiating a ResourceManager Object</a>
</format>
</para>
</item>
<item>
<para>
<format type="text/html">
<a href="#CultureSpecific">ResourceManager and Culture-Specific Resources</a>
</format>
</para>
</item>
<item>
<para>
<format type="text/html">
<a href="#retrieving">Retrieving Resources</a>
</format>
</para>
</item>
<item>
<para>
<format type="text/html">
<a href="#exception">Handling MissingManifestResourceException and MissingSatelliteAssemblyException Exceptions</a>
</format>
</para>
</item>
<item>
<para>
<format type="text/html">
<a href="#versioning">Resource Versioning</a>
</format>
</para>
</item>
<item>
<para>
<format type="text/html">
<a href="#config"><satelliteassemblies> Configuration File Node</a>
</format>
</para>
</item>
</list>
</item>
<item>
<para>
<format type="text/html">
<a href="#ws">Windows Store Apps</a>
</format>
</para>
</item>
</list>
<format type="text/html">
<a href="#desktop" />
</format>
<format type="text/html">
<h2>Desktop Apps</h2>
</format>
<para>For desktop apps, the <see cref="T:System.Resources.ResourceManager" /> class retrieves resources from binary resource (.resources) files. Typically, a language compiler or the <format type="text/html"><a href="b5382965-0053-47cf-b92f-862860275a01">Assembly Linker (AL.exe)</a></format> embeds these resource files in an assembly. You can also use a <see cref="T:System.Resources.ResourceManager" /> object to retrieve resources directly from a .resources file that is not embedded in an assembly, by using the <see cref="M:System.Resources.ResourceManager.CreateFileBasedResourceManager(System.String,System.String,System.Type)" /> method. </para>
<block subset="none" type="note">
<para>Using standalone .resources files in an ASP.NET app will break XCOPY deployment, because the resources remain locked until they are explicitly released by the <see cref="M:System.Resources.ResourceManager.ReleaseAllResources" /> method. If you want to deploy resources with your ASP.NET apps, you should compile your .resources files into satellite assemblies.</para>
</block>
<para>In a resource-based app, one .resources file contains the resources of the default culture whose resources are used if no culture-specific resources can be found. For example, if an app's default culture is English (en), the English language resources are used whenever localized resources cannot be found for a specific culture, such as English (United States) (en-US) or French (France) (fr-FR). Typically, the resources for the default culture are embedded in the main app assembly, and resources for other localized cultures are embedded in satellite assemblies. Satellite assemblies contain only resources. They have the same root file name as the main assembly and an extension of .resources.dll. For apps whose assemblies are not registered in the global assembly cache, satellite assemblies are stored in an app subdirectory whose name corresponds to the assembly's culture.</para>
<format type="text/html">
<a href="#creating_resources" />
</format>
<format type="text/html">
<h2>Creating Resources</h2>
</format>
<para>When you develop a resource-based app, you store resource information in text files (files that have a .txt or .restext extension) or XML files (files that have a .resx extension). You then compile the text or XML files with the <format type="text/html"><a href="8ef159de-b660-4bec-9213-c3fbc4d1c6f4">Resource File Generator (Resgen.exe)</a></format> to create a binary .resources file. You can then embed the resulting .resources file in an executable or library by using a compiler option such as /resources for the C# and Visual Basic compilers, or you can embed it in a satellite assembly by using the <format type="text/html"><a href="b5382965-0053-47cf-b92f-862860275a01">Assembly Linker (Al.exe)</a></format>. If you include a .resx file in your Visual Studio project, Visual Studio handles the compilation and embedding of default and localized resources automatically as part of the build process. </para>
<para>Ideally, you should create resources for every language your app supports, or at least for a meaningful subset of each language. The binary .resources file names follow the naming convention basename.cultureName.resources, where basename is the name of the app or the name of a class, depending on the level of detail you want. The <see cref="P:System.Globalization.CultureInfo.Name" /> property is used to determine cultureName. A resource for the app's default culture should be named basename.resources.</para>
<para>For example, suppose that an assembly has several resources in a resource file that has the base name MyResources. These resource files should have names such as MyResources.ja-JP.resources for the Japan (Japanese) culture, MyResources.de.resources for the German culture, MyResources.zh-CHS.resources for the simplified Chinese culture, and MyResources.fr-BE.resources for the French (Belgium) culture. The default resource file should be named MyResources.resources. The culture-specific resource files are commonly packaged in satellite assemblies for each culture. The default resource file should be embedded in the app's main assembly.</para>
<para>Note that <format type="text/html"><a href="b5382965-0053-47cf-b92f-862860275a01">Assembly Linker</a></format> allows resources to be marked as private, but you should always mark them as public so they can be accessed by other assemblies. (Because a satellite assembly contains no code, resources that are marked as private are unavailable to your app through any mechanism.) </para>
<para>For more information about creating, packaging, and deploying resources, see the articles <format type="text/html"><a href="6c5ad891-66a0-4e7a-adcf-f41863ba6d8d">Creating Resource Files</a></format>, <format type="text/html"><a href="8d5c6044-2919-41d2-8321-274706b295ac">Creating Satellite Assemblies</a></format>, and <format type="text/html"><a href="b224d7c0-35f8-4e82-a705-dd76795e8d16">Packaging and Deploying Resources</a></format>.</para>
<format type="text/html">
<a href="#instantiating" />
</format>
<format type="text/html">
<h2>Instantiating a ResourceManager Object</h2>
</format>
<para>You instantiate a <see cref="T:System.Resources.ResourceManager" /> object that retrieves resources from an embedded .resources file by calling one of its class constructor overloads. This tightly couples a <see cref="T:System.Resources.ResourceManager" /> object with a particular .resources file and with any associated localized .resources files in satellite assemblies.</para>
<para>The two most commonly called constructors are: </para>
<list type="bullet">
<item>
<para>
<see cref="M:System.Resources.ResourceManager.#ctor(System.String,System.Reflection.Assembly)" /> looks up resources based on two pieces of information that you supply: the base name of the .resources file and the assembly in which the default .resources file resides. The base name includes the namespace and root name of the .resources file, without its culture or extension. Note that .resources files that are compiled from the command line typically do not include a namespace name, whereas .resources files that are created in the Visual Studio environment do. For example, if a resource file is named MyCompany.StringResources.resources and the <see cref="T:System.Resources.ResourceManager" /> constructor is called from a static method named Example.Main, the following code instantiates a <see cref="T:System.Resources.ResourceManager" /> object that can retrieve resources from the .resources file:</para>
<para>code reference: Conceptual.Resources.Retrieving#1</para>
</item>
<item>
<para>
<see cref="M:System.Resources.ResourceManager.#ctor(System.Type)" /> looks up resources in satellite assemblies based on information from a type object. The type's fully qualified name corresponds to the base name of the .resources file without its file name extension. In desktop apps that are created by using the Visual Studio Resource Designer, Visual Studio creates a wrapper class whose fully qualified name is the same as the root name of the .resources file. For example, if a resource file is named MyCompany.StringResources.resources and there is a wrapper class named MyCompany.StringResources, the following code instantiates a <see cref="T:System.Resources.ResourceManager" /> object that can retrieve resources from the .resources file: </para>
<para>code reference: Conceptual.Resources.Retrieving#2</para>
</item>
</list>
<para>If the appropriate resources cannot be found, the constructor call creates a valid <see cref="T:System.Resources.ResourceManager" /> object. However, the attempt to retrieve a resource throws a <see cref="T:System.Resources.MissingManifestResourceException" /> exception. For information about dealing with the exception, see the <format type="text/html"><a href="#exception">Handling MissingManifestResourceException and MissingSatelliteAssembly Exceptions</a></format> section later in this article. </para>
<para>The following example shows how to instantiate a <see cref="T:System.Resources.ResourceManager" /> object. It contains the source code for an executable named ShowTime.exe. It also includes the following text file named Strings.txt that contains a single string resource, TimeHeader: </para>
<code>TimeHeader=The current time is</code>
<para>You can use a batch file to generate the resource file and embed it into the executable. Here's the batch file to generate an executable by using the C# compiler: </para>
<code>
resgen strings.txt
csc ShowTime.cs /resource:strings.resources
</code>
<para>For the Visual Basic compiler, you can use the following batch file:</para>
<code>
resgen strings.txt
vbc ShowTime.vb /resource:strings.resources
</code>
<para>code reference: System.Resources.ResourceManager.Class#1</para>
<format type="text/html">
<a href="#CultureSpecific" />
</format>
<format type="text/html">
<h2>ResourceManager and Culture-Specific Resources</h2>
</format>
<para>A localized app requires resources to be deployed as discussed in the article <format type="text/html"><a href="b224d7c0-35f8-4e82-a705-dd76795e8d16">Packaging and Deploying Resources in Desktop Apps</a></format>. If the assemblies are properly configured, the resource manager determines which resources to retrieve based on the current thread's <see cref="P:System.Threading.Thread.CurrentUICulture" /> property. (That property also returns the current thread's UI culture.) For example, if an app is compiled with default English language resources in the main assembly and with French and Russian language resources in two satellite assemblies, and the <see cref="P:System.Threading.Thread.CurrentUICulture" /> property is set to fr-FR, the resource manager retrieves the French resources. </para>
<para>You can set the <see cref="P:System.Globalization.CultureInfo.CurrentUICulture" /> property explicitly or implicitly. The way you set it determines how the <see cref="T:System.Resources.ResourceManager" /> object retrieves resources based on culture:</para>
<list type="bullet">
<item>
<para>If you explicitly set the <see cref="P:System.Threading.Thread.CurrentUICulture" /> property to a specific culture, the resource manager always retrieves the resources for that culture, regardless of the user's browser or operating system language. Consider an app that is compiled with default English language resources and three satellite assemblies that contain resources for English (United States), French (France), and Russian (Russia). If the <see cref="P:System.Globalization.CultureInfo.CurrentUICulture" /> property is set to fr-FR, the <see cref="T:System.Resources.ResourceManager" /> object always retrieves the French (France) resources, even if the user's operating system language is not French. Make sure that this is the desired behavior before you set the property explicitly. </para>
<para>In ASP.NET apps, you must set the <see cref="P:System.Threading.Thread.CurrentUICulture" /> property explicitly, because it is unlikely that the setting on the server will match incoming client requests. An ASP.NET app can set the <see cref="P:System.Threading.Thread.CurrentUICulture" /> property explicitly to the user's browser accept language. </para>
<para>Explicitly setting the <see cref="P:System.Threading.Thread.CurrentUICulture" /> property defines the current UI culture for that thread. It does not affect the current UI culture of any other threads in an app.</para>
</item>
<item>
<para>You can set the UI culture of all threads in an app domain by assigning a <see cref="T:System.Globalization.CultureInfo" /> object that represents that culture to the static <see cref="P:System.Globalization.CultureInfo.DefaultThreadCurrentUICulture" /> property.</para>
</item>
<item>
<para>If you do not explicitly set the current UI culture and you do not define a default culture for the current app domain, the <see cref="P:System.Globalization.CultureInfo.CurrentUICulture" /> property is set implicitly by the Windows GetUserDefaultUILanguage function. This function is provided by the Multilingual User Interface (MUI), which enables the user to set the default language. If the UI language is not set by the user, it defaults to the system-installed language, which is the language of operating system resources. </para>
</item>
</list>
<para>The following simple "Hello world" example sets the current UI culture explicitly. It contains resources for three cultures: English (United States) or en-US, French (France) or fr-FR, and Russian (Russia) or ru-RU. The en-US resources are contained in a text file named Greetings.txt:</para>
<code>HelloString=Hello world!</code>
<para>The fr-FR resources are contained in a text file named Greetings.fr-FR.txt:</para>
<code>HelloString=Salut tout le monde!</code>
<para>The ru-RU resources are contained in a text file named Greetings.ru-RU.txt:</para>
<code>HelloString=Всем привет!</code>
<para>Here's the source code for the example (Example.vb for the Visual Basic version or Example.cs for the C# version):</para>
<para>code reference: Conceptual.Resources.CurrentCulture#1</para>
<para>To compile this example, create a batch (.bat) file that contains the following commands and run it from the command prompt. If you're using C#, specify csc instead of vbc and Example.cs instead of Example.vb.</para>
<code>resgen Greetings.txt
vbc Example.vb /resource:Greetings.resources
resgen Greetings.fr-FR.txt
Md fr-FR
al /embed:Greetings.fr-FR.resources /culture:fr-FR /out:fr-FR\Example.resources.dll
resgen Greetings.ru-RU.txt
Md ru-RU
al /embed:Greetings.ru-RU.resources /culture:ru-RU /out:ru-RU\Example.resources.dll</code>
<format type="text/html">
<a href="#retrieving" />
</format>
<format type="text/html">
<h2>Retrieving Resources</h2>
</format>
<para>You call the <see cref="M:System.Resources.ResourceManager.GetObject(System.String)" /> and <see cref="M:System.Resources.ResourceManager.GetString(System.String)" /> methods to access a specific resource. You can also call the <see cref="M:System.Resources.ResourceManager.GetStream(System.String)" /> method to retrieve non-string resources as a byte array. By default, in an app that has localized resources, these methods return the resource for the culture determined by the current UI culture of the thread that made the call. See the previous section, <format type="text/html"><a href="#CultureSpecific">ResourceManager and Culture-Specific Resources</a></format>, for more information about how the current UI culture of a thread is defined. If the resource manager cannot find the resource for the current thread's UI culture, it uses a fallback process to retrieve the specified resource. If the resource manager cannot find any localized resources, it uses the resources of the default culture. For more information about resource fallback rules, see the "Resource Fallback Process" section of the article <format type="text/html"><a href="b224d7c0-35f8-4e82-a705-dd76795e8d16">Packaging and Deploying Resources</a></format>. </para>
<block subset="none" type="note">
<para>If the .resources file specified in the <see cref="T:System.Resources.ResourceManager" /> class constructor cannot be found, the attempt to retrieve a resource throws a <see cref="T:System.Resources.MissingManifestResourceException" /> or <see cref="T:System.Resources.MissingSatelliteAssemblyException" /> exception. For information about dealing with the exception, see the <format type="text/html"><a href="#exception">Handling MissingManifestResourceException and MissingSatelliteAssemblyException Exceptions</a></format> section later in this topic.</para>
</block>
<para>The following example uses the <see cref="M:System.Resources.ResourceManager.GetString(System.String)" /> method to retrieve culture-specific resources. It consists of resources compiled from .txt files for the English (en), French (France) (fr-FR), and Russian (Russia) (ru-RU) cultures. The example changes the current culture and current UI culture to English (United States), French (France), Russian (Russia), and Swedish (Sweden). It then calls the <see cref="M:System.Resources.ResourceManager.GetString(System.String)" /> method to retrieve the localized string, which it displays along with the current day and month. Notice that the output displays the appropriate localized string except when the current UI culture is Swedish (Sweden). Because Swedish language resources are unavailable, the app instead uses the resources of the default culture, which is English.</para>
<para>The example requires the text-based resource files listed in following table. Each has a single string resource named DateStart. </para>
<list type="table">
<listheader>
<item>
<term>
<para>Culture</para>
</term>
<description>
<para>File name</para>
</description>
<description>
<para>Resource name</para>
</description>
<description>
<para>Resource value</para>
</description>
</item>
</listheader>
<item>
<term>
<para>en-US</para>
</term>
<description>
<para>DateStrings.txt</para>
</description>
<description>
<para>DateStart</para>
</description>
<description>
<para>Today is</para>
</description>
</item>
<item>
<term>
<para>fr-FR</para>
</term>
<description>
<para>DateStrings.fr-FR.txt</para>
</description>
<description>
<para>DateStart</para>
</description>
<description>
<para>Aujourd'hui, c'est le</para>
</description>
</item>
<item>
<term>
<para>ru-RU</para>
</term>
<description>
<para>DateStrings.ru-RU.txt</para>
</description>
<description>
<para>DateStart</para>
</description>
<description>
<para>Сегодня</para>
</description>
</item>
</list>
<para>Here's the source code for the example (ShowDate.vb for the Visual Basic version or ShowDate.cs for the C# version of the code).</para>
<para>code reference: System.Resources.ResourceManager.Class#2</para>
<para>To compile this example, create a batch file that contains the following commands and run it from the command prompt. If you're using C#, specify csc instead of vbc and showdate.cs instead of showdate.vb.</para>
<code>
resgen DateStrings.txt
vbc showdate.vb /resource:DateStrings.resources
md fr-FR
resgen DateStrings.fr-FR.txt
al /out:fr-FR\Showdate.resources.dll /culture:fr-FR /embed:DateStrings.fr-FR.resources
md ru-RU
resgen DateStrings.ru-RU.txt
al /out:ru-RU\Showdate.resources.dll /culture:ru-RU /embed:DateStrings.ru-RU.resources
</code>
<para>There are two ways to retrieve the resources of a specific culture other than the current UI culture:</para>
<list type="bullet">
<item>
<para>You can call the <see cref="M:System.Resources.ResourceManager.GetString(System.String,System.Globalization.CultureInfo)" />, <see cref="M:System.Resources.ResourceManager.GetObject(System.String,System.Globalization.CultureInfo)" />, or <see cref="M:System.Resources.ResourceManager.GetStream(System.String,System.Globalization.CultureInfo)" /> method to retrieve a resource for a specific culture. If a localized resource cannot be found, the resource manager uses the resource fallback process to locate an appropriate resource.</para>
</item>
<item>
<para>You can call the <see cref="M:System.Resources.ResourceManager.GetResourceSet(System.Globalization.CultureInfo,System.Boolean,System.Boolean)" /> method to obtain a <see cref="T:System.Resources.ResourceSet" /> object that represents the resources for a particular culture. In the method call, you can determine whether the resource manager probes for parent cultures if it is unable to find localized resources, or whether it simply falls back to the resources of the default culture. You can then use the <see cref="T:System.Resources.ResourceSet" /> methods to access the resources (localized for that culture) by name, or to enumerate the resources in the set.</para>
</item>
</list>
<format type="text/html">
<a href="#exception" />
</format>
<format type="text/html">
<h2>Handling MissingManifestResourceException and MissingSatelliteAssemblyException Exceptions</h2>
</format>
<para>If you try to retrieve a specific resource, but the resource manager cannot find that resource and either no default culture has been defined or the resources of the default culture cannot be located, the resource manager throws a <see cref="T:System.Resources.MissingManifestResourceException" /> exception if it expects to find the resources in the main assembly or a <see cref="T:System.Resources.MissingSatelliteAssemblyException" /> if it expects to find the resources in a satellite assembly. Note that the exception is thrown when you call a resource retrieval method such as <see cref="M:System.Resources.ResourceManager.GetString(System.String)" /> or <see cref="M:System.Resources.ResourceManager.GetObject(System.String,System.Globalization.CultureInfo)" />, and not when you instantiate a <see cref="T:System.Resources.ResourceManager" /> object. </para>
<para>The exception is typically thrown under the following conditions:</para>
<list type="bullet">
<item>
<para>The appropriate resource file or satellite assembly does not exist. If the resource manager expects the app's default resources to be embedded in the main app assembly, they are absent. If the <see cref="T:System.Resources.NeutralResourcesLanguageAttribute" /> attribute indicates that the app's default resources reside in a satellite assembly, that assembly cannot be found. When you compile your app, make sure that resources are embedded in the main assembly or that the necessary satellite assembly is generated and is named appropriately. Its name should take the form appName.resources.dll, and it should be located in a directory named after the culture whose resources it contains. </para>
</item>
<item>
<para>Your app doesn't have a default or neutral culture defined. Add the <see cref="T:System.Resources.NeutralResourcesLanguageAttribute" /> attribute to a source code file or to the project information file (AssemblyInfo.vb for a Visual Basic app or AssemblyInfo.cs for a C# app) file. </para>
</item>
<item>
<para>The <paramref name="baseName" /> parameter in the <see cref="M:System.Resources.ResourceManager.#ctor(System.String,System.Reflection.Assembly)" /> constructor does not specify the name of a .resources file. The name should include the resource file's fully qualified namespace but not its file name extension. Typically, resource files that are created in Visual Studio include namespace names, but resource files that are created and compiled at the command prompt do not. You can determine the names of embedded .resources files by compiling and running the following utility. This is a console app that accepts the name of a main assembly or satellite assembly as a command-line parameter. It displays the strings that should be provided as the <paramref name="baseName" /> parameter so that the resource manager can correctly identify the resource. </para>
<para>code reference: System.Resources.ResourceManager.Class#4</para>
</item>
</list>
<para>If you are changing the current culture of your application explicitly, you should also remember that the resource manager retrieves a resource set based on the value of the <see cref="P:System.Globalization.CultureInfo.CurrentUICulture" /> property, and not the <see cref="P:System.Globalization.CultureInfo.CurrentCulture" /> property. Typically, if you change one value, you should also change the other. </para>
<format type="text/html">
<a href="#versioning" />
</format>
<format type="text/html">
<h2>Resource Versioning</h2>
</format>
<para>Because the main assembly that contains an app's default resources is separate from the app's satellite assemblies, you can release a new version of your main assembly without redeploying the satellite assemblies. You use the <see cref="T:System.Resources.SatelliteContractVersionAttribute" /> attribute to use existing satellite assemblies and instruct the resource manager not to redeploy them with a new version of your main assembly,</para>
<para>For more information about versioning support for satellite assemblies, see the article <format type="text/html"><a href="eca16922-1c46-4f68-aefe-e7a12283641f">Retrieving Resources</a></format>. </para>
<format type="text/html">
<a href="#config" />
</format>
<format type="text/html">
<h2><satelliteassemblies> Configuration File Node</h2>
</format>
<para>For executables that are deployed and run from a website (HREF .exe files), the <see cref="T:System.Resources.ResourceManager" /> object may probe for satellite assemblies over the web, which can hurt your app's performance. To eliminate the performance problem, you can limit this probing to the satellite assemblies that you have deployed with your app. To do this, you create a <satelliteassemblies> node in your app's configuration file to specify that you have deployed a specific set of cultures for your app, and that the <see cref="T:System.Resources.ResourceManager" /> object should not try to probe for any culture that is not listed in that node. </para>
<block subset="none" type="note">
<para>The preferred alternative to creating a <satelliteassemblies> node is to use the <format type="text/html"><a href="8457e615-e3b6-4990-8dcf-11bc590e4e9b">ClickOnce Deployment Manifest</a></format> feature.</para>
</block>
<para>In your app's configuration file, create a section similar to the following: </para>
<code><?xml version ="1.0"?>
<configuration>
<satelliteassemblies>
<assembly name="MainAssemblyName, Version=versionNumber, Culture=neutral, PublicKeyToken=null|yourPublicKeyToken">
<culture>cultureName1</culture>
<culture>cultureName2</culture>
<culture>cultureName3</culture>
</assembly>
</satelliteassemblies>
</configuration></code>
<para>Edit this configuration information as follows: </para>
<list type="bullet">
<item>
<para>Specify one or more <assembly> nodes for each main assembly that you deploy, where each node specifies a fully qualified assembly name. Specify the name of your main assembly in place of MainAssemblyName, and specify the Version, PublicKeyToken, and Culture attribute values that correspond to your main assembly. </para>
<para>For the Version attribute, specify the version number of your assembly. For example, the first release of your assembly might be version number 1.0.0.0.</para>
<para>For the PublicKeyToken attribute, specify the keyword null if you have not signed your assembly with a strong name, or specify your public key token if you have signed your assembly.</para>
<para>For the Culture attribute, specify the keyword neutral to designate the main assembly and cause the <see cref="T:System.Resources.ResourceManager" /> class to probe only for the cultures listed in the <culture> nodes. </para>
<para>For more information about fully qualified assembly names, see the article <format type="text/html"><a href="8f8c2c90-f15d-400e-87e7-a757e4f04d0e">Assembly Names</a></format>. For more information about strong-named assemblies, see the article <format type="text/html"><a href="ffbf6d9e-4a88-4a8a-9645-4ce0ee1ee5f9">Creating and Using Strong-Named Assemblies</a></format>.</para>
</item>
<item>
<para>Specify one or more <culture> nodes with a specific culture name, such as "fr-FR", or a neutral culture name, such as "fr".</para>
</item>
</list>
<para>If resources are needed for any assembly not listed under the <satelliteassemblies> node, the <see cref="T:System.Resources.ResourceManager" /> class probes for cultures using standard probing rules.</para>
<format type="text/html">
<a href="#ws" />
</format>
<format type="text/html">
<h2>win8_appname_long Apps</h2>
</format>
<block subset="none" type="note">
<para>Although the <see cref="T:System.Resources.ResourceManager" /> class is supported in win8_appname_long apps, we do not recommend its use. Use this class only when you develop net_portable projects that can be used with win8_appname_long apps. To retrieve resources from win8_appname_long apps, use the <see cref="http://go.microsoft.com/fwlink/p/?LinkId=238182">Windows.ApplicationModel.Resources.ResourceLoader</see> class instead.</para>
</block>
<para>For win8_appname_long apps, the <see cref="T:System.Resources.ResourceManager" /> class retrieves resources from package resource index (PRI) files. A single PRI file (the application package PRI file) contains the resources for both the default culture and any localized cultures. You use the MakePRI utility to create a PRI file from one or more resource files that are in XML resource (.resw) format. For resources that are included in a Visual Studio project, Visual Studio handles the process of creating and packaging the PRI file automatically. You can then use the .NET Framework <see cref="T:System.Resources.ResourceManager" /> class to access the app's or library's resources.</para>
<para>You can instantiate a <see cref="T:System.Resources.ResourceManager" /> object for a win8_appname_long app in the same way that you do for a desktop app. </para>
<para>You can then access the resources for a particular culture by passing the name of the resource to be retrieved to the <see cref="M:System.Resources.ResourceManager.GetString(System.String)" /> method. By default, this method returns the resource for the culture determined by the current UI culture of the thread that made the call. You can also retrieve the resources for a specific culture by passing the name of the resource and a <see cref="T:System.Globalization.CultureInfo" /> object that represents the culture whose resource is to be retrieved to the <see cref="M:System.Resources.ResourceManager.GetString(System.String,System.Globalization.CultureInfo)" /> method. If the resource for the current UI culture or the specified culture cannot be found, the resource manager uses a UI language fallback list to locate a suitable resource. </para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Represents a resource manager that provides convenient access to culture-specific resources at run time.</para>
</summary>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="protected ResourceManager ();" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue />
<Parameters />
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>This constructor is useful only if you write your own class that derives from the <see cref="T:System.Resources.ResourceManager" /> class.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of the <see cref="T:System.Resources.ResourceManager" /> class with default values.</para>
</summary>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ResourceManager (Type resourceSource);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Type resourceSource) cil managed" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue />
<Parameters>
<Parameter Name="resourceSource" Type="System.Type" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<format type="text/html">
<h2>Desktop Apps</h2>
</format>
<para>In desktop apps, the resource manager uses the <paramref name="resourceSource" /> parameter to load a particular resource file as follows: </para>
<list type="bullet">
<item>
<para>If the <see cref="T:System.Resources.NeutralResourcesLanguageAttribute" /> attribute is not used to indicate that the resources of the default culture reside in a satellite assembly, the resource manager assumes that the resource file for the default culture is found in the same assembly as the type specified by the <paramref name="resourceSource" /> parameter.</para>
</item>
<item>
<para>The resource manager assumes that the default resource file has the same base name as the type specified by the <paramref name="resourceSource" /> parameter.</para>
</item>
<item>
<para>The resource manager uses the default <see cref="T:System.Resources.ResourceSet" /> class to manipulate the resource file.</para>
</item>
</list>
<para>For example, given a type named MyCompany.MyProduct.MyType, the resource manager looks for a .resources file named MyCompany.MyProduct.MyType.resources in the assembly that defines MyType.</para>
<para>In Visual Studio, the Resource Designer automatically generates code that defines an internal (in C#) or Friend (in Visual Basic) class whose name is the same as the base name of the .resources file for the default culture. This makes it possible to instantiate a <see cref="T:System.Resources.ResourceManager" /> object and couple it with a particular set of resources by getting a type object whose name corresponds to the name of the resource, because as long as the class is visible to the compiler, the resources must be as well. For example, if a .resources file is named Resource1, the following statement instantiates a <see cref="T:System.Resources.ResourceManager" /> object to manage the .resources file named Resource1:</para>
<para>code reference: System.Resources.ResourceManager.ctor#2</para>
<para>If you're not using Visual Studio, you can create a class with no members whose namespace and name are the same as that of the default .resources file. The example provides an illustration.</para>
<format type="text/html">
<h2>win8_appname_long Apps</h2>
</format>
<block subset="none" type="note">
<para>Although the <see cref="T:System.Resources.ResourceManager" /> class is supported in win8_appname_long apps, we do not recommend its use. Use this class only when you develop net_portable projects that can be used with win8_appname_long apps. To retrieve resources from win8_appname_long apps, use the <see cref="http://go.microsoft.com/fwlink/p/?LinkId=238182">Windows.ApplicationModel.Resources.ResourceLoader</see> class instead.</para>
</block>
<para>In win8_appname_long apps, <see cref="T:System.Resources.ResourceManager" /> uses the <paramref name="resourceSource" /> parameter to infer the assembly, base name, and the namespace where the resource items can be located within the app's package resource index (PRI) file. For example, given a type named MyCompany.MyProduct.MyType that is defined in MyAssembly, the resource manager looks for a resource set identifier named MyAssembly and looks for a scope MyCompany.MyProduct.MyType within that resource set. The resource manager searches for resource items under the default context (current culture, current high contrast setting, and so on) within this scope.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of the <see cref="T:System.Resources.ResourceManager" /> class that looks up resources in satellite assemblies based on information from the specified type object.</para>
</summary>
<param name="resourceSource">
<attribution license="cc4" from="Microsoft" modified="false" />A type from which the resource manager derives all information for finding .resources files. </param>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ResourceManager (string baseName, System.Reflection.Assembly assembly);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string baseName, class System.Reflection.Assembly assembly) cil managed" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue />
<Parameters>
<Parameter Name="baseName" Type="System.String" />
<Parameter Name="assembly" Type="System.Reflection.Assembly" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<format type="text/html">
<h2>Desktop Apps</h2>
</format>
<para>In desktop apps, the individual culture-specific resource files should be contained in satellite assemblies, and the default culture's resource file should be contained in the main assembly. A satellite assembly is assumed to contain resources for a single culture specified in that assembly's manifest, and is loaded as necessary.</para>
<block subset="none" type="note">
<para>To retrieve resources from .resources files directly instead of retrieving them from assemblies, you must call the <see cref="M:System.Resources.ResourceManager.CreateFileBasedResourceManager(System.String,System.String,System.Type)" /> method instead to instantiate a <see cref="T:System.Resources.ResourceManager" /> object.</para>
</block>
<para>If the resource file identified by <paramref name="baseName" /> cannot be found in <paramref name="assembly" />, the method instantiates a <see cref="T:System.Resources.ResourceManager" /> object, but the attempt to retrieve a specific resource throws an exception, typically <see cref="T:System.Resources.MissingManifestResourceException" />. For information about diagnosing the cause of the exception, see the "Handling the MissingManifestResourceException Exception" section of the <see cref="T:System.Resources.ResourceManager" /> class topic.</para>
<format type="text/html">
<h2>win8_appname_long Apps</h2>
</format>
<block subset="none" type="note">
<para>Although the <see cref="T:System.Resources.ResourceManager" /> class is supported in win8_appname_long apps, we do not recommend its use. Use this class only when you develop net_portable projects that can be used with win8_appname_long apps. To retrieve resources from win8_appname_long apps, use the <see cref="http://go.microsoft.com/fwlink/p/?LinkId=238182">Windows.ApplicationModel.Resources.ResourceLoader</see> class instead.</para>
</block>
<para>In win8_appname_long apps, the resource manager uses the simple name of the <paramref name="assembly" /> parameter to look up a matching resource set in the app's package resource index (PRI) file. The <paramref name="baseName" /> parameter is used to look up a resource item within the resource set. For example, the root name for PortableLibrary1.Resource1.de-DE.resources is PortableLibrary1.Resource1. </para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of the <see cref="T:System.Resources.ResourceManager" /> class that looks up resources contained in files with the specified root name in the given assembly.</para>
</summary>
<param name="baseName">
<attribution license="cc4" from="Microsoft" modified="false" />The root name of the resource file without its extension but including any fully qualified namespace name. For example, the root name for the resource file named MyApplication.MyResource.en-US.resources is MyApplication.MyResource. </param>
<param name="assembly">
<attribution license="cc4" from="Microsoft" modified="false" />The main assembly for the resources. </param>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ResourceManager (string baseName, System.Reflection.Assembly assembly, Type usingResourceSet);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string baseName, class System.Reflection.Assembly assembly, class System.Type usingResourceSet) cil managed" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue />
<Parameters>
<Parameter Name="baseName" Type="System.String" />
<Parameter Name="assembly" Type="System.Reflection.Assembly" />
<Parameter Name="usingResourceSet" Type="System.Type" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The individual culture-specific resource files should be contained in satellite assemblies, and the default culture's resource file should be contained in the main assembly. A satellite assembly is assumed to contain resources for a single culture specified in that assembly's manifest, and is loaded as necessary.</para>
<block subset="none" type="note">
<para>To retrieve resources from .resources files directly instead of retrieving them from assemblies, you must call the <see cref="M:System.Resources.ResourceManager.CreateFileBasedResourceManager(System.String,System.String,System.Type)" /> method instead to instantiate a <see cref="T:System.Resources.ResourceManager" /> object.</para>
</block>
<para>If the resource file identified by <paramref name="baseName" /> cannot be found in <paramref name="assembly" />, the method instantiates a <see cref="T:System.Resources.ResourceManager" /> object, but the attempt to retrieve a specific resource throws an exception, typically <see cref="T:System.Resources.MissingManifestResourceException" />. For information about diagnosing the cause of the exception, see the "Handling the MissingManifestResourceException Exception" section of the <see cref="T:System.Resources.ResourceManager" /> class topic.</para>
<block subset="none" type="note">
<para>The <paramref name="usingResourceSet" /> parameter is used to support your own resource format, and will commonly be null. This is different from the constructor that takes a <see cref="T:System.Type" /> only.</para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of the <see cref="T:System.Resources.ResourceManager" /> class that uses a specified <see cref="T:System.Resources.ResourceSet" /> class to look up resources contained in files with the specified root name in the given assembly.</para>
</summary>
<param name="baseName">
<attribution license="cc4" from="Microsoft" modified="false" />The root name of the resource file without its extension but including any fully qualified namespace name. For example, the root name for the resource file named MyApplication.MyResource.en-US.resources is MyApplication.MyResource. </param>
<param name="assembly">
<attribution license="cc4" from="Microsoft" modified="false" />The main assembly for the resources. </param>
<param name="usingResourceSet">
<attribution license="cc4" from="Microsoft" modified="false" />The type of the custom <see cref="T:System.Resources.ResourceSet" /> to use. If null, the default runtime <see cref="T:System.Resources.ResourceSet" /> object is used. </param>
</Docs>
</Member>
<Member MemberName="BaseName">
<MemberSignature Language="C#" Value="public virtual string BaseName { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string BaseName" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<value>To be added: an object of type 'string'</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="P:System.Resources.ResourceManager.BaseName" /> property reflects the fully qualified namespace name and the root resource name of a resource file, without its culture or file name extension. For example, if an app's default resource file is named SampleApps.StringResources.resources, the value of the <see cref="P:System.Resources.ResourceManager.BaseName" /> property is "SampleApps.StringResources". If an app's default resource file is named SampleApps.StringResources.en-US.resources and is embedded in a satellite assembly, the value of the <see cref="P:System.Resources.ResourceManager.BaseName" /> property is still "SampleApps.StringResources". </para>
<block subset="none" type="note">
<para>The <see cref="P:System.Resources.ResourceManager.BaseName" /> property value of a resource file that is compiled and embedded from the command line does not include a namespace name unless you explicitly include one when compiling the file. On the other hand, the <see cref="P:System.Resources.ResourceManager.BaseName" /> property value of a resource file that is compiled and embedded within the Visual Studio environment typically does include the default namespace name.</para>
</block>
<para>The <see cref="P:System.Resources.ResourceManager.BaseName" /> property value is the same as the string passed to the <see cref="M:System.Resources.ResourceManager.#ctor(System.String,System.Reflection.Assembly)" /> or <see cref="M:System.Resources.ResourceManager.#ctor(System.String,System.Reflection.Assembly,System.Type)" /> constructor when instantiating a <see cref="T:System.Resources.ResourceManager" /> instance. </para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the root name of the resource files that the <see cref="T:System.Resources.ResourceManager" /> searches for resources.</para>
</summary>
</Docs>
</Member>
<Member MemberName="BaseNameField">
<MemberSignature Language="C#" Value="protected string BaseNameField;" />
<MemberSignature Language="ILAsm" Value=".field family string BaseNameField" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="F:System.Resources.ResourceManager.BaseNameField" /> field is useful only if you write your own class that derives from the <see cref="T:System.Resources.ResourceManager" /> class.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Specifies the root name of the resource files that the <see cref="T:System.Resources.ResourceManager" /> searches for resources.</para>
</summary>
</Docs>
</Member>
<Member MemberName="CreateFileBasedResourceManager">
<MemberSignature Language="C#" Value="public static System.Resources.ResourceManager CreateFileBasedResourceManager (string baseName, string resourceDir, Type usingResourceSet);" />
<MemberSignature Language="ILAsm" Value=".method public static hidebysig class System.Resources.ResourceManager CreateFileBasedResourceManager(string baseName, string resourceDir, class System.Type usingResourceSet) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Resources.ResourceManager</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="baseName" Type="System.String" />
<Parameter Name="resourceDir" Type="System.String" />
<Parameter Name="usingResourceSet" Type="System.Type" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>This method returns a resource manager that retrieves resources from a .resources file that is not embedded in an assembly. You can use this <see cref="T:System.Resources.ResourceManager" /> object to load resources for an ASP.NET page or to test a <see cref="T:System.Resources.ResourceSet" /> implementation. For an example that retrieves resources from a standalone .resources file, see the <format type="text/html"><a href="eca16922-1c46-4f68-aefe-e7a12283641f">Retrieving Resources in Desktop Apps</a></format> article.</para>
<para>This method lets you specify a <see cref="T:System.Resources.ResourceSet" /> implementation. If you do not want a specific <see cref="T:System.Resources.ResourceSet" /> implementation, but would like to use a custom resource file format, you should derive from the <see cref="T:System.Resources.ResourceSet" /> class, override the <see cref="M:System.Resources.ResourceSet.GetDefaultReader" /> and <see cref="M:System.Resources.ResourceSet.GetDefaultWriter" /> methods, and pass that type to this constructor.</para>
<block subset="none" type="note">
<para>Using standalone .resources files in an ASP.NET app will break XCOPY deployment, because the resources remain locked until they are explicitly released by the <see cref="M:System.Resources.ResourceManager.ReleaseAllResources" /> method. If you want to deploy resources with your ASP.NET apps, compile your .resources files into satellite assemblies.</para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Returns a <see cref="T:System.Resources.ResourceManager" /> object that searches a specific directory instead of an assembly manifest for resources.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>A new instance of a resource manager that searches the specified directory instead of an assembly manifest for resources.</para>
</returns>
<param name="baseName">
<attribution license="cc4" from="Microsoft" modified="false" />The root name of the resources. For example, the root name for the resource file named "MyResource.en-US.resources" is "MyResource". </param>
<param name="resourceDir">
<attribution license="cc4" from="Microsoft" modified="false" />The name of the directory to search for the resources. <paramref name="resourceDir" /> can be an absolute path or a relative path from the application directory. </param>
<param name="usingResourceSet">
<attribution license="cc4" from="Microsoft" modified="false" />The type of the custom <see cref="T:System.Resources.ResourceSet" /> to use. If null, the default runtime <see cref="T:System.Resources.ResourceSet" /> object is used. </param>
</Docs>
</Member>
<Member MemberName="FallbackLocation">
<MemberSignature Language="C#" Value="protected System.Resources.UltimateResourceFallbackLocation FallbackLocation { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Resources.UltimateResourceFallbackLocation FallbackLocation" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Resources.UltimateResourceFallbackLocation</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="P:System.Resources.ResourceManager.FallbackLocation" /> property is useful only if you write your own class that derives from the <see cref="T:System.Resources.ResourceManager" /> class.</para>
<para>You can use the <see cref="T:System.Resources.NeutralResourcesLanguageAttribute" /> attribute to inform the resource manager where to find the default culture for an app: in the main assembly (default) or in a satellite assembly.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets or sets the location from which to retrieve default fallback resources.</para>
</summary>
</Docs>
</Member>
<Member MemberName="GetNeutralResourcesLanguage">
<MemberSignature Language="C#" Value="protected static System.Globalization.CultureInfo GetNeutralResourcesLanguage (System.Reflection.Assembly a);" />
<MemberSignature Language="ILAsm" Value=".method familystatic hidebysig class System.Globalization.CultureInfo GetNeutralResourcesLanguage(class System.Reflection.Assembly a) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Globalization.CultureInfo</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="a" Type="System.Reflection.Assembly" />
</Parameters>
<Docs>
<remarks>To be added</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Returns culture-specific information for the main assembly's default resources by retrieving the value of the <see cref="T:System.Resources.NeutralResourcesLanguageAttribute" /> attribute on a specified assembly.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The culture from the <see cref="T:System.Resources.NeutralResourcesLanguageAttribute" /> attribute, if found; otherwise, the invariant culture.</para>
</returns>
<param name="a">
<attribution license="cc4" from="Microsoft" modified="false" />The assembly for which to return culture-specific information. </param>
</Docs>
</Member>
<Member MemberName="GetObject">
<MemberSignature Language="C#" Value="public virtual object GetObject (string name);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance object GetObject(string name) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="name" Type="System.String" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="M:System.Resources.ResourceManager.GetObject(System.String)" /> method is used to retrieve non-string resources. These include values that belong to primitive data types such as <see cref="T:System.Int32" /> or <see cref="T:System.Double" />, bitmaps (such as a <see cref="T:System.Drawing.Bitmap" /> object), or custom serialized objects. Typically, the returned object must be cast (in C#) or converted (in Visual Basic) to an object of the appropriate type. </para>
<para>The returned resource is localized for the UI culture of the current thread, which is defined by the <see cref="P:System.Globalization.CultureInfo.CurrentUICulture" /> property. If the resource is not localized for that culture, the resource manager uses fallback rules to load an appropriate resource. If no usable set of localized resources is found, the <see cref="T:System.Resources.ResourceManager" /> falls back on the default culture's resources. If a resource set for the default culture is not found, the method throws a <see cref="T:System.Resources.MissingManifestResourceException" /> exception or, if the resource set is expected to reside in a satellite assembly, a <see cref="T:System.Resources.MissingSatelliteAssemblyException" /> exception. If the resource manager can load an appropriate resource set but cannot find a resource named <paramref name="name" />, the method returns null.</para>
<para>The <see cref="P:System.Resources.ResourceManager.IgnoreCase" /> property determines whether the comparison of <paramref name="name" /> with the names of resources is case-insensitive (the default) or case-sensitive. </para>
<block subset="none" type="note">
<para>This method can throw more exceptions than are listed. One reason this might occur is if a method that this method calls throws an exception. For example, a <see cref="T:System.IO.FileLoadException" /> exception might be thrown if an error was made deploying or installing a satellite assembly, or a <see cref="T:System.Runtime.Serialization.SerializationException" /> exception might be thrown if a user-defined type throws a user-defined exception when the type is deserialized. </para>
</block>
<format type="text/html">
<h2>Performance Considerations</h2>
</format>
<para>If you call the <see cref="Overload:System.Resources.ResourceManager.GetObject" /> method multiple times with the same <paramref name="name" /> parameter, do not depend on the method returning a reference to the same object with each call. This is because the <see cref="Overload:System.Resources.ResourceManager.GetObject" /> method can return a reference to an existing resource object in a cache, or it can reload the resource and return a reference to a new resource object.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Returns the value of the specified non-string resource.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The value of the resource localized for the caller's current culture settings. If an appropriate resource set exists but <paramref name="name" /> cannot be found, the method returns null. </para>
</returns>
<param name="name">
<attribution license="cc4" from="Microsoft" modified="false" />The name of the resource to get. </param>
</Docs>
</Member>
<Member MemberName="GetObject">
<MemberSignature Language="C#" Value="public virtual object GetObject (string name, System.Globalization.CultureInfo culture);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance object GetObject(string name, class System.Globalization.CultureInfo culture) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Object</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="name" Type="System.String" />
<Parameter Name="culture" Type="System.Globalization.CultureInfo" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="M:System.Resources.ResourceManager.GetObject(System.String,System.Globalization.CultureInfo)" /> method is used to retrieve non-string resources. These include values that belong to primitive data types such as <see cref="T:System.Int32" /> or <see cref="T:System.Double" />, bitmaps (such as a <see cref="T:System.Drawing.Bitmap" /> object), or custom serialized objects. Typically, the returned object must be cast (in C#) or converted (in Visual Basic) to an object of the appropriate type. </para>
<para>The returned resource is localized for the culture that is specified by <paramref name="culture" />, or for the culture that is specified by the <see cref="P:System.Globalization.CultureInfo.CurrentUICulture" /> property if <paramref name="culture" /> is null. If the resource is not localized for that culture, the resource manager uses fallback rules to load an appropriate resource. If no usable set of localized resources is found, the resource manager falls back on the default culture's resources. If a resource set for the default culture is not found, the method throws a <see cref="T:System.Resources.MissingManifestResourceException" /> exception or, if the resource set is expected to reside in a satellite assembly, a <see cref="T:System.Resources.MissingSatelliteAssemblyException" /> exception. If the resource manager can load an appropriate resource set but cannot find a resource named <paramref name="name" />, the method returns null.</para>
<para>The <see cref="P:System.Resources.ResourceManager.IgnoreCase" /> property determines whether the comparison of <paramref name="name" /> with the names of resources is case-insensitive (the default) or case-sensitive. </para>
<block subset="none" type="note">
<para>This method can throw more exceptions than are listed. One reason this might occur is if a method that this method calls throws an exception. For example, a <see cref="T:System.IO.FileLoadException" /> exception might be thrown if an error was made deploying or installing a satellite assembly, or a <see cref="T:System.Runtime.Serialization.SerializationException" /> exception might be thrown if a user-defined type throws a user-defined exception when the type is deserialized. </para>
</block>
<format type="text/html">
<h2>Performance Considerations</h2>
</format>
<para>If you call the <see cref="Overload:System.Resources.ResourceManager.GetObject" /> method multiple times with the same <paramref name="name" /> parameter, do not depend on the method returning a reference to the same object with each call. This is because the <see cref="Overload:System.Resources.ResourceManager.GetObject" /> method can return a reference to an existing resource object in a cache, or it can reload the resource and return a reference to a new resource object.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the value of the specified non-string resource localized for the specified culture.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The value of the resource, localized for the specified culture. If an appropriate resource set exists but <paramref name="name" /> cannot be found, the method returns null.</para>
</returns>
<param name="name">
<attribution license="cc4" from="Microsoft" modified="false" />The name of the resource to get. </param>
<param name="culture">
<attribution license="cc4" from="Microsoft" modified="false" />The culture for which the resource is localized. If the resource is not localized for this culture, the resource manager uses fallback rules to locate an appropriate resource.</param>
</Docs>
</Member>
<Member MemberName="GetResourceFileName">
<MemberSignature Language="C#" Value="protected virtual string GetResourceFileName (System.Globalization.CultureInfo culture);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance string GetResourceFileName(class System.Globalization.CultureInfo culture) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="culture" Type="System.Globalization.CultureInfo" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="M:System.Resources.ResourceManager.GetResourceFileName(System.Globalization.CultureInfo)" /> method is useful only if you write your own class that derives from the <see cref="T:System.Resources.ResourceManager" /> class.</para>
<para>This method uses the <see cref="P:System.Globalization.CultureInfo.Name" /> property as part of the file name for all cultures other than the invariant culture. This method does not look in an assembly's manifest or touch the disk, and is used only to construct a resource file name (suitable for passing to the <see cref="T:System.Resources.ResourceReader" /> constructor) or a manifest resource blob name.</para>
<para>A derived class can override this method to look for a different extension, such as ".ResX", or a completely different scheme for naming resource files. Note that the method can be used to customize the name of a resource file within a satellite assembly, and not to customize the name of the satellite assembly itself.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Generates the name of the resource file for the given <see cref="T:System.Globalization.CultureInfo" /> object.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The name that can be used for a resource file for the given <see cref="T:System.Globalization.CultureInfo" /> object.</para>
</returns>
<param name="culture">
<attribution license="cc4" from="Microsoft" modified="false" />The culture object for which a resource file name is constructed. </param>
</Docs>
</Member>
<Member MemberName="GetResourceSet">
<MemberSignature Language="C#" Value="public virtual System.Resources.ResourceSet GetResourceSet (System.Globalization.CultureInfo culture, bool createIfNotExists, bool tryParents);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance class System.Resources.ResourceSet GetResourceSet(class System.Globalization.CultureInfo culture, bool createIfNotExists, bool tryParents) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Resources.ResourceSet</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="culture" Type="System.Globalization.CultureInfo" />
<Parameter Name="createIfNotExists" Type="System.Boolean" />
<Parameter Name="tryParents" Type="System.Boolean" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The resource set that is returned represents the resources that are localized for the specified culture. If the resources have not been localized for that culture and <paramref name="tryParents" /> is true, <see cref="M:System.Resources.ResourceManager.GetResourceSet(System.Globalization.CultureInfo,System.Boolean,System.Boolean)" /> uses resource fallback rules to load an appropriate resource. If <paramref name="tryParents" /> is false and a culture-specific resource set cannot be found, the method returns null. For more information about resource fallback, see "The Resource Fallback Process" section in the <format type="text/html"><a href="b224d7c0-35f8-4e82-a705-dd76795e8d16">Packaging and Deploying Resources</a></format> article.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Retrieves the resource set for a particular culture.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The resource set for the specified culture.</para>
</returns>
<param name="culture">
<attribution license="cc4" from="Microsoft" modified="false" />The culture whose resources are to be retrieved. </param>
<param name="createIfNotExists">
<attribution license="cc4" from="Microsoft" modified="false" />true to load the resource set, if it has not been loaded yet; otherwise, false. </param>
<param name="tryParents">
<attribution license="cc4" from="Microsoft" modified="false" />true to use resource fallback to load an appropriate resource if the resource set cannot be found; false to bypass the resource fallback process. (See the Remarks section.)</param>
</Docs>
</Member>
<Member MemberName="GetSatelliteContractVersion">
<MemberSignature Language="C#" Value="protected static Version GetSatelliteContractVersion (System.Reflection.Assembly a);" />
<MemberSignature Language="ILAsm" Value=".method familystatic hidebysig class System.Version GetSatelliteContractVersion(class System.Reflection.Assembly a) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Version</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="a" Type="System.Reflection.Assembly" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>For more information about satellite assembly versioning, see the <see cref="T:System.Resources.SatelliteContractVersionAttribute" /> reference topic.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Returns the version specified by the <see cref="T:System.Resources.SatelliteContractVersionAttribute" /> attribute in the given assembly.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The satellite contract version of the given assembly, or null if no version was found.</para>
</returns>
<param name="a">
<attribution license="cc4" from="Microsoft" modified="false" />The assembly to check for the <see cref="T:System.Resources.SatelliteContractVersionAttribute" /> attribute. </param>
</Docs>
</Member>
<Member MemberName="GetStream">
<MemberSignature Language="C#" Value="public System.IO.UnmanagedMemoryStream GetStream (string name);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.IO.UnmanagedMemoryStream GetStream(string name) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.IO.UnmanagedMemoryStream</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="name" Type="System.String" />
</Parameters>
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="M:System.Resources.ResourceManager.GetStream(System.String)" /> method takes the name of a resource that is stored as a <see cref="T:System.IO.MemoryStream" /> object, gets the value of the <see cref="T:System.Object" /> resource, and returns an <see cref="T:System.IO.UnmanagedMemoryStream" /> object. It requires that you work directly with a stream of bytes, which you then convert to an object. This method is useful primarily for performance reasons: Retrieving a resource as a byte stream instead of an explicit object can improve performance. </para>
<para>The returned resource is localized for the UI culture of the current thread, which is defined by the <see cref="P:System.Globalization.CultureInfo.CurrentUICulture" /> property. If the resource is not localized for that culture, the resource manager uses fallback rules to load an appropriate resource. If no usable set of localized resources is found, the <see cref="T:System.Resources.ResourceManager" /> falls back on the default culture's resources. If a resource set for the default culture is not found, the method throws a <see cref="T:System.Resources.MissingManifestResourceException" /> exception or, if the resource set is expected to reside in a satellite assembly, a <see cref="T:System.Resources.MissingSatelliteAssemblyException" /> exception. If the resource manager can load an appropriate resource set but cannot find a resource named <paramref name="name" />, the method returns null.</para>
<para>The <see cref="P:System.Resources.ResourceManager.IgnoreCase" /> property determines whether the comparison of <paramref name="name" /> with the names of resources is case-insensitive (the default) or case-sensitive. </para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Returns an unmanaged memory stream object from the specified resource.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>An unmanaged memory stream object that represents a resource .</para>
</returns>
<param name="name">
<attribution license="cc4" from="Microsoft" modified="false" />The name of a resource.</param>
</Docs>
</Member>
<Member MemberName="GetStream">
<MemberSignature Language="C#" Value="public System.IO.UnmanagedMemoryStream GetStream (string name, System.Globalization.CultureInfo culture);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance class System.IO.UnmanagedMemoryStream GetStream(string name, class System.Globalization.CultureInfo culture) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.IO.UnmanagedMemoryStream</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="name" Type="System.String" />
<Parameter Name="culture" Type="System.Globalization.CultureInfo" />
</Parameters>
<Docs>
<since version=".NET 2.0" />
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="M:System.Resources.ResourceManager.GetStream(System.String,System.Globalization.CultureInfo)" /> method takes the name of a resource that is stored as a <see cref="T:System.IO.MemoryStream" /> object, gets the value of the <see cref="T:System.Object" /> resource, and returns an <see cref="T:System.IO.UnmanagedMemoryStream" /> object. It requires that you work directly with a stream of bytes, which you then convert to an object. This method is useful primarily for performance reasons: Retrieving a resource as a byte stream instead of an explicit object can improve performance. </para>
<para>The returned resource is localized for the culture that is specified by <paramref name="culture" />, or for the culture that is specified by the <see cref="P:System.Globalization.CultureInfo.CurrentUICulture" /> property if <paramref name="culture" /> is null. If the resource is not localized for that culture, the resource manager uses fallback rules to load an appropriate resource. If no usable set of localized resources is found, the <see cref="T:System.Resources.ResourceManager" /> falls back on the default culture's resources. If a resource set for the default culture is not found, the method throws a <see cref="T:System.Resources.MissingManifestResourceException" /> exception or, if the resource set is expected to reside in a satellite assembly, a <see cref="T:System.Resources.MissingSatelliteAssemblyException" /> exception. If the resource manager can load an appropriate resource set but cannot find a resource named <paramref name="name" />, the method returns null.</para>
<para>The <see cref="P:System.Resources.ResourceManager.IgnoreCase" /> property determines whether the comparison of <paramref name="name" /> with the names of resources is case-insensitive (the default) or case-sensitive. </para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Returns an unmanaged memory stream object from the specified resource, using the specified culture.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>An unmanaged memory stream object that represents a resource.</para>
</returns>
<param name="name">
<attribution license="cc4" from="Microsoft" modified="false" />The name of a resource.</param>
<param name="culture">
<attribution license="cc4" from="Microsoft" modified="false" />An object that specifies the culture to use for the resource lookup. If <paramref name="culture" /> is null, the culture for the current thread is used.</param>
</Docs>
</Member>
<Member MemberName="GetString">
<MemberSignature Language="C#" Value="public virtual string GetString (string name);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance string GetString(string name) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="name" Type="System.String" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<format type="text/html">
<h2>Desktop Apps</h2>
</format>
<para>In desktop apps, the resource that is returned is localized for the UI culture of the current thread, as defined by the <see cref="P:System.Globalization.CultureInfo.CurrentUICulture" /> property. If the resource has not been localized for that culture, the resource manager probes for a resource by following the steps outlined in the "Resource Fallback Process" section of the <format type="text/html"><a href="b224d7c0-35f8-4e82-a705-dd76795e8d16">Packaging and Deploying Resources</a></format> article. If no usable set of localized resources is found, the resource manager falls back on the default culture's resources. If the resource manager cannot load the default culture's resource set, the method throws a <see cref="T:System.Resources.MissingManifestResourceException" /> exception or, if the resource set is expected to reside in a satellite assembly, a <see cref="T:System.Resources.MissingSatelliteAssemblyException" /> exception. If the resource manager can load an appropriate resource set but cannot find a resource named <paramref name="name" />, the method returns null.</para>
<para>The <see cref="P:System.Resources.ResourceManager.IgnoreCase" /> property determines whether the comparison of <paramref name="name" /> with the names of resources is case-insensitive (the default) or case-sensitive. </para>
<block subset="none" type="note">
<para>This method can throw more exceptions than are listed. One reason this might occur is if a method that this method calls throws an exception. For example, a <see cref="T:System.IO.FileLoadException" /> exception might be thrown if an error was made deploying or installing a satellite assembly, or a <see cref="T:System.Runtime.Serialization.SerializationException" /> exception might be thrown if a user-defined type throws a user-defined exception when the type is deserialized. </para>
</block>
<format type="text/html">
<h2>win8_appname_long Apps</h2>
</format>
<block subset="none" type="note">
<para>Although the <see cref="T:System.Resources.ResourceManager" /> class is supported in win8_appname_long apps, we do not recommend its use. Use this class only when you develop net_portable projects that can be used with win8_appname_long apps. To retrieve resources from win8_appname_long apps, use the <see cref="http://go.microsoft.com/fwlink/p/?LinkId=238182">Windows.ApplicationModel.Resources.ResourceLoader</see> class instead.</para>
</block>
<para>In win8_appname_long apps, the <see cref="M:System.Resources.ResourceManager.GetString(System.String)" /> method returns the value of the <paramref name="name" /> string resource, localized for the caller's current UI culture settings. The list of cultures is derived from the operating system's preferred UI language list. If the resource manager cannot match <paramref name="name" />, the method returns null. </para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Returns the value of the specified string resource.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The value of the resource localized for the caller's current UI culture, or null if <paramref name="name" /> cannot be found in a resource set.</para>
</returns>
<param name="name">
<attribution license="cc4" from="Microsoft" modified="false" />The name of the resource to retrieve. </param>
</Docs>
</Member>
<Member MemberName="GetString">
<MemberSignature Language="C#" Value="public virtual string GetString (string name, System.Globalization.CultureInfo culture);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance string GetString(string name, class System.Globalization.CultureInfo culture) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="name" Type="System.String" />
<Parameter Name="culture" Type="System.Globalization.CultureInfo" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<format type="text/html">
<h2>Desktop Apps</h2>
</format>
<para>In desktop apps, if <paramref name="culture" /> is null, the <see cref="M:System.Resources.ResourceManager.GetString(System.String,System.Globalization.CultureInfo)" /> method uses the current UI culture obtained from the <see cref="P:System.Globalization.CultureInfo.CurrentUICulture" /> property. </para>
<para>The resource that is returned is localized for the culture specified by the <paramref name="culture" /> parameter. If the resource has not been localized for <paramref name="culture" />, the resource manager probes for a resource by following the steps outlined in the "Resource Fallback Process" section of the <format type="text/html"><a href="B224D7C0-35F8-4E82-A705-DD76795E8D16">Packaging and Deploying Resources</a></format> topic. If no usable set of resources is found, the resource manager falls back on the default culture's resources. If the resource manager cannot load the default culture's resource set, the method throws a <see cref="T:System.Resources.MissingManifestResourceException" /> exception or, if the resource set is expected to reside in a satellite assembly, a <see cref="T:System.Resources.MissingSatelliteAssemblyException" /> exception. If the resource manager can load an appropriate resource set but cannot find a resource named <paramref name="name" />, the method returns null.</para>
<para>The <see cref="P:System.Resources.ResourceManager.IgnoreCase" /> property determines whether the comparison of <paramref name="name" /> with the names of resources is case-insensitive (the default) or case-sensitive. </para>
<block subset="none" type="note">
<para>This method can throw more exceptions than are listed. One reason this might occur is if a method that this method calls throws an exception. For example, a <see cref="T:System.IO.FileLoadException" /> exception might be thrown if an error was made deploying or installing a satellite assembly, or a <see cref="T:System.Runtime.Serialization.SerializationException" /> exception might be thrown if a user-defined type throws a user-defined exception when the type is deserialized. </para>
</block>
<format type="text/html">
<h2>win8_appname_long Apps</h2>
</format>
<block subset="none" type="note">
<para>Although the <see cref="T:System.Resources.ResourceManager" />class is supported in win8_appname_long apps, we do not recommend its use. Use this class only when you develop net_portable projects that can be used with win8_appname_long apps. To retrieve resources from win8_appname_long apps, use the <see cref="http://go.microsoft.com/fwlink/p/?LinkId=238182">Windows.ApplicationModel.Resources.ResourceLoader</see> class instead.</para>
</block>
<para>In win8_appname_long apps, the <see cref="M:System.Resources.ResourceManager.GetString(System.String,System.Globalization.CultureInfo)" /> method returns the value of the <paramref name="name" /> string resource, localized for the culture specified by the <paramref name="culture" /> parameter. If the resource is not localized for the <paramref name="culture" /> culture, the lookup uses the entire win8 language fallback list, and stops after looking in the default culture. If the resource manager cannot match <paramref name="name" />, the method returns null.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Returns the value of the string resource localized for the specified culture.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The value of the resource localized for the specified culture, or null if <paramref name="name" /> cannot be found in a resource set.</para>
</returns>
<param name="name">
<attribution license="cc4" from="Microsoft" modified="false" />The name of the resource to retrieve. </param>
<param name="culture">
<attribution license="cc4" from="Microsoft" modified="false" />An object that represents the culture for which the resource is localized. </param>
</Docs>
</Member>
<Member MemberName="HeaderVersionNumber">
<MemberSignature Language="C#" Value="public static readonly int HeaderVersionNumber;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly int32 HeaderVersionNumber" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters />
<MemberValue>1</MemberValue>
<Docs>
<remarks>To be added</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para> Specifies the version of resource file headers that the current implementation of <see cref="T:System.Resources.ResourceManager" /> can interpret and produce.</para>
</summary>
</Docs>
</Member>
<Member MemberName="IgnoreCase">
<MemberSignature Language="C#" Value="public virtual bool IgnoreCase { get; set; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool IgnoreCase" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Parameters>
</Parameters>
<Docs>
<value>To be added: an object of type 'bool'</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>If the value of the <see cref="P:System.Resources.ResourceManager.IgnoreCase" /> property is false, a resource with the name "Resource" is not equivalent to the resource with the name "resource". If <see cref="P:System.Resources.ResourceManager.IgnoreCase" /> is true, a resource with the name "Resource" is equivalent to the resource with the name "resource". Note, however, that when <see cref="P:System.Resources.ResourceManager.IgnoreCase" /> is true, the <see cref="M:System.Resources.ResourceManager.GetString(System.String)" /> and <see cref="M:System.Resources.ResourceManager.GetObject(System.String)" /> methods perform case-insensitive string comparisons by using the invariant culture. The advantage is that results of case-insensitive string comparisons performed by these methods are the same on all computers regardless of culture. The disadvantage is that the results are not consistent with the casing rules of all cultures.</para>
<para>For example, the Turkish alphabet has two versions of the character I: one with a dot and one without a dot. In Turkish, the character I (Unicode 0049) is considered the uppercase version of a different character ı (Unicode 0131). The character i (Unicode 0069) is considered the lowercase version of yet another character İ (Unicode 0130). According to these casing rules, a case-insensitive string comparison of the characters i (Unicode 0069) and I (Unicode 0049) should fail for the culture "tr-TR" (Turkish in Turkey). However, because the comparison is conducted by using the casing rules of the invariant culture if <see cref="P:System.Resources.ResourceManager.IgnoreCase" /> is true, this comparison succeeds.</para>
<block subset="none" type="note">
<para>For performance reasons, it is best to always specify the correct case for your resource names. Setting <see cref="P:System.Resources.ResourceManager.IgnoreCase" /> to true can cause a significant increase in working set and a significant decline in performance. </para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets or sets a value that indicates whether the resource manager allows case-insensitive resource lookups in the <see cref="M:System.Resources.ResourceManager.GetString(System.String)" /> and <see cref="M:System.Resources.ResourceManager.GetObject(System.String)" /> methods.</para>
</summary>
</Docs>
</Member>
<Member MemberName="InternalGetResourceSet">
<MemberSignature Language="C#" Value="protected virtual System.Resources.ResourceSet InternalGetResourceSet (System.Globalization.CultureInfo culture, bool createIfNotExists, bool tryParents);" />
<MemberSignature Language="ILAsm" Value=".method familyhidebysig newslot virtual instance class System.Resources.ResourceSet InternalGetResourceSet(class System.Globalization.CultureInfo culture, bool createIfNotExists, bool tryParents) cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Resources.ResourceSet</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="culture" Type="System.Globalization.CultureInfo" />
<Parameter Name="createIfNotExists" Type="System.Boolean" />
<Parameter Name="tryParents" Type="System.Boolean" />
</Parameters>
<Docs>
<remarks>To be added</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Provides the implementation for finding a resource set.</para>
</summary>
<returns>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The specified resource set.</para>
</returns>
<param name="culture">
<attribution license="cc4" from="Microsoft" modified="false" />The culture object to look for. </param>
<param name="createIfNotExists">
<attribution license="cc4" from="Microsoft" modified="false" />true to load the resource set, if it has not been loaded yet; otherwise, false. </param>
<param name="tryParents">
<attribution license="cc4" from="Microsoft" modified="false" />true to check parent <see cref="T:System.Globalization.CultureInfo" /> objects if the resource set cannot be loaded; otherwise, false.</param>
</Docs>
</Member>
<Member MemberName="MagicNumber">
<MemberSignature Language="C#" Value="public static readonly int MagicNumber;" />
<MemberSignature Language="ILAsm" Value=".field public static initonly int32 MagicNumber" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Int32</ReturnType>
</ReturnValue>
<Parameters />
<MemberValue>-1091581234</MemberValue>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The value is set to 0xBEEFCACE. The first four bytes of the system default file format contain a 32-bit signed integer in little-endian format (see <see cref="T:System.Text.Encoding" />).</para>
<para>If the <see cref="F:System.Resources.ResourceManager.MagicNumber" /> is found, the bytes following it will be a version number for a <see cref="T:System.Resources.ResourceManager" /> header, followed by a number indicating how many bytes should be skipped to get past this header. The next number indicates the version of the <see cref="T:System.Resources.ResourceManager" /> that created the header, followed by version specific information.</para>
<para>The version number for the current implementation is one. The next bytes are a length-prefixed string containing the name of an <see cref="T:System.Resources.IResourceReader" />, which can read this file.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Holds the number used to identify resource files.</para>
</summary>
</Docs>
</Member>
<Member MemberName="MainAssembly">
<MemberSignature Language="C#" Value="protected System.Reflection.Assembly MainAssembly;" />
<MemberSignature Language="ILAsm" Value=".field family class System.Reflection.Assembly MainAssembly" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Reflection.Assembly</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="F:System.Resources.ResourceManager.MainAssembly" /> field is useful only if you write your own class that derives from the <see cref="T:System.Resources.ResourceManager" /> class.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Specifies the main assembly that contains the resources.</para>
</summary>
</Docs>
</Member>
<Member MemberName="ReleaseAllResources">
<MemberSignature Language="C#" Value="public virtual void ReleaseAllResources ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void ReleaseAllResources() cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>This method will shrink the working set in a running app. Any future resource lookups on this <see cref="T:System.Resources.ResourceManager" /> object will be as expensive as the first lookup, because the resource manager will have to search and load resources again. This can be useful in some complex threading scenarios, where creating a new <see cref="T:System.Resources.ResourceManager" /> object is the appropriate behavior.</para>
<block subset="none" type="note">
<para>Starting with the .NET Framework version 2.0, the <see cref="M:System.Resources.ResourceManager.ReleaseAllResources" /> method is not thread safe with respect to <see cref="Overload:System.Resources.ResourceManager.GetObject" />, <see cref="Overload:System.Resources.ResourceManager.GetString" />, and <see cref="Overload:System.Resources.ResourceManager.GetStream" /> operations. The advantage of this change is a performance improvement for multiple threads that access resources. However, if you call the <see cref="M:System.Resources.ResourceManager.ReleaseAllResources" /> method in one thread while simultaneously getting a resource in another thread, the get operation can throw an <see cref="T:System.ObjectDisposedException" /> exception.</para>
</block>
<para>You can also use this method in situations where the managed instances for the resources created by the current resource manager have to be released deterministically, without waiting for the resource manager to go completely out of scope and be garbage collected.</para>
<block subset="none" type="note">
<para>Calling this method does not unload satellite assemblies. To unload satellite assemblies, use the <see cref="M:System.AppDomain.Unload(System.AppDomain)" /> method .</para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Tells the resource manager to call the <see cref="M:System.Resources.ResourceSet.Close" /> method on all <see cref="T:System.Resources.ResourceSet" /> objects and release all resources.</para>
</summary>
</Docs>
</Member>
<Member MemberName="ResourceSets">
<MemberSignature Language="C#" Value="protected System.Collections.Hashtable ResourceSets;" />
<MemberSignature Language="ILAsm" Value=".field family class System.Collections.Hashtable ResourceSets" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Obsolete("Use InternalGetResourceSet instead.")</AttributeName>
</Attribute>
</Attributes>
<ReturnValue>
<ReturnType>System.Collections.Hashtable</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>To be added</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Contains a <see cref="T:System.Collections.Hashtable" /> that returns a mapping from cultures to <see cref="T:System.Resources.ResourceSet" /> objects. </para>
</summary>
</Docs>
</Member>
<Member MemberName="ResourceSetType">
<MemberSignature Language="C#" Value="public virtual Type ResourceSetType { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Type ResourceSetType" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Type</ReturnType>
</ReturnValue>
<Docs>
<value>To be added: an object of type 'Type'</value>
<remarks>To be added</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the type of the resource set object that the resource manager uses to construct a <see cref="T:System.Resources.ResourceSet" /> object.</para>
</summary>
</Docs>
</Member>
</Members>
</Type>
|