You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: xml/System.DirectoryServices.AccountManagement/AuthenticablePrincipal.xml
+3-4
Original file line number
Diff line number
Diff line change
@@ -729,7 +729,7 @@
729
729
730
730
A search is performed for all authenticable principals under the container "DC=adamApp1,DC=fabrikam,DC=com" that have not logged on to this ADAM instance for the last 45 days. The principals returned by the search are then deleted.
731
731
732
-
```
732
+
```csharp
733
733
PrincipalContext ctx = new PrincipalContext(
734
734
ContextType.ApplicationDirectory,
735
735
"adamHost1.fabrikam.com:5000",
@@ -748,7 +748,6 @@ foreach (Principal p in oldPrincipals)
748
748
749
749
oldPrincipals.Dispose();
750
750
ctx.Dispose();
751
-
752
751
```
753
752
754
753
]]></format>
@@ -1280,9 +1279,9 @@ ctx.Dispose();
1280
1279
## Examples
1281
1280
The following example code connects to the LDAP domain "fabrikam.com" with the username (administrator) and password (SecretPwd123) initialized in the <xref:System.DirectoryServices.AccountManagement.PrincipalContext> constructor.
1282
1281
1283
-
A search is performed to find the user with name "John Smith" under the container specified in the <xref:System.DirectoryServices.AccountManagement.PrincipalContext> constructor: "CN=Users,DC=fabrikam,DC=com." If the user is found, a check is performed to determine whether this user's account has been locked out. If the account has been locked out, the code example unlocks the account.
1282
+
A search is performed to find the user with name "John Smith" under the container specified in the <xref:System.DirectoryServices.AccountManagement.PrincipalContext> constructor: "CN=Users,DC=fabrikam,DC=com." If the user is found, a check is performed to determine whether this user's account has been locked out. If the account has been locked out, the code example unlocks the account.
1284
1283
1285
-
```
1284
+
```csharp
1286
1285
PrincipalContext ctx = new PrincipalContext(ContextType.Domain,
Copy file name to clipboardExpand all lines: xml/System.EnterpriseServices/ServicedComponent.xml
+1-1
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,7 @@
52
52
53
53
To deploy this class as a configured COM component, you must generate a strong key, compile the class as a library, and register the library. These three steps are accomplished by the following three commands.
Copy file name to clipboardExpand all lines: xml/System.Messaging/DefaultPropertiesToSend.xml
+2-2
Original file line number
Diff line number
Diff line change
@@ -72,7 +72,7 @@
72
72
73
73
There are two ways to define a queue's default properties to send, as shown in the following C# code. You can set values for this instance of <xref:System.Messaging.DefaultPropertiesToSend> and associate it with the queue's <xref:System.Messaging.MessageQueue.DefaultPropertiesToSend%2A?displayProperty=nameWithType> property:
74
74
75
-
```
75
+
```csharp
76
76
DefaultPropertiesToSend myDefaultProperties = new DefaultPropertiesToSend();
77
77
// Set default values for the properties.
78
78
myDefaultProperties.Label = "myLabel";
@@ -84,7 +84,7 @@ DefaultPropertiesToSend myDefaultProperties = new DefaultPropertiesToSend();
84
84
85
85
Or, you can individually assign values to the <xref:System.Messaging.MessageQueue> instance's <xref:System.Messaging.MessageQueue.DefaultPropertiesToSend%2A> property directly:
Copy file name to clipboardExpand all lines: xml/System.Messaging/MessageQueue.xml
+2-7
Original file line number
Diff line number
Diff line change
@@ -4117,13 +4117,8 @@ The name of the computer is not valid, possibly because the syntax is incorrect.
4117
4117
<ReturnType>System.String</ReturnType>
4118
4118
</ReturnValue>
4119
4119
<Docs>
4120
-
<summary>Introduced in MSMQ 3.0. Gets or sets the multicast address associated with the queue.</summary>
4121
-
<value>A <see cref="T:System.String" /> that contains a valid multicast address (in the form shown below) or <see langword="null" />, which indicates that the queue is not associated with a multicast address.
4122
-
4123
-
```
4124
-
<address>:<port>
4125
-
```
4126
-
</value>
4120
+
<summary>Gets or sets the multicast address associated with the queue.</summary>
4121
+
<value>A valid multicast address (in the form <address>:<port>) or <see langword="null" />, which indicates that the queue is not associated with a multicast address.</value>
Copy file name to clipboardExpand all lines: xml/System.Resources.Tools/StronglyTypedResourceBuilder.xml
+1-1
Original file line number
Diff line number
Diff line change
@@ -295,7 +295,7 @@
295
295
## Remarks
296
296
This overload enables you to use the `resourcesNamespace` parameter to specify the namespace for the generated resources. In this case, the generated code appears as follows:
297
297
298
-
```
298
+
```csharp
299
299
System.Resources.ResourceManager rm = new System.Resources.ResourceManager("<resourceNamespace>.<baseName>",typeof(baseName).Assembly);
Copy file name to clipboardExpand all lines: xml/System.Resources/ResXResourceReader.xml
+1-1
Original file line number
Diff line number
Diff line change
@@ -988,7 +988,7 @@
988
988
989
989
The resource XML file used by the example contains one data node and one metadata node. To use the XML file with the previous example, copy the following text and save it to a file named Resource1.resx.
Copy file name to clipboardExpand all lines: xml/System.Resources/ResourceManager.xml
+7-16
Original file line number
Diff line number
Diff line change
@@ -893,10 +893,9 @@
893
893
894
894
895
895
## Examples
896
-
The following example calls the <xref:System.Resources.ResourceManager.GetResourceSet%2A> method to retrieve culture-specific resources for the French (France) culture. It then enumerates all of the resources in the resource set. It contains the source code for an executable named ShowNumbers.exe. It also includes the following two text file that contain the names of numbers. The first, NumberResources.txt, contains the names of numbers from one to ten in the English language:
897
-
898
-
```
896
+
The following example calls the <xref:System.Resources.ResourceManager.GetResourceSet%2A> method to retrieve culture-specific resources for the French (France) culture. It then enumerates all of the resources in the resource set. It contains the source code for an executable named ShowNumbers.exe. The example includes two text files that contain the names of numbers. The first, NumberResources.txt, contains the names of numbers from one to ten in the English language:
899
897
898
+
```txt
900
899
one=one
901
900
two=two
902
901
three=three
@@ -907,24 +906,20 @@ seven=seven
907
906
eight=eight
908
907
nine=nine
909
908
ten=ten
910
-
911
909
```
912
910
913
911
The second, NumberResources.fr-FR.txt, contains the names of numbers from one to four in the French language:
914
912
915
-
```
916
-
913
+
```txt
917
914
one=un
918
915
two=deux
919
916
three=trois
920
917
four=quatre
921
-
922
918
```
923
919
924
920
You can use a batch file to generate the resource files, embed the English language resource file into the executable, and create a satellite assembly for the French language resources. Here's the batch file to generate an executable by using the Visual Basic compiler:
Note that if you change the value of the `createIfNotExists` argument to `false`, the method call returns `null`, since Resource Manager has not already loaded the French language resources.
945
+
If you change the value of the `createIfNotExists` argument to `false`, the method call returns `null`, since Resource Manager hasn't yet loaded the French language resources.
953
946
954
947
]]></format>
955
948
</remarks>
@@ -1128,15 +1121,13 @@ al /out:fr-FR\ShowNumbers.resources.dll /culture:fr-FR /embed:NumberResources.fr
1128
1121
1129
1122
You can use the following batch file to build the C# example. For Visual Basic, change `csc` to `vbc`, and change the extension of the source code file from `.cs` to `.vb`.
The example in this section uses the following .txt file named `PatientForm.txt` to define the resources used by an application.
178
177
179
-
```
178
+
The example in this section uses the following .txt file named `PatientForm.txt` to define the resources used by an application.
180
179
180
+
```txt
181
181
Title="Top Pet Animal Clinic"
182
182
Label1="Patient Number:"
183
183
Label2="Pet Name:"
@@ -190,25 +190,24 @@ Label8="Address:"
190
190
Label9="Home Phone:"
191
191
Label10="Work Phone:"
192
192
Label11="Mobile Phone:"
193
-
194
193
```
195
194
196
195
You can compile the .txt file into a .resources file by issuing the following command:
197
196
198
-
**resgen PatientForm.txt**
197
+
`resgen PatientForm.txt`
199
198
200
199
The following example assumes that the resource file is embedded in the assembly that contains the application's executable code. It retrieves a resource file named `PatientForm.resources` from the currently executing assemblies and displays the name and value of each of its resources.
If the C# example is named `Example.cs`, you can compile it by using the following command:
204
+
If the C# example is named `Example.cs`, you can compile it by using the following command:
206
205
207
-
**csc Example.cs /res:PatientForm.resources**
206
+
`csc Example.cs /res:PatientForm.resources`
208
207
209
-
If the Visual Basic example is named `Example.vb`, you can compile it by using the following command:
208
+
If the Visual Basic example is named `Example.vb`, you can compile it by using the following command:
210
209
211
-
**vbc Example.vb /res:PatientForm.resources**
210
+
`vbc Example.vb /res:PatientForm.resources`
212
211
213
212
]]></format>
214
213
</remarks>
@@ -279,8 +278,7 @@ Label11="Mobile Phone:"
279
278
## Examples
280
279
The example in this section uses the following .txt file named `PatientForm.txt` to define the resources used by an application.
281
280
282
-
```
283
-
281
+
```txt
284
282
Title="Top Pet Animal Clinic"
285
283
Label1="Patient Number:"
286
284
Label2="Pet Name:"
@@ -293,12 +291,11 @@ Label8="Address:"
293
291
Label9="Home Phone:"
294
292
Label10="Work Phone:"
295
293
Label11="Mobile Phone:"
296
-
297
294
```
298
295
299
296
You can compile this .txt file into a .resources file by issuing the following command:
300
297
301
-
**resgen PatientForm.txt**
298
+
`resgen PatientForm.txt`
302
299
303
300
The following example enumerates the resources in `PatientForm.resources` and displays the name and value of each.
304
301
@@ -514,15 +511,12 @@ Label11="Mobile Phone:"
514
511
You can handle the exception by calling the <xref:System.Resources.ResourceReader.GetResourceData%2A> method to retrieve information about the data type and the byte array assigned to the named resource. For more information, see the "Retrieving Resources by Name with GetResourceData" section in the <xref:System.Resources.ResourceReader> class topic.
515
512
516
513
> [!IMPORTANT]
517
-
> The <xref:System.Resources.ResourceReader> class includes two methods that return enumerators. The <xref:System.Resources.ResourceReader.GetEnumerator%2A> method returns an <xref:System.Collections.IDictionaryEnumerator> interface object and is the recommended method to call when enumerating resources.
518
-
519
-
514
+
> The <xref:System.Resources.ResourceReader> class includes two methods that return enumerators. The <xref:System.Resources.ResourceReader.GetEnumerator%2A> method returns an <xref:System.Collections.IDictionaryEnumerator> interface object and is the recommended method to call when enumerating resources.
520
515
521
516
## Examples
522
517
The example in this section uses the following .txt file named `PatientForm.txt` to define the resources used by an application.
523
518
524
-
```
525
-
519
+
```txt
526
520
Title="Top Pet Animal Clinic"
527
521
Label1="Patient Number:"
528
522
Label2="Pet Name:"
@@ -535,12 +529,11 @@ Label8="Address:"
535
529
Label9="Home Phone:"
536
530
Label10="Work Phone:"
537
531
Label11="Mobile Phone:"
538
-
539
532
```
540
533
541
534
You can compile the .txt file into a .resources file by issuing the following command:
542
535
543
-
**resgen PatientForm.txt**
536
+
`resgen PatientForm.txt`
544
537
545
538
The following example enumerates the resources in `PatientForm.resources` and displays the name and value of each.
0 commit comments