diff --git a/xml/Microsoft.Extensions.Compliance.Classification/DataClassificationSet.xml b/xml/Microsoft.Extensions.Compliance.Classification/DataClassificationSet.xml
index 8e9643adb83..2976be0c82a 100644
--- a/xml/Microsoft.Extensions.Compliance.Classification/DataClassificationSet.xml
+++ b/xml/Microsoft.Extensions.Compliance.Classification/DataClassificationSet.xml
@@ -308,8 +308,8 @@
The resulting set which combines the current instance's classifications and the other ones.
- This method doesn't modify the two input sets, it creates a new set.
-
+ This method doesn't modify the two input sets, it creates a new set.
+
diff --git a/xml/System/Action.xml b/xml/System/Action.xml
index 5120056cdb5..1acbf2399e6 100644
--- a/xml/System/Action.xml
+++ b/xml/System/Action.xml
@@ -63,38 +63,38 @@
Encapsulates a method that has no parameters and does not return a value.
- [!NOTE]
-> To reference a method that has no parameters and returns a value, use the generic delegate instead.
-
- When you use the delegate, you do not have to explicitly define a delegate that encapsulates a parameterless procedure. For example, the following code explicitly declares a delegate named `ShowValue` and assigns a reference to the `Name.DisplayToWindow` instance method to its delegate instance.
-
+> To reference a method that has no parameters and returns a value, use the generic delegate instead.
+
+ When you use the delegate, you do not have to explicitly define a delegate that encapsulates a parameterless procedure. For example, the following code explicitly declares a delegate named `ShowValue` and assigns a reference to the `Name.DisplayToWindow` instance method to its delegate instance.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.action.delegate/cpp/delegate.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/Action/Overview/delegate1.cs" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Action/fs/Delegate.fs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.action.delegate/vb/delegate.vb" id="Snippet1":::
-
- The following example simplifies this code by instantiating the delegate instead of explicitly defining a new delegate and assigning a named method to it.
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.action.delegate/vb/delegate.vb" id="Snippet1":::
+
+ The following example simplifies this code by instantiating the delegate instead of explicitly defining a new delegate and assigning a named method to it.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Action/cpp/action.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System/Action/Overview/Action.cs" id="Snippet2":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Action/fs/Action.fs" id="Snippet2":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Action/vb/Action.vb" id="Snippet2":::
-
- You can also use the delegate with anonymous methods in C#, as the following example illustrates. (For an introduction to anonymous methods, see [Anonymous Methods](/dotnet/csharp/programming-guide/statements-expressions-operators/anonymous-methods).)
-
- :::code language="csharp" source="~/snippets/csharp/System/Action/Overview/Anon.cs" id="Snippet3":::
-
- You can also assign a lambda expression to an delegate instance, as the following example illustrates. (For an introduction to lambda expressions, see [Lambda Expressions (C#)](/dotnet/csharp/programming-guide/statements-expressions-operators/lambda-expressions) or [Lambda Expressions (F#)](/dotnet/fsharp/language-reference/functions/lambda-expressions-the-fun-keyword).)
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Action/vb/Action.vb" id="Snippet2":::
+
+ You can also use the delegate with anonymous methods in C#, as the following example illustrates. (For an introduction to anonymous methods, see [Anonymous Methods](/dotnet/csharp/programming-guide/statements-expressions-operators/anonymous-methods).)
+
+ :::code language="csharp" source="~/snippets/csharp/System/Action/Overview/Anon.cs" id="Snippet3":::
+
+ You can also assign a lambda expression to an delegate instance, as the following example illustrates. (For an introduction to lambda expressions, see [Lambda Expressions (C#)](/dotnet/csharp/programming-guide/statements-expressions-operators/lambda-expressions) or [Lambda Expressions (F#)](/dotnet/fsharp/language-reference/functions/lambda-expressions-the-fun-keyword).)
+
:::code language="csharp" source="~/snippets/csharp/System/Action/Overview/Lambda.cs" id="Snippet4":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Action/fs/Lambda.fs" id="Snippet4":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Action/vb/lambda.vb" id="Snippet4":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Action/vb/lambda.vb" id="Snippet4":::
+
]]>
diff --git a/xml/System/Action`1.xml b/xml/System/Action`1.xml
index e3e3699c346..bb9e1d4969b 100644
--- a/xml/System/Action`1.xml
+++ b/xml/System/Action`1.xml
@@ -67,49 +67,49 @@
The parameter of the method that this delegate encapsulates.
Encapsulates a method that has a single parameter and does not return a value.
- delegate to pass a method as a parameter without explicitly declaring a custom delegate. The encapsulated method must correspond to the method signature that is defined by this delegate. This means that the encapsulated method must have one parameter that is passed to it by value, and it must not return a value. (In C#, the method must return `void`. In Visual Basic, it must be defined by the `Sub`…`End Sub` construct. It can also be a method that returns a value that is ignored.) Typically, such a method is used to perform an operation.
-
+ delegate to pass a method as a parameter without explicitly declaring a custom delegate. The encapsulated method must correspond to the method signature that is defined by this delegate. This means that the encapsulated method must have one parameter that is passed to it by value, and it must not return a value. (In C#, the method must return `void`. In Visual Basic, it must be defined by the `Sub`…`End Sub` construct. It can also be a method that returns a value that is ignored.) Typically, such a method is used to perform an operation.
+
> [!NOTE]
-> To reference a method that has one parameter and returns a value, use the generic delegate instead.
-
- When you use the delegate, you do not have to explicitly define a delegate that encapsulates a method with a single parameter. For example, the following code explicitly declares a delegate named `DisplayMessage` and assigns a reference to either the method or the `ShowWindowsMessage` method to its delegate instance.
-
+> To reference a method that has one parameter and returns a value, use the generic delegate instead.
+
+ When you use the delegate, you do not have to explicitly define a delegate that encapsulates a method with a single parameter. For example, the following code explicitly declares a delegate named `DisplayMessage` and assigns a reference to either the method or the `ShowWindowsMessage` method to its delegate instance.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Action~1/cpp/delegate.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/ActionT/Overview/Delegate.cs" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Action~1/fs/Delegate.fs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Action~1/vb/Delegate.vb" id="Snippet1":::
-
- The following example simplifies this code by instantiating the delegate instead of explicitly defining a new delegate and assigning a named method to it.
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Action~1/vb/Delegate.vb" id="Snippet1":::
+
+ The following example simplifies this code by instantiating the delegate instead of explicitly defining a new delegate and assigning a named method to it.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Action~1/cpp/action`1.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System/ActionT/Overview/Action1.cs" id="Snippet2":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Action~1/fs/Action1.fs" id="Snippet2":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Action~1/vb/Action1.vb" id="Snippet2":::
-
- You can also use the delegate with anonymous methods in C#, as the following example illustrates. (For an introduction to anonymous methods, see [Anonymous Methods](/dotnet/csharp/programming-guide/statements-expressions-operators/anonymous-methods).)
-
- :::code language="csharp" source="~/snippets/csharp/System/ActionT/Overview/Anon.cs" id="Snippet3":::
-
- You can also assign a lambda expression to an delegate instance, as the following example illustrates. (For an introduction to lambda expressions, see [Lambda Expressions](/dotnet/csharp/programming-guide/statements-expressions-operators/lambda-expressions).)
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Action~1/vb/Action1.vb" id="Snippet2":::
+
+ You can also use the delegate with anonymous methods in C#, as the following example illustrates. (For an introduction to anonymous methods, see [Anonymous Methods](/dotnet/csharp/programming-guide/statements-expressions-operators/anonymous-methods).)
+
+ :::code language="csharp" source="~/snippets/csharp/System/ActionT/Overview/Anon.cs" id="Snippet3":::
+
+ You can also assign a lambda expression to an delegate instance, as the following example illustrates. (For an introduction to lambda expressions, see [Lambda Expressions](/dotnet/csharp/programming-guide/statements-expressions-operators/lambda-expressions).)
+
:::code language="csharp" source="~/snippets/csharp/System/ActionT/Overview/Lambda.cs" id="Snippet4":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Action~1/fs/Lambda.fs" id="Snippet4":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Action~1/vb/lambda.vb" id="Snippet4":::
-
- The and methods each take an delegate as a parameter. The method encapsulated by the delegate allows you to perform an action on each element in the array or list. The example uses the method to provide an illustration.
-
-
-
-## Examples
- The following example demonstrates the use of the delegate to print the contents of a object. In this example, the `Print` method is used to display the contents of the list to the console. In addition, the C# example also demonstrates the use of anonymous methods to display the contents to the console. Note that the example does not explicitly declare an variable. Instead, it passes a reference to a method that takes a single parameter and that does not return a value to the method, whose single parameter is an delegate. Similarly, in the C# example, an delegate is not explicitly instantiated because the signature of the anonymous method matches the signature of the delegate that is expected by the method.
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Action~1/vb/lambda.vb" id="Snippet4":::
+
+ The and methods each take an delegate as a parameter. The method encapsulated by the delegate allows you to perform an action on each element in the array or list. The example uses the method to provide an illustration.
+
+
+
+## Examples
+ The following example demonstrates the use of the delegate to print the contents of a object. In this example, the `Print` method is used to display the contents of the list to the console. In addition, the C# example also demonstrates the use of anonymous methods to display the contents to the console. Note that the example does not explicitly declare an variable. Instead, it passes a reference to a method that takes a single parameter and that does not return a value to the method, whose single parameter is an delegate. Similarly, in the C# example, an delegate is not explicitly instantiated because the signature of the anonymous method matches the signature of the delegate that is expected by the method.
:::code language="csharp" source="~/snippets/csharp/System/ActionT/Overview/action.cs" interactive="try-dotnet-method" id="Snippet01":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Action_PrintExample/fs/action.fs" id="Snippet01":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Action_PrintExample/vb/action.vb" id="Snippet01":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Action_PrintExample/vb/action.vb" id="Snippet01":::
+
]]>
diff --git a/xml/System/Action`10.xml b/xml/System/Action`10.xml
index f24dcbcc596..6ed66f3d11a 100644
--- a/xml/System/Action`10.xml
+++ b/xml/System/Action`10.xml
@@ -139,16 +139,16 @@
The tenth parameter of the method that this delegate encapsulates.
Encapsulates a method that has 10 parameters and does not return a value.
- delegate to pass a method as a parameter without explicitly declaring a custom delegate. The encapsulated method must correspond to the method signature that is defined by this delegate. This means that the encapsulated method must have 10 parameters that are all passed to it by value, and it must not return a value. (In C#, the method must return `void`. In Visual Basic, it must be defined by the `Sub`…`End Sub` construct. It can also be a method that returns a value that is ignored.) Typically, such a method is used to perform an operation.
-
+ delegate to pass a method as a parameter without explicitly declaring a custom delegate. The encapsulated method must correspond to the method signature that is defined by this delegate. This means that the encapsulated method must have 10 parameters that are all passed to it by value, and it must not return a value. (In C#, the method must return `void`. In Visual Basic, it must be defined by the `Sub`…`End Sub` construct. It can also be a method that returns a value that is ignored.) Typically, such a method is used to perform an operation.
+
> [!NOTE]
-> To reference a method that has 10 parameters and returns a value, use the generic delegate instead.
-
- You can also use the delegate with anonymous methods and lambda expressions.
-
+> To reference a method that has 10 parameters and returns a value, use the generic delegate instead.
+
+ You can also use the delegate with anonymous methods and lambda expressions.
+
]]>
diff --git a/xml/System/Action`11.xml b/xml/System/Action`11.xml
index c433a864114..85e79d639dd 100644
--- a/xml/System/Action`11.xml
+++ b/xml/System/Action`11.xml
@@ -147,16 +147,16 @@
The eleventh parameter of the method that this delegate encapsulates.
Encapsulates a method that has 11 parameters and does not return a value.
- delegate to pass a method as a parameter without explicitly declaring a custom delegate. The encapsulated method must correspond to the method signature that is defined by this delegate. This means that the encapsulated method must have 11 parameters that are all passed to it by value, and it must not return a value. (In C#, the method must return `void`. In Visual Basic, it must be defined by the `Sub`…`End Sub` construct. It can also be a method that returns a value that is ignored.) Typically, such a method is used to perform an operation.
-
+ delegate to pass a method as a parameter without explicitly declaring a custom delegate. The encapsulated method must correspond to the method signature that is defined by this delegate. This means that the encapsulated method must have 11 parameters that are all passed to it by value, and it must not return a value. (In C#, the method must return `void`. In Visual Basic, it must be defined by the `Sub`…`End Sub` construct. It can also be a method that returns a value that is ignored.) Typically, such a method is used to perform an operation.
+
> [!NOTE]
-> To reference a method that has 11 parameters and returns a value, use the generic delegate instead.
-
- You can also use the delegate with anonymous methods and lambda expressions.
-
+> To reference a method that has 11 parameters and returns a value, use the generic delegate instead.
+
+ You can also use the delegate with anonymous methods and lambda expressions.
+
]]>
diff --git a/xml/System/Action`12.xml b/xml/System/Action`12.xml
index 1b701ae2045..d7c2262173a 100644
--- a/xml/System/Action`12.xml
+++ b/xml/System/Action`12.xml
@@ -155,16 +155,16 @@
The twelfth parameter of the method that this delegate encapsulates.
Encapsulates a method that has 12 parameters and does not return a value.
- delegate to pass a method as a parameter without explicitly declaring a custom delegate. The encapsulated method must correspond to the method signature that is defined by this delegate. This means that the encapsulated method must have 12 parameters that are all passed to it by value, and it must not return a value. (In C#, the method must return `void`. In Visual Basic, it must be defined by the `Sub`…`End Sub` construct. It can also be a method that returns a value that is ignored.) Typically, such a method is used to perform an operation.
-
+ delegate to pass a method as a parameter without explicitly declaring a custom delegate. The encapsulated method must correspond to the method signature that is defined by this delegate. This means that the encapsulated method must have 12 parameters that are all passed to it by value, and it must not return a value. (In C#, the method must return `void`. In Visual Basic, it must be defined by the `Sub`…`End Sub` construct. It can also be a method that returns a value that is ignored.) Typically, such a method is used to perform an operation.
+
> [!NOTE]
-> To reference a method that has 12 parameters and returns a value, use the generic delegate instead.
-
- You can also use the delegate with anonymous methods and lambda expressions.
-
+> To reference a method that has 12 parameters and returns a value, use the generic delegate instead.
+
+ You can also use the delegate with anonymous methods and lambda expressions.
+
]]>
diff --git a/xml/System/Action`13.xml b/xml/System/Action`13.xml
index 19f68c00597..1e736becbeb 100644
--- a/xml/System/Action`13.xml
+++ b/xml/System/Action`13.xml
@@ -163,16 +163,16 @@
The thirteenth parameter of the method that this delegate encapsulates.
Encapsulates a method that has 13 parameters and does not return a value.
- delegate to pass a method as a parameter without explicitly declaring a custom delegate. The encapsulated method must correspond to the method signature that is defined by this delegate. This means that the encapsulated method must have 13 parameters that are all passed to it by value, and it must not return a value. (In C#, the method must return `void`. In Visual Basic, it must be defined by the `Sub`…`End Sub` construct. It can also be a method that returns a value that is ignored.) Typically, such a method is used to perform an operation.
-
+ delegate to pass a method as a parameter without explicitly declaring a custom delegate. The encapsulated method must correspond to the method signature that is defined by this delegate. This means that the encapsulated method must have 13 parameters that are all passed to it by value, and it must not return a value. (In C#, the method must return `void`. In Visual Basic, it must be defined by the `Sub`…`End Sub` construct. It can also be a method that returns a value that is ignored.) Typically, such a method is used to perform an operation.
+
> [!NOTE]
-> To reference a method that has 13 parameters and returns a value, use the generic delegate instead.
-
- You can also use the delegate with anonymous methods and lambda expressions.
-
+> To reference a method that has 13 parameters and returns a value, use the generic delegate instead.
+
+ You can also use the delegate with anonymous methods and lambda expressions.
+
]]>
diff --git a/xml/System/Action`14.xml b/xml/System/Action`14.xml
index 173d68657d1..6b9fdd73755 100644
--- a/xml/System/Action`14.xml
+++ b/xml/System/Action`14.xml
@@ -171,16 +171,16 @@
The fourteenth parameter of the method that this delegate encapsulates.
Encapsulates a method that has 14 parameters and does not return a value.
- delegate to pass a method as a parameter without explicitly declaring a custom delegate. The encapsulated method must correspond to the method signature that is defined by this delegate. This means that the encapsulated method must have 14 parameters that are all passed to it by value, and it must not return a value. (In C#, the method must return `void`. In Visual Basic, it must be defined by the `Sub`…`End Sub` construct. It can also be a method that returns a value that is ignored.) Typically, such a method is used to perform an operation.
-
+ delegate to pass a method as a parameter without explicitly declaring a custom delegate. The encapsulated method must correspond to the method signature that is defined by this delegate. This means that the encapsulated method must have 14 parameters that are all passed to it by value, and it must not return a value. (In C#, the method must return `void`. In Visual Basic, it must be defined by the `Sub`…`End Sub` construct. It can also be a method that returns a value that is ignored.) Typically, such a method is used to perform an operation.
+
> [!NOTE]
-> To reference a method that has 14 parameters and returns a value, use the generic delegate instead.
-
- You can also use the delegate with anonymous methods and lambda expressions.
-
+> To reference a method that has 14 parameters and returns a value, use the generic delegate instead.
+
+ You can also use the delegate with anonymous methods and lambda expressions.
+
]]>
diff --git a/xml/System/Action`15.xml b/xml/System/Action`15.xml
index db828e7d288..aae2793bd34 100644
--- a/xml/System/Action`15.xml
+++ b/xml/System/Action`15.xml
@@ -179,16 +179,16 @@
The fifteenth parameter of the method that this delegate encapsulates.
Encapsulates a method that has 15 parameters and does not return a value.
- delegate to pass a method as a parameter without explicitly declaring a custom delegate. The encapsulated method must correspond to the method signature that is defined by this delegate. This means that the encapsulated method must have 15 parameters that are all passed to it by value, and it must not return a value. (In C#, the method must return `void`. In Visual Basic, it must be defined by the `Sub`…`End Sub` construct. It can also be a method that returns a value that is ignored.) Typically, such a method is used to perform an operation.
-
+ delegate to pass a method as a parameter without explicitly declaring a custom delegate. The encapsulated method must correspond to the method signature that is defined by this delegate. This means that the encapsulated method must have 15 parameters that are all passed to it by value, and it must not return a value. (In C#, the method must return `void`. In Visual Basic, it must be defined by the `Sub`…`End Sub` construct. It can also be a method that returns a value that is ignored.) Typically, such a method is used to perform an operation.
+
> [!NOTE]
-> To reference a method that has 15 parameters and returns a value, use the generic delegate instead.
-
- You can also use the delegate with anonymous methods and lambda expressions.
-
+> To reference a method that has 15 parameters and returns a value, use the generic delegate instead.
+
+ You can also use the delegate with anonymous methods and lambda expressions.
+
]]>
diff --git a/xml/System/Action`16.xml b/xml/System/Action`16.xml
index f4ce1b29d61..ea9ddca5cfa 100644
--- a/xml/System/Action`16.xml
+++ b/xml/System/Action`16.xml
@@ -187,16 +187,16 @@
The sixteenth parameter of the method that this delegate encapsulates.
Encapsulates a method that has 16 parameters and does not return a value.
- delegate to pass a method as a parameter without explicitly declaring a custom delegate. The encapsulated method must correspond to the method signature that is defined by this delegate. This means that the encapsulated method must have 16 parameters that are all passed to it by value, and it must not return a value. (In C#, the method must return `void`. In Visual Basic, it must be defined by the `Sub`…`End Sub` construct. It can also be a method that returns a value that is ignored.) Typically, such a method is used to perform an operation.
-
+ delegate to pass a method as a parameter without explicitly declaring a custom delegate. The encapsulated method must correspond to the method signature that is defined by this delegate. This means that the encapsulated method must have 16 parameters that are all passed to it by value, and it must not return a value. (In C#, the method must return `void`. In Visual Basic, it must be defined by the `Sub`…`End Sub` construct. It can also be a method that returns a value that is ignored.) Typically, such a method is used to perform an operation.
+
> [!NOTE]
-> To reference a method that has 16 parameters and returns a value, use the generic delegate instead.
-
- You can also use the delegate with anonymous methods and lambda expressions.
-
+> To reference a method that has 16 parameters and returns a value, use the generic delegate instead.
+
+ You can also use the delegate with anonymous methods and lambda expressions.
+
]]>
diff --git a/xml/System/Action`2.xml b/xml/System/Action`2.xml
index fe1158419cb..5c00b72dd69 100644
--- a/xml/System/Action`2.xml
+++ b/xml/System/Action`2.xml
@@ -97,32 +97,32 @@
The second parameter of the method that this delegate encapsulates.
Encapsulates a method that has two parameters and does not return a value.
- delegate to pass a method as a parameter without explicitly declaring a custom delegate. The encapsulated method must correspond to the method signature that is defined by this delegate. This means that the encapsulated method must have two parameters that are both passed to it by value, and it must not return a value. (In C#, the method must return `void`. In F#, the method or function must return unit. In Visual Basic, it must be defined by the `Sub`…`End Sub` construct. It can also be a method that returns a value that is ignored.) Typically, such a method is used to perform an operation.
-
+ delegate to pass a method as a parameter without explicitly declaring a custom delegate. The encapsulated method must correspond to the method signature that is defined by this delegate. This means that the encapsulated method must have two parameters that are both passed to it by value, and it must not return a value. (In C#, the method must return `void`. In F#, the method or function must return unit. In Visual Basic, it must be defined by the `Sub`…`End Sub` construct. It can also be a method that returns a value that is ignored.) Typically, such a method is used to perform an operation.
+
> [!NOTE]
-> To reference a method that has two parameters and returns a value, use the generic delegate instead.
-
- When you use the delegate, you do not have to explicitly define a delegate that encapsulates a method with two parameters. For example, the following code explicitly declares a delegate named `ConcatStrings`. It then assigns a reference to either of two methods to its delegate instance. One method writes two strings to the console; the second writes two strings to a file.
-
+> To reference a method that has two parameters and returns a value, use the generic delegate instead.
+
+ When you use the delegate, you do not have to explicitly define a delegate that encapsulates a method with two parameters. For example, the following code explicitly declares a delegate named `ConcatStrings`. It then assigns a reference to either of two methods to its delegate instance. One method writes two strings to the console; the second writes two strings to a file.
+
:::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2/Overview/Delegate.cs" interactive="try-dotnet" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Action~2/fs/Delegate.fs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Action~2/vb/Delegate.vb" id="Snippet1":::
-
- The following example simplifies this code by instantiating the delegate instead of explicitly defining a new delegate and assigning a named method to it.
-
+
+ The following example simplifies this code by instantiating the delegate instead of explicitly defining a new delegate and assigning a named method to it.
+
:::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2/Overview/Action2.cs" interactive="try-dotnet" id="Snippet2":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Action~2/fs/Action2.fs" id="Snippet2":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Action~2/vb/action2.vb" id="Snippet2":::
-
- You can also use the delegate with anonymous methods in C#, as the following example illustrates. (For an introduction to anonymous methods, see [Anonymous Methods](/dotnet/csharp/programming-guide/statements-expressions-operators/anonymous-methods).)
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Action~2/vb/action2.vb" id="Snippet2":::
+
+ You can also use the delegate with anonymous methods in C#, as the following example illustrates. (For an introduction to anonymous methods, see [Anonymous Methods](/dotnet/csharp/programming-guide/statements-expressions-operators/anonymous-methods).)
+
:::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2/Overview/Anon.cs" interactive="try-dotnet" id="Snippet3":::
- You can also assign a lambda expression to an delegate instance, as the following example illustrates. (For an introduction to lambda expressions, see [Lambda Expressions (C#)](/dotnet/csharp/programming-guide/statements-expressions-operators/lambda-expressions), or [Lambda Expressions (F#)](/dotnet/fsharp/language-reference/functions/lambda-expressions-the-fun-keyword).)
-
+ You can also assign a lambda expression to an delegate instance, as the following example illustrates. (For an introduction to lambda expressions, see [Lambda Expressions (C#)](/dotnet/csharp/programming-guide/statements-expressions-operators/lambda-expressions), or [Lambda Expressions (F#)](/dotnet/fsharp/language-reference/functions/lambda-expressions-the-fun-keyword).)
+
:::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2/Overview/Lambda.cs" interactive="try-dotnet" id="Snippet4":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Action~2/fs/Lambda.fs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Action~2/vb/lambda.vb" id="Snippet4":::
diff --git a/xml/System/Action`3.xml b/xml/System/Action`3.xml
index 06addfe38c4..b9373068baf 100644
--- a/xml/System/Action`3.xml
+++ b/xml/System/Action`3.xml
@@ -111,36 +111,36 @@
The third parameter of the method that this delegate encapsulates.
Encapsulates a method that has three parameters and does not return a value.
- delegate to pass a method as a parameter without explicitly declaring a custom delegate. The encapsulated method must correspond to the method signature that is defined by this delegate. This means that the encapsulated method must have three parameters that are all passed to it by value, and it must not return a value. (In C#, the method must return `void`. In F#, the method or function must return unit. In Visual Basic, it must be defined by the `Sub`…`End Sub` construct. It can also be a method that returns a value that is ignored.) Typically, such a method is used to perform an operation.
-
+ delegate to pass a method as a parameter without explicitly declaring a custom delegate. The encapsulated method must correspond to the method signature that is defined by this delegate. This means that the encapsulated method must have three parameters that are all passed to it by value, and it must not return a value. (In C#, the method must return `void`. In F#, the method or function must return unit. In Visual Basic, it must be defined by the `Sub`…`End Sub` construct. It can also be a method that returns a value that is ignored.) Typically, such a method is used to perform an operation.
+
> [!NOTE]
-> To reference a method that has three parameters and returns a value, use the generic delegate instead.
-
- When you use the delegate, you do not have to explicitly define a delegate that encapsulates a method with three parameters. For example, the following code explicitly declares a delegate named `StringCopy` and assigns a reference to the `CopyStrings` method to its delegate instance.
-
+> To reference a method that has three parameters and returns a value, use the generic delegate instead.
+
+ When you use the delegate, you do not have to explicitly define a delegate that encapsulates a method with three parameters. For example, the following code explicitly declares a delegate named `StringCopy` and assigns a reference to the `CopyStrings` method to its delegate instance.
+
:::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2,T3/Overview/Delegate.cs" interactive="try-dotnet" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Action~3/fs/Delegate.fs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Action~3/vb/Delegate.vb" id="Snippet1":::
-
- The following example simplifies this code by instantiating the delegate instead of explicitly defining a new delegate and assigning a named method to it.
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Action~3/vb/Delegate.vb" id="Snippet1":::
+
+ The following example simplifies this code by instantiating the delegate instead of explicitly defining a new delegate and assigning a named method to it.
+
:::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2,T3/Overview/Action3.cs" interactive="try-dotnet" id="Snippet2":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Action~3/fs/Action3.fs" id="Snippet2":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Action~3/vb/Action3.vb" id="Snippet2":::
-
- You can also use the delegate with anonymous methods in C#, as the following example illustrates. (For an introduction to anonymous methods, see [Anonymous Methods](/dotnet/csharp/programming-guide/statements-expressions-operators/anonymous-methods).)
-
- :::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2,T3/Overview/Anon.cs" interactive="try-dotnet" id="Snippet3":::
-
- You can also assign a lambda expression to an delegate instance, as the following example illustrates. (For an introduction to lambda expressions, see [Lambda Expressions (C#)](/dotnet/csharp/programming-guide/statements-expressions-operators/lambda-expressions) or [Lambda Expressions (F#)](/dotnet/fsharp/language-reference/functions/lambda-expressions-the-fun-keyword).)
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Action~3/vb/Action3.vb" id="Snippet2":::
+
+ You can also use the delegate with anonymous methods in C#, as the following example illustrates. (For an introduction to anonymous methods, see [Anonymous Methods](/dotnet/csharp/programming-guide/statements-expressions-operators/anonymous-methods).)
+
+ :::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2,T3/Overview/Anon.cs" interactive="try-dotnet" id="Snippet3":::
+
+ You can also assign a lambda expression to an delegate instance, as the following example illustrates. (For an introduction to lambda expressions, see [Lambda Expressions (C#)](/dotnet/csharp/programming-guide/statements-expressions-operators/lambda-expressions) or [Lambda Expressions (F#)](/dotnet/fsharp/language-reference/functions/lambda-expressions-the-fun-keyword).)
+
:::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2,T3/Overview/Lambda.cs" interactive="try-dotnet" id="Snippet4":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Action~3/fs/Lambda.fs" id="Snippet4":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Action~3/vb/lambda.vb" id="Snippet4":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Action~3/vb/lambda.vb" id="Snippet4":::
+
]]>
diff --git a/xml/System/Action`4.xml b/xml/System/Action`4.xml
index 84643b9b9bf..b863c2e1277 100644
--- a/xml/System/Action`4.xml
+++ b/xml/System/Action`4.xml
@@ -109,36 +109,36 @@
The fourth parameter of the method that this delegate encapsulates.
Encapsulates a method that has four parameters and does not return a value.
- delegate to pass a method as a parameter without explicitly declaring a custom delegate. The encapsulated method must correspond to the method signature that is defined by this delegate. This means that the encapsulated method must have four parameters that are all passed to it by value, and it must not return a value. (In C#, the method must return `void`. In F#, the method or function must return unit. In Visual Basic, it must be defined by the `Sub`…`End Sub` construct. It can also be a method that returns a value that is ignored.) Typically, such a method is used to perform an operation.
-
+ delegate to pass a method as a parameter without explicitly declaring a custom delegate. The encapsulated method must correspond to the method signature that is defined by this delegate. This means that the encapsulated method must have four parameters that are all passed to it by value, and it must not return a value. (In C#, the method must return `void`. In F#, the method or function must return unit. In Visual Basic, it must be defined by the `Sub`…`End Sub` construct. It can also be a method that returns a value that is ignored.) Typically, such a method is used to perform an operation.
+
> [!NOTE]
-> To reference a method that has four parameters and returns a value, use the generic delegate instead.
-
- When you use the delegate, you do not have to explicitly define a delegate that encapsulates a method with four parameters. For example, the following code explicitly declares a delegate named `StringCopy` and assigns a reference to the `CopyStrings` method to its delegate instance.
-
+> To reference a method that has four parameters and returns a value, use the generic delegate instead.
+
+ When you use the delegate, you do not have to explicitly define a delegate that encapsulates a method with four parameters. For example, the following code explicitly declares a delegate named `StringCopy` and assigns a reference to the `CopyStrings` method to its delegate instance.
+
:::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2,T3,T4/Overview/Delegate.cs" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Action~4/fs/Delegate.fs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Action~4/vb/Delegate.vb" id="Snippet1":::
-
- The following example simplifies this code by instantiating the delegate instead of explicitly defining a new delegate and assigning a named method to it.
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Action~4/vb/Delegate.vb" id="Snippet1":::
+
+ The following example simplifies this code by instantiating the delegate instead of explicitly defining a new delegate and assigning a named method to it.
+
:::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2,T3,T4/Overview/Action4.cs" id="Snippet2":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Action~4/fs/Action4.fs" id="Snippet2":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Action~4/vb/Action4.vb" id="Snippet2":::
-
- You can also use the delegate with anonymous methods in C#, as the following example illustrates. (For an introduction to anonymous methods, see [Anonymous Methods](/dotnet/csharp/programming-guide/statements-expressions-operators/anonymous-methods).)
-
- :::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2,T3,T4/Overview/Anon.cs" id="Snippet3":::
-
- You can also assign a lambda expression to an delegate instance, as the following example illustrates. (For an introduction to lambda expressions, see [Lambda Expressions (C#)](/dotnet/csharp/programming-guide/statements-expressions-operators/lambda-expressions) or [Lambda Expressions (F#)](/dotnet/fsharp/language-reference/functions/lambda-expressions-the-fun-keyword).)
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Action~4/vb/Action4.vb" id="Snippet2":::
+
+ You can also use the delegate with anonymous methods in C#, as the following example illustrates. (For an introduction to anonymous methods, see [Anonymous Methods](/dotnet/csharp/programming-guide/statements-expressions-operators/anonymous-methods).)
+
+ :::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2,T3,T4/Overview/Anon.cs" id="Snippet3":::
+
+ You can also assign a lambda expression to an delegate instance, as the following example illustrates. (For an introduction to lambda expressions, see [Lambda Expressions (C#)](/dotnet/csharp/programming-guide/statements-expressions-operators/lambda-expressions) or [Lambda Expressions (F#)](/dotnet/fsharp/language-reference/functions/lambda-expressions-the-fun-keyword).)
+
:::code language="csharp" source="~/snippets/csharp/System/ActionT1,T2,T3,T4/Overview/Lambda.cs" id="Snippet4":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.Action~4/fs/Lambda.fs" id="Snippet4":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Action~4/vb/lambda.vb" id="Snippet4":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Action~4/vb/lambda.vb" id="Snippet4":::
+
]]>
diff --git a/xml/System/Action`5.xml b/xml/System/Action`5.xml
index 6b295ccc43b..1948b4e6e80 100644
--- a/xml/System/Action`5.xml
+++ b/xml/System/Action`5.xml
@@ -99,16 +99,16 @@
The fifth parameter of the method that this delegate encapsulates.
Encapsulates a method that has five parameters and does not return a value.
- delegate to pass a method as a parameter without explicitly declaring a custom delegate. The encapsulated method must correspond to the method signature that is defined by this delegate. This means that the encapsulated method must have five parameters that are all passed to it by value, and it must not return a value. (In C#, the method must return `void`. In Visual Basic, it must be defined by the `Sub`…`End Sub` construct. It can also be a method that returns a value that is ignored.) Typically, such a method is used to perform an operation.
-
+ delegate to pass a method as a parameter without explicitly declaring a custom delegate. The encapsulated method must correspond to the method signature that is defined by this delegate. This means that the encapsulated method must have five parameters that are all passed to it by value, and it must not return a value. (In C#, the method must return `void`. In Visual Basic, it must be defined by the `Sub`…`End Sub` construct. It can also be a method that returns a value that is ignored.) Typically, such a method is used to perform an operation.
+
> [!NOTE]
-> To reference a method that has five parameters and returns a value, use the generic delegate instead.
-
- You can also use the delegate with anonymous methods and lambda expressions.
-
+> To reference a method that has five parameters and returns a value, use the generic delegate instead.
+
+ You can also use the delegate with anonymous methods and lambda expressions.
+
]]>
diff --git a/xml/System/Action`6.xml b/xml/System/Action`6.xml
index bfca59e85b0..7f7d19e872e 100644
--- a/xml/System/Action`6.xml
+++ b/xml/System/Action`6.xml
@@ -107,16 +107,16 @@
The sixth parameter of the method that this delegate encapsulates.
Encapsulates a method that has six parameters and does not return a value.
- delegate to pass a method as a parameter without explicitly declaring a custom delegate. The encapsulated method must correspond to the method signature that is defined by this delegate. This means that the encapsulated method must have six parameters that are all passed to it by value, and it must not return a value. (In C#, the method must return `void`. In Visual Basic, it must be defined by the `Sub`…`End Sub` construct. It can also be a method that returns a value that is ignored.) Typically, such a method is used to perform an operation.
-
+ delegate to pass a method as a parameter without explicitly declaring a custom delegate. The encapsulated method must correspond to the method signature that is defined by this delegate. This means that the encapsulated method must have six parameters that are all passed to it by value, and it must not return a value. (In C#, the method must return `void`. In Visual Basic, it must be defined by the `Sub`…`End Sub` construct. It can also be a method that returns a value that is ignored.) Typically, such a method is used to perform an operation.
+
> [!NOTE]
-> To reference a method that has six parameters and returns a value, use the generic delegate instead.
-
- You can also use the delegate with anonymous methods and lambda expressions.
-
+> To reference a method that has six parameters and returns a value, use the generic delegate instead.
+
+ You can also use the delegate with anonymous methods and lambda expressions.
+
]]>
diff --git a/xml/System/Action`7.xml b/xml/System/Action`7.xml
index 77d304dfb32..5d30379ab89 100644
--- a/xml/System/Action`7.xml
+++ b/xml/System/Action`7.xml
@@ -115,16 +115,16 @@
The seventh parameter of the method that this delegate encapsulates.
Encapsulates a method that has seven parameters and does not return a value.
- delegate to pass a method as a parameter without explicitly declaring a custom delegate. The encapsulated method must correspond to the method signature that is defined by this delegate. This means that the encapsulated method must have seven parameters that are all passed to it by value, and it must not return a value. (In C#, the method must return `void`. In Visual Basic, it must be defined by the `Sub`…`End Sub` construct. It can also be a method that returns a value that is ignored.) Typically, such a method is used to perform an operation.
-
+ delegate to pass a method as a parameter without explicitly declaring a custom delegate. The encapsulated method must correspond to the method signature that is defined by this delegate. This means that the encapsulated method must have seven parameters that are all passed to it by value, and it must not return a value. (In C#, the method must return `void`. In Visual Basic, it must be defined by the `Sub`…`End Sub` construct. It can also be a method that returns a value that is ignored.) Typically, such a method is used to perform an operation.
+
> [!NOTE]
-> To reference a method that has seven parameters and returns a value, use the generic delegate instead.
-
- You can also use the delegate with anonymous methods and lambda expressions.
-
+> To reference a method that has seven parameters and returns a value, use the generic delegate instead.
+
+ You can also use the delegate with anonymous methods and lambda expressions.
+
]]>
diff --git a/xml/System/Action`8.xml b/xml/System/Action`8.xml
index 60914136093..6018c5f404d 100644
--- a/xml/System/Action`8.xml
+++ b/xml/System/Action`8.xml
@@ -123,16 +123,16 @@
The eighth parameter of the method that this delegate encapsulates.
Encapsulates a method that has eight parameters and does not return a value.
- delegate to pass a method as a parameter without explicitly declaring a custom delegate. The encapsulated method must correspond to the method signature that is defined by this delegate. This means that the encapsulated method must have eight parameters that are all passed to it by value, and it must not return a value. (In C#, the method must return `void`. In Visual Basic, it must be defined by the `Sub`…`End Sub` construct. It can also be a method that returns a value that is ignored.) Typically, such a method is used to perform an operation.
-
+ delegate to pass a method as a parameter without explicitly declaring a custom delegate. The encapsulated method must correspond to the method signature that is defined by this delegate. This means that the encapsulated method must have eight parameters that are all passed to it by value, and it must not return a value. (In C#, the method must return `void`. In Visual Basic, it must be defined by the `Sub`…`End Sub` construct. It can also be a method that returns a value that is ignored.) Typically, such a method is used to perform an operation.
+
> [!NOTE]
-> To reference a method that has eight parameters and returns a value, use the generic delegate instead.
-
- You can also use the delegate with anonymous methods and lambda expressions.
-
+> To reference a method that has eight parameters and returns a value, use the generic delegate instead.
+
+ You can also use the delegate with anonymous methods and lambda expressions.
+
]]>
diff --git a/xml/System/Action`9.xml b/xml/System/Action`9.xml
index 228816fcbb6..319f7ed9535 100644
--- a/xml/System/Action`9.xml
+++ b/xml/System/Action`9.xml
@@ -131,16 +131,16 @@
The ninth parameter of the method that this delegate encapsulates.
Encapsulates a method that has nine parameters and does not return a value.
- delegate to pass a method as a parameter without explicitly declaring a custom delegate. The encapsulated method must correspond to the method signature that is defined by this delegate. This means that the encapsulated method must have nine parameters that are all passed to it by value, and it must not return a value. (In C#, the method must return `void`. In Visual Basic, it must be defined by the `Sub`…`End Sub` construct. It can also be a method that returns a value that is ignored.) Typically, such a method is used to perform an operation.
-
+ delegate to pass a method as a parameter without explicitly declaring a custom delegate. The encapsulated method must correspond to the method signature that is defined by this delegate. This means that the encapsulated method must have nine parameters that are all passed to it by value, and it must not return a value. (In C#, the method must return `void`. In Visual Basic, it must be defined by the `Sub`…`End Sub` construct. It can also be a method that returns a value that is ignored.) Typically, such a method is used to perform an operation.
+
> [!NOTE]
-> To reference a method that has nine parameters and returns a value, use the generic delegate instead.
-
- You can also use the delegate with anonymous methods and lambda expressions.
-
+> To reference a method that has nine parameters and returns a value, use the generic delegate instead.
+
+ You can also use the delegate with anonymous methods and lambda expressions.
+
]]>
diff --git a/xml/System/ActivationContext+ContextForm.xml b/xml/System/ActivationContext+ContextForm.xml
index 3609028265f..2d7f4b14943 100644
--- a/xml/System/ActivationContext+ContextForm.xml
+++ b/xml/System/ActivationContext+ContextForm.xml
@@ -17,11 +17,11 @@
Indicates the context for a manifest-activated application.
-
Publishing ClickOnce Applications
diff --git a/xml/System/ActivationContext.xml b/xml/System/ActivationContext.xml
index 916b2d52168..e0f72c27578 100644
--- a/xml/System/ActivationContext.xml
+++ b/xml/System/ActivationContext.xml
@@ -175,18 +175,18 @@
is .
- -or-
+-or-
- is .
+ is .
No deployment or application identity is specified in .
- -or-
+-or-
- does not match the identity in the manifests.
+ does not match the identity in the manifests.
- -or-
+-or-
- does not have the same number of components as the manifest paths.
+ does not have the same number of components as the manifest paths.
diff --git a/xml/System/Activator.xml b/xml/System/Activator.xml
index 3a39902edc3..f075e9d70c1 100644
--- a/xml/System/Activator.xml
+++ b/xml/System/Activator.xml
@@ -76,35 +76,35 @@
Contains methods to create types of objects locally or remotely, or obtain references to existing remote objects. This class cannot be inherited.
- method creates an instance of a type defined in an assembly by invoking the constructor that best matches the specified arguments. If no arguments are specified, the constructor that takes no parameters, that is, the parameterless constructor, is invoked.
-
- You must have sufficient permission to search for and call a constructor; otherwise, an exception is thrown. By default, only public constructors are considered during the search for a constructor. If no constructor or parameterless constructor can be found, an exception is thrown.
-
- A binder parameter specifies an object that searches an assembly for a suitable constructor. You can specify your own binder and search criteria. If no binder is specified, a default binder is used. For more information, see the and classes.
-
- An evidence parameter affects the security policy and permissions for the constructor. For more information, see the class.
-
- An instance of a type can be created at a local or remote site. If the type is created remotely, an activation attribute parameter specifies the URI of the remote site. The call to create the instance might pass through intermediary sites before it reaches the remote site. Other activation attributes can modify the environment, or context, in which the call operates at the remote and intermediary sites.
-
- If the instance is created locally, a reference to that object is returned. If the instance is created remotely, a reference to a proxy is returned. The remote object is manipulated through the proxy as if it were a local object.
-
- The method creates a proxy to a currently running remote object, server-activated well-known object, or XML Web service. You can specify the connection medium, that is, the channel. For more information, see the class.
-
- Assemblies contain type definitions. The method creates an instance of a type from a currently running assembly. The method creates an instance from a file that contains an assembly. The method creates an instance of a COM object from a file that contains an assembly.
-
-
-
-## Examples
- The following example shows how to use the class to dynamically construct objects at run time.
-
+ method creates an instance of a type defined in an assembly by invoking the constructor that best matches the specified arguments. If no arguments are specified, the constructor that takes no parameters, that is, the parameterless constructor, is invoked.
+
+ You must have sufficient permission to search for and call a constructor; otherwise, an exception is thrown. By default, only public constructors are considered during the search for a constructor. If no constructor or parameterless constructor can be found, an exception is thrown.
+
+ A binder parameter specifies an object that searches an assembly for a suitable constructor. You can specify your own binder and search criteria. If no binder is specified, a default binder is used. For more information, see the and classes.
+
+ An evidence parameter affects the security policy and permissions for the constructor. For more information, see the class.
+
+ An instance of a type can be created at a local or remote site. If the type is created remotely, an activation attribute parameter specifies the URI of the remote site. The call to create the instance might pass through intermediary sites before it reaches the remote site. Other activation attributes can modify the environment, or context, in which the call operates at the remote and intermediary sites.
+
+ If the instance is created locally, a reference to that object is returned. If the instance is created remotely, a reference to a proxy is returned. The remote object is manipulated through the proxy as if it were a local object.
+
+ The method creates a proxy to a currently running remote object, server-activated well-known object, or XML Web service. You can specify the connection medium, that is, the channel. For more information, see the class.
+
+ Assemblies contain type definitions. The method creates an instance of a type from a currently running assembly. The method creates an instance from a file that contains an assembly. The method creates an instance of a COM object from a file that contains an assembly.
+
+
+
+## Examples
+ The following example shows how to use the class to dynamically construct objects at run time.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/ActivatorX/cpp/ActivatorX.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/Activator/Overview/ActivatorX.cs" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/ActivatorX/fs/ActivatorX.fs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/ActivatorX/VB/ActivatorX.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/ActivatorX/VB/ActivatorX.vb" id="Snippet1":::
+
]]>
@@ -159,35 +159,35 @@
Creates an instance of the COM object whose name is specified, using the named assembly file and the parameterless constructor.
A handle that must be unwrapped to access the newly created object, or for instances.
- method to unwrap the return value.
-
- A attribute with a value of `true` must be applied either explicitly or by default to the COM type so the method can create an instance of that type; otherwise, is thrown.
-
- For information about other exceptions that can be thrown by invoked methods, see the Exceptions section of the and methods.
-
+ method to unwrap the return value.
+
+ A attribute with a value of `true` must be applied either explicitly or by default to the COM type so the method can create an instance of that type; otherwise, is thrown.
+
+ For information about other exceptions that can be thrown by invoked methods, see the Exceptions section of the and methods.
+
> [!NOTE]
-> Starting with .NET Framework 2.0, this method can be used to create nonpublic types if the caller has been granted with the flag and if the grant set of the assembly that contains the nonpublic types is restricted to the caller's grant set or to a subset thereof. (See [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection).) To use this functionality, your application should target .NET Framework 3.5 or later.
-
+> Starting with .NET Framework 2.0, this method can be used to create nonpublic types if the caller has been granted with the flag and if the grant set of the assembly that contains the nonpublic types is restricted to the caller's grant set or to a subset thereof. (See [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection).) To use this functionality, your application should target .NET Framework 3.5 or later.
+
]]>
or is .
- An instance cannot be created through COM.
-
- -or-
-
- was not found in .
+ An instance cannot be created through COM.
+
+-or-
+
+ was not found in .
No matching constructor was found.
is not found, or the module you are trying to load does not specify a file name extension.
- Cannot create an instance of an abstract class.
-
- -or-
-
- This member was invoked with a late-binding mechanism.
+ Cannot create an instance of an abstract class.
+
+ -or-
+
+ This member was invoked with a late-binding mechanism.
The caller cannot provide activation attributes for an object that does not inherit from .
is the empty string ("").
@@ -237,18 +237,18 @@
Creates an instance of the COM object whose name is specified, using the named assembly file and the parameterless constructor.
A handle that must be unwrapped to access the newly created object, or for instances.
- method to unwrap the return value.
-
- A attribute with a value of `true` must be applied either explicitly or by default to the COM type so the method can create an instance of that type; otherwise, is thrown.
-
- For information about other exceptions that can be thrown by invoked methods, see the Exceptions section of the and methods.
-
+ method to unwrap the return value.
+
+ A attribute with a value of `true` must be applied either explicitly or by default to the COM type so the method can create an instance of that type; otherwise, is thrown.
+
+ For information about other exceptions that can be thrown by invoked methods, see the Exceptions section of the and methods.
+
> [!NOTE]
-> Starting with .NET Framework 2.0, this method can be used to create nonpublic types if the caller has been granted with the flag and if the grant set of the assembly that contains the nonpublic types is restricted to the caller's grant set or to a subset thereof. (See [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection).) To use this functionality, your application should target .NET Framework 3.5 or later.
-
+> Starting with .NET Framework 2.0, this method can be used to create nonpublic types if the caller has been granted with the flag and if the grant set of the assembly that contains the nonpublic types is restricted to the caller's grant set or to a subset thereof. (See [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection).) To use this functionality, your application should target .NET Framework 3.5 or later.
+
]]>
@@ -256,10 +256,10 @@
is the empty string ("").
An assembly or module was loaded twice with two different evidences.
-
- -or-
-
- is longer than the system-defined maximum length.
+
+-or-
+
+ is longer than the system-defined maximum length.
is not found, or the module you are trying to load does not specify a file name extension.
@@ -267,17 +267,17 @@
is not a valid assembly.
A code base that does not start with "file://" was specified without the required .
- An instance cannot be created through COM.
-
- -or-
-
- was not found in .
+ An instance cannot be created through COM.
+
+-or-
+
+ was not found in .
No matching constructor was found.
- An instance of an abstract class cannot be created.
-
- -or-
-
- This member was invoked with a late-binding mechanism.
+ An instance of an abstract class cannot be created.
+
+ -or-
+
+ This member was invoked with a late-binding mechanism.
The caller cannot provide activation attributes for an object that does not inherit from .
@@ -328,13 +328,13 @@
Creates an instance of the type designated by the specified object.
A handle that must be unwrapped to access the newly created object, or for instances.
- method to unwrap the return value.
-
- The activation context is used during manifest-based activation to set up the domain policy and to provide an application-based security model. The class contains an object that provides access to the application manifest. For more information, see the class.
-
+ Use the method to unwrap the return value.
+
+ The activation context is used during manifest-based activation to set up the domain policy and to provide an application-based security model. The class contains an object that provides access to the application manifest. For more information, see the class.
+
]]>
@@ -401,55 +401,49 @@
Creates an instance of the specified type using that type's parameterless constructor.
A reference to the newly created object, or for instances.
- [!NOTE]
-> Starting with .NET Framework 2.0, this method can be used to access nonpublic types if the caller has been granted with the flag and if the grant set of the assembly that contains the nonpublic types is restricted to the caller's grant set or to a subset thereof. (See [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection).) To use this functionality, your application should target .NET Framework 3.5 or later.
-
-
-
-## Examples
- The following code example demonstrates how to call the method. Instances of several different types are created and their default values are displayed.
-
+> Starting with .NET Framework 2.0, this method can be used to access nonpublic types if the caller has been granted with the flag and if the grant set of the assembly that contains the nonpublic types is restricted to the caller's grant set or to a subset thereof. (See [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection).) To use this functionality, your application should target .NET Framework 3.5 or later.
+
+
+
+## Examples
+ The following code example demonstrates how to call the method. Instances of several different types are created and their default values are displayed.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/ActivatorX/cpp/source2.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System/Activator/Overview/source2.cs" interactive="try-dotnet" id="Snippet4":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/ActivatorX/fs/source2.fs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/ActivatorX/VB/source2.vb" id="Snippet4":::
-
+
]]>
is .
- is not a .
-
- -or-
-
- is an open generic type (that is, the property returns ).
+ is not a .
+
+-or-
+
+ is an open generic type (that is, the property returns ).
- cannot be a .
-
- -or-
-
- Creation of , , , and types, or arrays of those types, is not supported.
-
- -or-
-
- The assembly that contains is a dynamic assembly that was created with .
- The constructor being called throws an exception.
- The caller does not have permission to call this constructor.
+ cannot be a .
+
+-or-
+
+Creation of , , , and types, or arrays of those types, is not supported.
+
+-or-
-Note: In .NET for Windows Store apps or the Portable Class Library, catch the base class exception, , instead.
-
+The assembly that contains is a dynamic assembly that was created with .
+ The constructor being called throws an exception.
+ The caller does not have permission to call this constructor. Note: In .NET for Windows Store apps or the Portable Class Library, catch the base class exception, , instead.
Cannot create an instance of an abstract class, or this member was invoked with a late-binding mechanism.
The COM type was not obtained through or .
- No matching public constructor was found.
-
-Note: In .NET for Windows Store apps or the Portable Class Library, catch the base class exception, , instead.
-
+ No matching public constructor was found. Note: In .NET for Windows Store apps or the Portable Class Library, catch the base class exception, , instead.
is a COM object but the class identifier used to obtain the type is invalid, or the identified class is not registered.
@@ -495,13 +489,13 @@ Note: In .NET for Win
Creates an instance of the type that is designated by the specified object and activated with the specified custom activation data.
A handle that must be unwrapped to access the newly created object, or for instances.
- method to unwrap the return value.
-
- The activation context is used during manifest-based activation to set up the domain policy and to provide an application-based security model. The class contains an object that provides access to the application manifest. For more information, see the class.
-
+ method to unwrap the return value.
+
+ The activation context is used during manifest-based activation to set up the domain policy and to provide an application-based security model. The class contains an object that provides access to the application manifest. For more information, see the class.
+
]]>
@@ -560,43 +554,43 @@ Note: In .NET for Win
Creates an instance of the type whose name is specified, using the named assembly and parameterless constructor.
A handle that must be unwrapped to access the newly created object, or for instances.
- to unwrap the return value.
-
- `assemblyName` can be either of the following:
-
-- The simple name of an assembly, without its path or file extension. For example, you would specify `TypeExtensions` for an assembly whose path and name are .\bin\TypeExtensions.dll.
-
-- The full name of a signed assembly, which consists of its simple name, version, culture, and public key token; for example, "TypeExtensions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=181869f2f7435b51".
-
- For more information on how the common language runtime identifies and loads assemblies, see [How the Runtime Locates Assemblies](/dotnet/framework/deployment/how-the-runtime-locates-assemblies). For information on using the application configuration file to define assembly locations, see [Specifying an Assembly's Location](/dotnet/framework/configure-apps/specify-assembly-location). If `assemblyName` is found, it is loaded in the default context.
-
+ Use to unwrap the return value.
+
+ `assemblyName` can be either of the following:
+
+- The simple name of an assembly, without its path or file extension. For example, you would specify `TypeExtensions` for an assembly whose path and name are .\bin\TypeExtensions.dll.
+
+- The full name of a signed assembly, which consists of its simple name, version, culture, and public key token; for example, "TypeExtensions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=181869f2f7435b51".
+
+ For more information on how the common language runtime identifies and loads assemblies, see [How the Runtime Locates Assemblies](/dotnet/framework/deployment/how-the-runtime-locates-assemblies). For information on using the application configuration file to define assembly locations, see [Specifying an Assembly's Location](/dotnet/framework/configure-apps/specify-assembly-location). If `assemblyName` is found, it is loaded in the default context.
+
> [!NOTE]
-> Starting with .NET Framework 2.0, this method can be used to create nonpublic types if the caller has been granted with the flag and if the grant set of the assembly that contains the nonpublic types is restricted to the caller's grant set or to a subset thereof. (See [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection).) To use this functionality, your application should target .NET Framework 3.5 or later.
-
-
-
-## Examples
- The following example defines a class named `Person` in an assembly named `PersonInfo`. Note that the `Person` class has two constructors, one of which is parameterless.
-
+> Starting with .NET Framework 2.0, this method can be used to create nonpublic types if the caller has been granted with the flag and if the grant set of the assembly that contains the nonpublic types is restricted to the caller's grant set or to a subset thereof. (See [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection).) To use this functionality, your application should target .NET Framework 3.5 or later.
+
+
+
+## Examples
+ The following example defines a class named `Person` in an assembly named `PersonInfo`. Note that the `Person` class has two constructors, one of which is parameterless.
+
:::code language="csharp" source="~/snippets/csharp/System/Activator/CreateInstance/personinfo.cs" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.activator.createinstance/fs/personinfo.fs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.activator.createinstance/vb/personinfo.vb" id="Snippet1":::
-
- The following example calls the method to instantiate the `Person` class. It requires a reference to PersonInfo.dll to be added to the project. Because the method calls the `Person` class parameterless constructor, the example assigns a value to its `Name` property.
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.activator.createinstance/vb/personinfo.vb" id="Snippet1":::
+
+ The following example calls the method to instantiate the `Person` class. It requires a reference to PersonInfo.dll to be added to the project. Because the method calls the `Person` class parameterless constructor, the example assigns a value to its `Name` property.
+
:::code language="csharp" source="~/snippets/csharp/System/Activator/CreateInstance/createinstanceex1.cs" id="Snippet2":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.activator.createinstance/fs/createinstanceex1.fs" id="Snippet2":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.activator.createinstance/vb/createinstanceex1.vb" id="Snippet2":::
-
- However, is frequently called to instantiate a type that crosses machine boundaries or that is not known at design time. In this case, you cannot include a reference to the assembly in the project and cannot make early-bound calls to the type's members. To work around this limitation, the following example uses the method along with reflection to assign a value to the `Person` object's `Name` property and to display its value.
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.activator.createinstance/vb/createinstanceex1.vb" id="Snippet2":::
+
+ However, is frequently called to instantiate a type that crosses machine boundaries or that is not known at design time. In this case, you cannot include a reference to the assembly in the project and cannot make early-bound calls to the type's members. To work around this limitation, the following example uses the method along with reflection to assign a value to the `Person` object's `Name` property and to display its value.
+
:::code language="csharp" source="~/snippets/csharp/System/Activator/CreateInstance/createinstanceex1a.cs" id="Snippet3":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.activator.createinstance/fs/createinstanceex1a.fs" id="Snippet3":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.activator.createinstance/vb/createinstanceex1a.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.activator.createinstance/vb/createinstanceex1a.vb" id="Snippet3":::
+
]]>
@@ -612,16 +606,16 @@ Note: In .NET for Win
The COM type was not obtained through or .
Creation of , , , and types, or arrays of those types, is not supported.
- is not a valid assembly.
-
- -or-
-
- The common language runtime (CLR) version 2.0 or later is currently loaded, and was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0.
- An assembly or module was loaded twice with two different evidences.
-
- -or-
-
- The assembly name or code base is invalid.
+ is not a valid assembly.
+
+-or-
+
+The common language runtime (CLR) version 2.0 or later is currently loaded, and was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0.
+ An assembly or module was loaded twice with two different evidences.
+
+ -or-
+
+ The assembly name or code base is invalid.
@@ -677,33 +671,33 @@ Note: In .NET for Win
Creates an instance of the specified type using that type's parameterless constructor.
A reference to the newly created object, or for instances.
- [!NOTE]
-> Starting with .NET Framework 2.0, this method can be used to access nonpublic types and members if the caller has been granted with the flag and if the grant set of the assembly that contains the nonpublic types and members is restricted to the caller's grant set or to a subset thereof. (See [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection).) To use this functionality, your application should target .NET Framework 3.5 or later.
-
+> Starting with .NET Framework 2.0, this method can be used to access nonpublic types and members if the caller has been granted with the flag and if the grant set of the assembly that contains the nonpublic types and members is restricted to the caller's grant set or to a subset thereof. (See [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection).) To use this functionality, your application should target .NET Framework 3.5 or later.
+
]]>
is .
- is not a .
-
- -or-
-
- is an open generic type (that is, the property returns ).
+ is not a .
+
+-or-
+
+ is an open generic type (that is, the property returns ).
- cannot be a .
-
- -or-
-
- Creation of , , , and types, or arrays of those types, is not supported.
-
- -or-
-
- The assembly that contains is a dynamic assembly that was created with .
+ cannot be a .
+
+-or-
+
+Creation of , , , and types, or arrays of those types, is not supported.
+
+-or-
+
+The assembly that contains is a dynamic assembly that was created with .
The constructor being called throws an exception.
The caller does not have permission to call this constructor.
Cannot create an instance of an abstract class, or this member was invoked with a late-binding mechanism.
@@ -794,64 +788,58 @@ Note: In .NET for Win
Creates an instance of the specified type using the constructor that best matches the specified parameters.
A reference to the newly created object, or for instances with no value.
- [!NOTE]
-> Starting with .NET Framework 2.0, this method can be used to access nonpublic types if the caller has been granted with the flag and if the grant set of the assembly that contains the nonpublic types is restricted to the caller's grant set or to a subset thereof. (See [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection).) To use this functionality, your application should target .NET Framework 3.5 or later.
-
-
-
-## Examples
- The following example calls the method to create a object. It calls the constructor to instantiate a string that contains ten elements from a character array starting at the fourteenth position.
-
+> Starting with .NET Framework 2.0, this method can be used to access nonpublic types if the caller has been granted with the flag and if the grant set of the assembly that contains the nonpublic types is restricted to the caller's grant set or to a subset thereof. (See [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection).) To use this functionality, your application should target .NET Framework 3.5 or later.
+
+
+
+## Examples
+ The following example calls the method to create a object. It calls the constructor to instantiate a string that contains ten elements from a character array starting at the fourteenth position.
+
:::code language="csharp" source="~/snippets/csharp/System/Activator/CreateInstance/CreateInstance5.cs" interactive="try-dotnet" id="Snippet5":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.activator.createinstance/fs/CreateInstance5.fs" id="Snippet5":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.activator.createinstance/vb/CreateInstance5.vb" id="Snippet5":::
-
- The following example creates a jagged array whose elements are arguments to be passed to a constructor. The example then passes each array to the method to invoke the appropriate string constructor.
-
+
+ The following example creates a jagged array whose elements are arguments to be passed to a constructor. The example then passes each array to the method to invoke the appropriate string constructor.
+
:::code language="csharp" source="~/snippets/csharp/System/Activator/CreateInstance/createinstance2.cs" interactive="try-dotnet" id="Snippet4":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.activator.createinstance/fs/createinstance2.fs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.activator.createinstance/vb/createinstance2.vb" id="Snippet4":::
-
+
]]>
is .
- is not a .
-
- -or-
-
- is an open generic type (that is, the property returns ).
+ is not a .
+
+-or-
+
+ is an open generic type (that is, the property returns ).
- cannot be a .
-
- -or-
-
- Creation of , , , and types, or arrays of those types, is not supported.
-
- -or-
-
- The assembly that contains is a dynamic assembly that was created with .
-
- -or-
-
- The constructor that best matches has arguments.
- The constructor being called throws an exception.
- The caller does not have permission to call this constructor.
+ cannot be a .
+
+-or-
-Note: In .NET for Windows Store apps or the Portable Class Library, catch the base class exception, , instead.
-
+Creation of , , , and types, or arrays of those types, is not supported.
+
+-or-
+
+The assembly that contains is a dynamic assembly that was created with .
+
+-or-
+
+The constructor that best matches has arguments.
+ The constructor being called throws an exception.
+ The caller does not have permission to call this constructor. Note: In .NET for Windows Store apps or the Portable Class Library, catch the base class exception, , instead.
Cannot create an instance of an abstract class, or this member was invoked with a late-binding mechanism.
The COM type was not obtained through or .
- No matching public constructor was found.
-
-Note: In .NET for Windows Store apps or the Portable Class Library, catch the base class exception, , instead.
-
+ No matching public constructor was found. Note: In .NET for Windows Store apps or the Portable Class Library, catch the base class exception, , instead.
is a COM object but the class identifier used to obtain the type is invalid, or the identified class is not registered.
@@ -899,13 +887,13 @@ Note: In .NET for Win
Creates an instance of the type whose name is specified in the specified remote domain, using the named assembly and parameterless constructor.
A handle that must be unwrapped to access the newly created object, or for instances.
- when a host needs to execute code in an application domain that has restricted security permissions.
-
+ Use when a host needs to execute code in an application domain that has restricted security permissions.
+
Use to unwrap the return value.
-
+
]]>
@@ -916,25 +904,25 @@ Note: In .NET for Win
was not found.
The caller does not have permission to call this constructor.
- Cannot create an instance of an abstract type.
-
- -or-
-
- This member was invoked with a late-binding mechanism.
+ Cannot create an instance of an abstract type.
+
+ -or-
+
+ This member was invoked with a late-binding mechanism.
The constructor, which was invoked through reflection, threw an exception.
The COM type was not obtained through or .
Creation of , , , and types, or arrays of those types, is not supported.
- is not a valid assembly.
-
- -or-
-
- The common language runtime (CLR) version 2.0 or later is currently loaded, and was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0.
- An assembly or module was loaded twice with two different evidences.
-
- -or-
-
- The assembly name or code base is invalid.
+ is not a valid assembly.
+
+-or-
+
+The common language runtime (CLR) version 2.0 or later is currently loaded, and was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0.
+ An assembly or module was loaded twice with two different evidences.
+
+ -or-
+
+ The assembly name or code base is invalid.
@@ -993,20 +981,18 @@ Note: In .NET for Win
The name of the assembly where the type named is sought. If is , the executing assembly is searched.
The fully qualified name of the type to create an instance of.
- An array of one or more attributes that can participate in activation. This is typically an array that contains a single object that specifies the URL that is required to activate a remote object.
-
- This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
+ An array of one or more attributes that can participate in activation. This is typically an array that contains a single object that specifies the URL that is required to activate a remote object. This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
Creates an instance of the type whose name is specified, using the named assembly and parameterless constructor.
A handle that must be unwrapped to access the newly created object, or for instances.
- to unwrap the return value.
-
+ Use to unwrap the return value.
+
> [!NOTE]
-> Starting with .NET Framework 2.0, this method can be used to create nonpublic types if the caller has been granted with the flag and if the grant set of the nonpublic types is restricted to the caller's grant set or to a subset thereof. (See [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection).) To use this functionality, your application should target .NET Framework 3.5 or later.
-
+> Starting with .NET Framework 2.0, this method can be used to create nonpublic types if the caller has been granted with the flag and if the grant set of the nonpublic types is restricted to the caller's grant set or to a subset thereof. (See [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection).) To use this functionality, your application should target .NET Framework 3.5 or later.
+
]]>
@@ -1019,28 +1005,26 @@ Note: In .NET for Win
The caller does not have permission to call this constructor.
Cannot create an instance of an abstract class, or this member was invoked with a late-binding mechanism.
The COM type was not obtained through or .
- Creation of , , , and types, or arrays of those types, is not supported.
-
- -or-
-
- is not an empty array, and the type being created does not derive from .
-
- -or-
-
- is not a
-
- array.
+ Creation of , , , and types, or arrays of those types, is not supported.
+
+-or-
+
+ is not an empty array, and the type being created does not derive from .
+
+-or-
+
+ is not a array.
- is not a valid assembly.
-
- -or-
-
- The common language runtime (CLR) version 2.0 or later is currently loaded, and was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0.
- An assembly or module was loaded twice with two different evidences.
-
- -or-
-
- The assembly name or code base is invalid.
+ is not a valid assembly.
+
+-or-
+
+The common language runtime (CLR) version 2.0 or later is currently loaded, and was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0.
+ An assembly or module was loaded twice with two different evidences.
+
+ -or-
+
+ The assembly name or code base is invalid.
The invoked constructor throws an exception.
-or-
@@ -1111,48 +1095,46 @@ An error occurred when attempting remote activation in a target specified in
The type of object to create.
An array of arguments that match in number, order, and type the parameters of the constructor to invoke. If is an empty array or , the constructor that takes no parameters (the parameterless constructor) is invoked.
- An array of one or more attributes that can participate in activation. This is typically an array that contains a single object that specifies the URL that is required to activate a remote object.
-
- This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
+ An array of one or more attributes that can participate in activation. This is typically an array that contains a single object that specifies the URL that is required to activate a remote object. This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
Creates an instance of the specified type using the constructor that best matches the specified parameters.
A reference to the newly created object, or for instances with no value.
- [!NOTE]
-> Starting with .NET Framework 2.0, this method can be used to access nonpublic types if the caller has been granted with the flag and if the grant set of the assembly that contains the nonpublic types is restricted to the caller's grant set or to a subset thereof. (See [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection).) To use this functionality, your application should target .NET Framework 3.5 or later.
-
+> Starting with .NET Framework 2.0, this method can be used to access nonpublic types if the caller has been granted with the flag and if the grant set of the assembly that contains the nonpublic types is restricted to the caller's grant set or to a subset thereof. (See [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection).) To use this functionality, your application should target .NET Framework 3.5 or later.
+
]]>
is .
- is not a .
-
- -or-
-
- is an open generic type (that is, the property returns ).
+ is not a .
+
+-or-
+
+ is an open generic type (that is, the property returns ).
- cannot be a .
-
- -or-
-
- Creation of , , , and types, or arrays of those types, is not supported.
-
- -or-
-
- is not an empty array, and the type being created does not derive from .
-
- -or-
-
- The assembly that contains is a dynamic assembly that was created with .
-
- -or-
-
- The constructor that best matches has arguments.
+ cannot be a .
+
+-or-
+
+Creation of , , , and types, or arrays of those types, is not supported.
+
+-or-
+
+ is not an empty array, and the type being created does not derive from .
+
+-or-
+
+The assembly that contains is a dynamic assembly that was created with .
+
+-or-
+
+The constructor that best matches has arguments.
The constructor being called throws an exception.
The caller does not have permission to call this constructor.
Cannot create an instance of an abstract class, or this member was invoked with a late-binding mechanism.
@@ -1235,38 +1217,38 @@ An error occurred when attempting remote activation in a target specified in Creates an instance of the specified type using the constructor that best matches the specified parameters.
A reference to the newly created object, or for instances with no value.
- [!NOTE]
-> Starting with .NET Framework 2.0, this method can be used to access nonpublic types and members if the caller has been granted with the flag and if the grant set of the assembly that contains the nonpublic types and members is restricted to the caller's grant set or to a subset thereof. (See [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection).) To use this functionality, your application should target .NET Framework 3.5 or later.
-
+> Starting with .NET Framework 2.0, this method can be used to access nonpublic types and members if the caller has been granted with the flag and if the grant set of the assembly that contains the nonpublic types and members is restricted to the caller's grant set or to a subset thereof. (See [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection).) To use this functionality, your application should target .NET Framework 3.5 or later.
+
]]>
is .
- is not a .
-
- -or-
-
- is an open generic type (that is, the property returns ).
+ is not a .
+
+-or-
+
+ is an open generic type (that is, the property returns ).
- cannot be a .
-
- -or-
-
- Creation of , , , and types, or arrays of those types, is not supported.
-
- -or-
-
- The assembly that contains is a dynamic assembly that was created with .
-
- -or-
-
- The constructor that best matches has arguments.
+ cannot be a .
+
+-or-
+
+Creation of , , , and types, or arrays of those types, is not supported.
+
+-or-
+
+The assembly that contains is a dynamic assembly that was created with .
+
+-or-
+
+The constructor that best matches has arguments.
The constructor being called throws an exception.
The caller does not have permission to call this constructor.
Cannot create an instance of an abstract class, or this member was invoked with a late-binding mechanism.
@@ -1347,48 +1329,46 @@ An error occurred when attempting remote activation in a target specified in An object that uses and to seek and identify the constructor. If is , the default binder is used.
An array of arguments that match in number, order, and type the parameters of the constructor to invoke. If is an empty array or , the constructor that takes no parameters (the parameterless constructor) is invoked.
Culture-specific information that governs the coercion of to the formal types declared for the constructor. If is , the for the current thread is used.
- An array of one or more attributes that can participate in activation. This is typically an array that contains a single object that specifies the URL that is required to activate a remote object.
-
- This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
+ An array of one or more attributes that can participate in activation. This is typically an array that contains a single object that specifies the URL that is required to activate a remote object. This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
Creates an instance of the specified type using the constructor that best matches the specified parameters.
A reference to the newly created object, or for instances with no value.
- [!NOTE]
-> Starting with .NET Framework 2.0, this method can be used to access nonpublic types and members if the caller has been granted with the flag and if the grant set of the nonpublic types and members is restricted to the caller's grant set or to a subset thereof. (See [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection).) To use this functionality, your application should target .NET Framework 3.5 or later.
-
+> Starting with .NET Framework 2.0, this method can be used to access nonpublic types and members if the caller has been granted with the flag and if the grant set of the nonpublic types and members is restricted to the caller's grant set or to a subset thereof. (See [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection).) To use this functionality, your application should target .NET Framework 3.5 or later.
+
]]>
is .
- is not a .
-
- -or-
-
- is an open generic type (that is, the property returns ).
+ is not a .
+
+-or-
+
+ is an open generic type (that is, the property returns ).
- cannot be a .
-
- -or-
-
- Creation of , , , and types, or arrays of those types, is not supported.
-
- -or-
-
- is not an empty array, and the type being created does not derive from .
-
- -or-
-
- The assembly that contains is a dynamic assembly that was created with .
-
- -or-
-
- The constructor that best matches has arguments.
+ cannot be a .
+
+-or-
+
+Creation of , , , and types, or arrays of those types, is not supported.
+
+-or-
+
+ is not an empty array, and the type being created does not derive from .
+
+-or-
+
+The assembly that contains is a dynamic assembly that was created with .
+
+-or-
+
+The constructor that best matches has arguments.
The constructor being called throws an exception.
The caller does not have permission to call this constructor.
Cannot create an instance of an abstract class, or this member was invoked with a late-binding mechanism.
@@ -1476,20 +1456,18 @@ An error occurred when attempting remote activation in a target specified in An object that uses and to seek and identify the constructor. If is , the default binder is used.
An array of arguments that match in number, order, and type the parameters of the constructor to invoke. If is an empty array or , the constructor that takes no parameters (the parameterless constructor) is invoked.
Culture-specific information that governs the coercion of to the formal types declared for the constructor. If is , the for the current thread is used.
- An array of one or more attributes that can participate in activation. This is typically an array that contains a single object that specifies the URL that is required to activate a remote object.
-
- This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
+ An array of one or more attributes that can participate in activation. This is typically an array that contains a single object that specifies the URL that is required to activate a remote object. This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
Creates an instance of the type whose name is specified, using the named assembly and the constructor that best matches the specified parameters.
A handle that must be unwrapped to access the newly created instance, or for instances with no value.
- to unwrap the return value.
+ Use to unwrap the return value.
> [!NOTE]
-> Starting with .NET Framework 2.0, this method can be used to create nonpublic types and members if the caller has been granted with the flag and if the grant set of the assembly that contains the nonpublic types and members is restricted to the caller's grant set or to a subset thereof. (See [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection).) To use this functionality, your application should target .NET Framework 3.5 or later.
-
+> Starting with .NET Framework 2.0, this method can be used to create nonpublic types and members if the caller has been granted with the flag and if the grant set of the assembly that contains the nonpublic types and members is restricted to the caller's grant set or to a subset thereof. (See [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection).) To use this functionality, your application should target .NET Framework 3.5 or later.
+
]]>
@@ -1503,26 +1481,26 @@ An error occurred when attempting remote activation in a target specified in Cannot create an instance of an abstract class, or this member was invoked with a late-binding mechanism.
The constructor, which was invoked through reflection, threw an exception.
The COM type was not obtained through or .
- Creation of , , , and types, or arrays of those types, is not supported.
-
- -or-
-
- is not an empty array, and the type being created does not derive from .
-
- -or-
-
- The constructor that best matches has arguments.
+ Creation of , , , and types, or arrays of those types, is not supported.
+
+-or-
+
+ is not an empty array, and the type being created does not derive from .
+
+-or-
+
+The constructor that best matches has arguments.
- is not a valid assembly.
-
- -or-
-
- The common language runtime (CLR) version 2.0 or later is currently loaded, and was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0.
- An assembly or module was loaded twice with two different evidences.
-
- -or-
-
- The assembly name or code base is invalid.
+ is not a valid assembly.
+
+-or-
+
+The common language runtime (CLR) version 2.0 or later is currently loaded, and was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0.
+ An assembly or module was loaded twice with two different evidences.
+
+ -or-
+
+ The assembly name or code base is invalid.
@@ -1574,19 +1552,17 @@ An error occurred when attempting remote activation in a target specified in An object that uses and to seek and identify the constructor. If is , the default binder is used.
An array of arguments that match in number, order, and type the parameters of the constructor to invoke. If is an empty array or , the constructor that takes no parameters (the parameterless constructor) is invoked.
Culture-specific information that governs the coercion of to the formal types declared for the constructor. If is , the for the current thread is used.
- An array of one or more attributes that can participate in activation. This is typically an array that contains a single object that specifies the URL that is required to activate a remote object.
-
- This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
+ An array of one or more attributes that can participate in activation. This is typically an array that contains a single object that specifies the URL that is required to activate a remote object. This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
Creates an instance of the type whose name is specified in the specified remote domain, using the named assembly and the constructor that best matches the specified parameters.
A handle that must be unwrapped to access the newly created object, or for instances with no value.
- when a host needs to execute code in an application domain that has restricted security permissions.
-
+ Use when a host needs to execute code in an application domain that has restricted security permissions.
+
Use to unwrap the return value.
-
+
]]>
@@ -1600,26 +1576,26 @@ An error occurred when attempting remote activation in a target specified in Cannot create an instance of an abstract class, or this member was invoked with a late-binding mechanism.
The constructor, which was invoked through reflection, threw an exception.
The COM type was not obtained through or .
- Creation of , , , and types, or arrays of those types, is not supported.
-
- -or-
-
- is not an empty array, and the type being created does not derive from .
-
- -or-
-
- The constructor that best matches has arguments.
+ Creation of , , , and types, or arrays of those types, is not supported.
+
+-or-
+
+ is not an empty array, and the type being created does not derive from .
+
+-or-
+
+The constructor that best matches has arguments.
- is not a valid assembly.
-
- -or-
-
- The common language runtime (CLR) version 2.0 or later is currently loaded, and was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0.
- An assembly or module was loaded twice with two different evidences.
-
- -or-
-
- The assembly name or code base is invalid.
+ is not a valid assembly.
+
+-or-
+
+The common language runtime (CLR) version 2.0 or later is currently loaded, and was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0.
+ An assembly or module was loaded twice with two different evidences.
+
+ -or-
+
+ The assembly name or code base is invalid.
@@ -1676,21 +1652,19 @@ An error occurred when attempting remote activation in a target specified in An object that uses and to seek and identify the constructor. If is , the default binder is used.
An array of arguments that match in number, order, and type the parameters of the constructor to invoke. If is an empty array or , the constructor that takes no parameters (the parameterless constructor) is invoked.
Culture-specific information that governs the coercion of to the formal types declared for the constructor. If is , the for the current thread is used.
- An array of one or more attributes that can participate in activation. This is typically an array that contains a single object that specifies the URL that is required to activate a remote object.
-
- This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
+ An array of one or more attributes that can participate in activation. This is typically an array that contains a single object that specifies the URL that is required to activate a remote object. This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
Information used to make security policy decisions and grant code permissions.
Creates an instance of the type whose name is specified, using the named assembly and the constructor that best matches the specified parameters.
A handle that must be unwrapped to access the newly created object, or for instances with no value.
- to unwrap the return value.
-
+ Use to unwrap the return value.
+
> [!NOTE]
-> Starting with .NET Framework 2.0, this method can be used to create nonpublic types and members if the caller has been granted with the flag and if the grant set of the assembly that contains the nonpublic types and members is restricted to the caller's grant set or to a subset thereof. (See [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection).) To use this functionality, your application should target .NET Framework 3.5 or later.
-
+> Starting with .NET Framework 2.0, this method can be used to create nonpublic types and members if the caller has been granted with the flag and if the grant set of the assembly that contains the nonpublic types and members is restricted to the caller's grant set or to a subset thereof. (See [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection).) To use this functionality, your application should target .NET Framework 3.5 or later.
+
]]>
@@ -1704,26 +1678,26 @@ An error occurred when attempting remote activation in a target specified in Cannot create an instance of an abstract class, or this member was invoked with a late-binding mechanism.
The constructor, which was invoked through reflection, threw an exception.
The COM type was not obtained through or .
- Creation of , , , and types, or arrays of those types, is not supported.
-
- -or-
-
- is not an empty array, and the type being created does not derive from .
-
- -or-
-
- The constructor that best matches has arguments.
+ Creation of , , , and types, or arrays of those types, is not supported.
+
+-or-
+
+ is not an empty array, and the type being created does not derive from .
+
+-or-
+
+The constructor that best matches has arguments.
- is not a valid assembly.
-
- -or-
-
- The common language runtime (CLR) version 2.0 or later is currently loaded, and was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0.
- An assembly or module was loaded twice with two different evidences.
-
- -or-
-
- The assembly name or code base is invalid.
+ is not a valid assembly.
+
+-or-
+
+The common language runtime (CLR) version 2.0 or later is currently loaded, and was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0.
+ An assembly or module was loaded twice with two different evidences.
+
+ -or-
+
+ The assembly name or code base is invalid.
@@ -1786,13 +1760,13 @@ An error occurred when attempting remote activation in a target specified in Creates an instance of the type whose name is specified in the specified remote domain, using the named assembly and the constructor that best matches the specified parameters.
A handle that must be unwrapped to access the newly created object, or for instances with no value.
- when a host needs to execute code in an application domain that has restricted security permissions.
-
+ Use when a host needs to execute code in an application domain that has restricted security permissions.
+
Use to unwrap the return value.
-
+
]]>
@@ -1806,26 +1780,26 @@ An error occurred when attempting remote activation in a target specified in Cannot create an instance of an abstract class, or this member was invoked with a late-binding mechanism.
The constructor, which was invoked through reflection, threw an exception.
The COM type was not obtained through or .
- Creation of , , , and types, or arrays of those types, is not supported.
-
- -or-
-
- is not an empty array, and the type being created does not derive from .
-
- -or-
-
- The constructor that best matches has arguments.
+ Creation of , , , and types, or arrays of those types, is not supported.
+
+-or-
+
+ is not an empty array, and the type being created does not derive from .
+
+-or-
+
+The constructor that best matches has arguments.
- is not a valid assembly.
-
- -or-
-
- The common language runtime (CLR) version 2.0 or later is currently loaded, and was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0.
- An assembly or module was loaded twice with two different evidences.
-
- -or-
-
- The assembly name or code base is invalid.
+ is not a valid assembly.
+
+-or-
+
+The common language runtime (CLR) version 2.0 or later is currently loaded, and was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0.
+ An assembly or module was loaded twice with two different evidences.
+
+ -or-
+
+ The assembly name or code base is invalid.
@@ -1890,26 +1864,23 @@ An error occurred when attempting remote activation in a target specified in Creates an instance of the type designated by the specified generic type parameter, using the parameterless constructor.
A reference to the newly created object, or for instances.
- generic method is used by compilers to implement the instantiation of types specified by type parameters. For example, in the following generic method, the implementation of `new T()` (`gcnew T()` in C++) uses the generic method.
-
+ generic method is used by compilers to implement the instantiation of types specified by type parameters. For example, in the following generic method, the implementation of `new T()` (`gcnew T()` in C++) uses the generic method.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.activation.createinstance~~1/cpp/remarks.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/Activator/CreateInstanceT/remarks.cs" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.activation.createinstance~~1/fs/remarks.fs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.activation.createinstance~~1/vb/remarks.vb" id="Snippet1":::
-
- In general, there is no use for the generic method in application code, because the type must be known at compile time. If the type is known at compile time, normal instantiation syntax can be used (`new` operator in C#, `New` in Visual Basic, `gcnew` in C++). If the type is not known at compile time, you can call a non-generic overload of .
-
- There are no overloads of the generic method that take argument lists, because the non-generic overloads of already provide late-bound constructor resolution.
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.activation.createinstance~~1/vb/remarks.vb" id="Snippet1":::
+
+ In general, there is no use for the generic method in application code, because the type must be known at compile time. If the type is known at compile time, normal instantiation syntax can be used (`new` operator in C#, `New` in Visual Basic, `gcnew` in C++). If the type is not known at compile time, you can call a non-generic overload of .
+
+ There are no overloads of the generic method that take argument lists, because the non-generic overloads of already provide late-bound constructor resolution.
+
]]>
- Cannot create an instance of an abstract class, or the type that is specified for does not have a parameterless constructor.
-
-Note: In .NET for Windows Store apps or the Portable Class Library, catch the base class exception, , instead.
-
+ Cannot create an instance of an abstract class, or the type that is specified for does not have a parameterless constructor. Note: In .NET for Windows Store apps or the Portable Class Library, catch the base class exception, , instead.
@@ -1973,23 +1944,23 @@ Note: In .NET for Win
Creates an instance of the type whose name is specified, using the named assembly file and parameterless constructor.
A handle that must be unwrapped to access the newly created object, or for instances.
- method to unwrap the return value.
-
- For information about other exceptions that can be thrown by invoked methods, see the Exceptions section of the and methods.
-
-
-
-## Examples
- The following code example demonstrates how to call the method. This code example is part of a larger example provided for the class.
-
+ method to unwrap the return value.
+
+ For information about other exceptions that can be thrown by invoked methods, see the Exceptions section of the and methods.
+
+
+
+## Examples
+ The following code example demonstrates how to call the method. This code example is part of a larger example provided for the class.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/ActivatorX/cpp/ActivatorX.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System/Activator/Overview/ActivatorX.cs" id="Snippet3":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/ActivatorX/fs/ActivatorX.fs" id="Snippet3":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/ActivatorX/VB/ActivatorX.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/ActivatorX/VB/ActivatorX.vb" id="Snippet3":::
+
]]>
@@ -2004,11 +1975,11 @@ Note: In .NET for Win
The constructor, which was invoked through reflection, threw an exception.
The caller does have the required .
- is not a valid assembly.
-
- -or-
-
- The common language runtime (CLR) version 2.0 or later is currently loaded, and was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0.
+ is not a valid assembly.
+
+-or-
+
+The common language runtime (CLR) version 2.0 or later is currently loaded, and was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0.
@@ -2052,15 +2023,15 @@ Note: In .NET for Win
Creates an instance of the type whose name is specified in the specified remote domain, using the named assembly file and parameterless constructor.
A handle that must be unwrapped to access the newly created object, or for instances.
- when a host needs to execute code in an application domain that has restricted security permissions.
-
+ when a host needs to execute code in an application domain that has restricted security permissions.
+
Use the method to unwrap the return value.
-
- For information about other exceptions that can be thrown by invoked methods, see the Exceptions section of the and methods.
-
+
+ For information about other exceptions that can be thrown by invoked methods, see the Exceptions section of the and methods.
+
]]>
@@ -2075,11 +2046,11 @@ Note: In .NET for Win
The constructor, which was invoked through reflection, threw an exception.
The caller does have the required .
- is not a valid assembly.
-
- -or-
-
- The common language runtime (CLR) version 2.0 or later is currently loaded, and was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0.
+ is not a valid assembly.
+
+-or-
+
+The common language runtime (CLR) version 2.0 or later is currently loaded, and was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0.
@@ -2138,19 +2109,17 @@ Note: In .NET for Win
The name of a file that contains an assembly where the type named is sought.
The name of the type to create an instance of.
- An array of one or more attributes that can participate in activation. This is typically an array that contains a single object that specifies the URL that is required to activate a remote object.
-
- This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
+ An array of one or more attributes that can participate in activation. This is typically an array that contains a single object that specifies the URL that is required to activate a remote object. This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
Creates an instance of the type whose name is specified, using the named assembly file and parameterless constructor.
A handle that must be unwrapped to access the newly created object, or for instances.
- method to unwrap the return value.
-
- For information about other exceptions that can be thrown by invoked methods, see the Exceptions section of the and methods.
-
+ method to unwrap the return value.
+
+ For information about other exceptions that can be thrown by invoked methods, see the Exceptions section of the and methods.
+
]]>
@@ -2167,11 +2136,11 @@ Note: In .NET for Win
is not an empty array, and the type being created does not derive from .
The caller does have the required .
- is not a valid assembly.
-
- -or-
-
- The common language runtime (CLR) version 2.0 or later is currently loaded, and was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0.
+ is not a valid assembly.
+
+-or-
+
+The common language runtime (CLR) version 2.0 or later is currently loaded, and was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0.
@@ -2246,19 +2215,17 @@ Note: In .NET for Win
An object that uses and to seek and identify the constructor. If is , the default binder is used.
An array of arguments that match in number, order, and type the parameters of the constructor to invoke. If is an empty array or , the constructor that takes no parameters (the parameterless constructor) is invoked.
Culture-specific information that governs the coercion of to the formal types declared for the constructor. If is , the for the current thread is used.
- An array of one or more attributes that can participate in activation. This is typically an array that contains a single object that specifies the URL that is required to activate a remote object.
-
- This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
+ An array of one or more attributes that can participate in activation. This is typically an array that contains a single object that specifies the URL that is required to activate a remote object. This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
Creates an instance of the type whose name is specified, using the named assembly file and the constructor that best matches the specified parameters.
A handle that must be unwrapped to access the newly created object, or for instances.
- method to unwrap the return value.
-
- For information about other exceptions that can be thrown by invoked methods, see the Exceptions section of the and methods.
-
+ method to unwrap the return value.
+
+ For information about other exceptions that can be thrown by invoked methods, see the Exceptions section of the and methods.
+
]]>
@@ -2275,11 +2242,11 @@ Note: In .NET for Win
is not an empty array, and the type being created does not derive from .
- is not a valid assembly.
-
- -or-
-
- The common language runtime (CLR) version 2.0 or later is currently loaded, and was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0.
+ is not a valid assembly.
+
+-or-
+
+The common language runtime (CLR) version 2.0 or later is currently loaded, and was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0.
@@ -2331,21 +2298,19 @@ Note: In .NET for Win
An object that uses and to seek and identify the constructor. If is , the default binder is used.
An array of arguments that match in number, order, and type the parameters of the constructor to invoke. If is an empty array or , the constructor that takes no parameters (the parameterless constructor) is invoked.
Culture-specific information that governs the coercion of to the formal types declared for the constructor. If is , the for the current thread is used.
- An array of one or more attributes that can participate in activation. This is typically an array that contains a single object that specifies the URL that is required to activate a remote object.
-
- This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
+ An array of one or more attributes that can participate in activation. This is typically an array that contains a single object that specifies the URL that is required to activate a remote object. This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
Creates an instance of the type whose name is specified in the specified remote domain, using the named assembly file and the constructor that best matches the specified parameters.
A handle that must be unwrapped to access the newly created object, or for instances.
- when a host needs to execute code in an application domain that has restricted security permissions.
-
- Use the method to unwrap the return value.
-
- For information about other exceptions that can be thrown by invoked methods, see the Exceptions sections of the and methods.
-
+ when a host needs to execute code in an application domain that has restricted security permissions.
+
+ Use the method to unwrap the return value.
+
+ For information about other exceptions that can be thrown by invoked methods, see the Exceptions sections of the and methods.
+
]]>
@@ -2362,11 +2327,11 @@ Note: In .NET for Win
is not an empty array, and the type being created does not derive from .
- is not a valid assembly.
-
- -or-
-
- was compiled for a version of the common language runtime that is later than the version that is currently loaded.
+ is not a valid assembly.
+
+-or-
+
+ was compiled for a version of the common language runtime that is later than the version that is currently loaded.
@@ -2419,20 +2384,18 @@ Note: In .NET for Win
An object that uses and to seek and identify the constructor. If is , the default binder is used.
An array of arguments that match in number, order, and type the parameters of the constructor to invoke. If is an empty array or , the constructor that takes no parameters (the parameterless constructor) is invoked.
Culture-specific information that governs the coercion of to the formal types declared for the constructor. If is , the for the current thread is used.
- An array of one or more attributes that can participate in activation. This is typically an array that contains a single object that specifies the URL that is required to activate a remote object.
-
- This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
+ An array of one or more attributes that can participate in activation. This is typically an array that contains a single object that specifies the URL that is required to activate a remote object. This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
Information used to make security policy decisions and grant code permissions.
Creates an instance of the type whose name is specified, using the named assembly file and the constructor that best matches the specified parameters.
A handle that must be unwrapped to access the newly created object, or for instances.
- method to unwrap the return value.
-
- For information about other exceptions that can be thrown by invoked methods, see the Exceptions section of the and methods.
-
+ method to unwrap the return value.
+
+ For information about other exceptions that can be thrown by invoked methods, see the Exceptions section of the and methods.
+
]]>
@@ -2449,11 +2412,11 @@ Note: In .NET for Win
is not an empty array, and the type being created does not derive from .
- is not a valid assembly.
-
- -or-
-
- The common language runtime (CLR) version 2.0 or later is currently loaded, and was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0.
+ is not a valid assembly.
+
+-or-
+
+The common language runtime (CLR) version 2.0 or later is currently loaded, and was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0.
@@ -2511,22 +2474,20 @@ Note: In .NET for Win
An object that uses and to seek and identify the constructor. If is , the default binder is used.
An array of arguments that match in number, order, and type the parameters of the constructor to invoke. If is an empty array or , the constructor that takes no parameters (the parameterless constructor) is invoked.
Culture-specific information that governs the coercion of to the formal types declared for the constructor. If is , the for the current thread is used.
- An array of one or more attributes that can participate in activation. This is typically an array that contains a single object that specifies the URL that is required to activate a remote object.
-
- This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
+ An array of one or more attributes that can participate in activation. This is typically an array that contains a single object that specifies the URL that is required to activate a remote object. This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
Information used to make security policy decisions and grant code permissions.
Creates an instance of the type whose name is specified in the specified remote domain, using the named assembly file and the constructor that best matches the specified parameters.
A handle that must be unwrapped to access the newly created object, or for instances.
- when a host needs to execute code in an application domain that has restricted security permissions.
-
+ when a host needs to execute code in an application domain that has restricted security permissions.
+
Use the method to unwrap the return value.
-
- For information about other exceptions that can be thrown by invoked methods, see the Exceptions section of the and methods.
-
+
+ For information about other exceptions that can be thrown by invoked methods, see the Exceptions section of the and methods.
+
]]>
@@ -2543,11 +2504,11 @@ Note: In .NET for Win
is not an empty array, and the type being created does not derive from .
- is not a valid assembly.
-
- -or-
-
- The common language runtime (CLR) version 2.0 or later is currently loaded, and was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0.
+ is not a valid assembly.
+
+-or-
+
+The common language runtime (CLR) version 2.0 or later is currently loaded, and was compiled for a version of the CLR that is later than the currently loaded version. Note that the .NET Framework versions 2.0, 3.0, and 3.5 all use CLR version 2.0.
@@ -2600,11 +2561,11 @@ Note: In .NET for Win
Creates a proxy for the well-known object indicated by the specified type and URL.
A proxy that points to an endpoint served by the requested well-known object.
-
@@ -2658,13 +2619,13 @@ Note: In .NET for Win
Creates a proxy for the well-known object indicated by the specified type, URL, and channel data.
A proxy that points to an endpoint served by the requested well-known object.
- method.
-
+ method.
+
]]>
@@ -2718,11 +2679,11 @@ Note: In .NET for Win
The caller-allocated array that receives the IDs corresponding to the names.
Maps a set of names to a corresponding set of dispatch identifiers.
-
Late-bound access using the COM IDispatch interface is not supported.
@@ -2766,11 +2727,11 @@ Note: In .NET for Win
An object that receives a pointer to the requested type information object.
Retrieves the type information for an object, which can then be used to get the type information for an interface.
-
Late-bound access using the COM IDispatch interface is not supported.
@@ -2810,11 +2771,11 @@ Note: In .NET for Win
When this method returns, contains a pointer to a location that receives the number of type information interfaces provided by the object. This parameter is passed uninitialized.
Retrieves the number of type information interfaces that an object provides (either 0 or 1).
-
Late-bound access using the COM IDispatch interface is not supported.
@@ -2868,11 +2829,11 @@ Note: In .NET for Win
The index of the first argument that has an error.
Provides access to properties and methods exposed by an object.
-
Late-bound access using the COM IDispatch interface is not supported.
diff --git a/xml/System/AggregateException.xml b/xml/System/AggregateException.xml
index e6ea5a837ad..a71d29c4a75 100644
--- a/xml/System/AggregateException.xml
+++ b/xml/System/AggregateException.xml
@@ -74,20 +74,20 @@
Represents one or more errors that occur during application execution.
- is used to consolidate multiple failures into a single, throwable exception object. It is used extensively in the [Task Parallel Library (TPL)](/dotnet/standard/parallel-programming/task-parallel-library-tpl) and [Parallel LINQ (PLINQ)](/dotnet/standard/parallel-programming/parallel-linq-plinq). For more information, see [Exception Handling](/dotnet/standard/parallel-programming/exception-handling-task-parallel-library) and [How to: Handle Exceptions in a PLINQ Query](/dotnet/standard/parallel-programming/how-to-handle-exceptions-in-a-plinq-query). For additional information, see the [Aggregating Exceptions](https://docs.microsoft.com/archive/msdn-magazine/2009/brownfield/aggregating-exceptions) entry in the .NET Matters blog.
-
-
-
-## Examples
- The following example catches the exception and calls the method to handle each exception it contains. Compiling and running the example with the first `task1` variable should result in an object that contains an exception. Commenting out that line, uncommenting the second `task1` variable, and compiling and running the example produces an object that contains an exception.
-
+ is used to consolidate multiple failures into a single, throwable exception object. It is used extensively in the [Task Parallel Library (TPL)](/dotnet/standard/parallel-programming/task-parallel-library-tpl) and [Parallel LINQ (PLINQ)](/dotnet/standard/parallel-programming/parallel-linq-plinq). For more information, see [Exception Handling](/dotnet/standard/parallel-programming/exception-handling-task-parallel-library) and [How to: Handle Exceptions in a PLINQ Query](/dotnet/standard/parallel-programming/how-to-handle-exceptions-in-a-plinq-query). For additional information, see the [Aggregating Exceptions](https://docs.microsoft.com/archive/msdn-magazine/2009/brownfield/aggregating-exceptions) entry in the .NET Matters blog.
+
+
+
+## Examples
+ The following example catches the exception and calls the method to handle each exception it contains. Compiling and running the example with the first `task1` variable should result in an object that contains an exception. Commenting out that line, uncommenting the second `task1` variable, and compiling and running the example produces an object that contains an exception.
+
:::code language="csharp" source="~/snippets/csharp/System/AggregateException/Overview/exception1.cs" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.aggregateexception.class/fs/exception1.fs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.aggregateexception.class/vb/exception1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.aggregateexception.class/vb/exception1.vb" id="Snippet1":::
+
]]>
All public and protected members of are thread-safe and may be used concurrently from multiple threads.
@@ -139,18 +139,18 @@
Initializes a new instance of the class with a system-supplied message that describes the error.
- property of the new instance to a system-supplied message that describes the error, such as "System.AggregateException: One or more errors occurred." This message takes into account the current system culture.
-
- The following table shows the initial property values for an instance of .
-
-|Property|Value|
-|--------------|-----------|
-||`null`.|
-||The localized error message string.|
-
+ property of the new instance to a system-supplied message that describes the error, such as "System.AggregateException: One or more errors occurred." This message takes into account the current system culture.
+
+ The following table shows the initial property values for an instance of .
+
+|Property|Value|
+|--------------|-----------|
+||`null`.|
+||The localized error message string.|
+
]]>
Handling and Throwing Exceptions
@@ -298,16 +298,16 @@
The message that describes the exception. The caller of this constructor is required to ensure that this string has been localized for the current system culture.
Initializes a new instance of the class with a specified message that describes the error.
- .
-
-|Property|Value|
-|--------------|-----------|
-||`null`.|
-||The error message string specified in `message`.|
-
+ .
+
+|Property|Value|
+|--------------|-----------|
+||`null`.|
+||The error message string specified in `message`.|
+
]]>
Handling and Throwing Exceptions
@@ -367,11 +367,11 @@
The contextual information about the source or destination.
Initializes a new instance of the class with serialized data.
-
The argument is null.
@@ -483,18 +483,18 @@
The exception that is the cause of the current exception. If the parameter is not , the current exception is raised in a block that handles the inner exception.
Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception.
- property. The property returns the same value that is passed into the constructor, or `null` if the property does not supply the inner exception value to the constructor.
-
- The following table shows the initial property values for an instance of .
-
-|Property|Value|
-|--------------|-----------|
-||`null`.|
-||The error message string specified in `message`.|
-
+ property. The property returns the same value that is passed into the constructor, or `null` if the property does not supply the inner exception value to the constructor.
+
+ The following table shows the initial property values for an instance of .
+
+|Property|Value|
+|--------------|-----------|
+||`null`.|
+||The error message string specified in `message`.|
+
]]>
The argument is null.
@@ -603,28 +603,28 @@
Flattens an instances into a single, new instance.
A new, flattened .
- exception before it is propagated to the parent task, which wraps that exception in its own exception before it propagates it back to the calling thread. In such cases, the property of the exception that is caught by the , , or method contains one or more instances, not the original exceptions that caused the fault. To avoid having to iterate over nested exceptions, you can use the method to remove all the nested exceptions, so that the property of the returned object contains the original exceptions.
-
- This method recursively flattens all instances of exceptions that are inner exceptions of the current instance. The inner exceptions returned in the new are the union of all the inner exceptions from exception tree rooted at the current instance.
-
-
-
-## Examples
- In the following example, nested instances are flattened and handled in just one loop.
-
+ exception before it is propagated to the parent task, which wraps that exception in its own exception before it propagates it back to the calling thread. In such cases, the property of the exception that is caught by the , , or method contains one or more instances, not the original exceptions that caused the fault. To avoid having to iterate over nested exceptions, you can use the method to remove all the nested exceptions, so that the property of the returned object contains the original exceptions.
+
+ This method recursively flattens all instances of exceptions that are inner exceptions of the current instance. The inner exceptions returned in the new are the union of all the inner exceptions from exception tree rooted at the current instance.
+
+
+
+## Examples
+ In the following example, nested instances are flattened and handled in just one loop.
+
:::code language="csharp" source="~/snippets/csharp/System/AggregateException/Flatten/flatten2.cs" id="Snippet22":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_Misc/tpl_exceptions/fs/flatten2.fs" id="Snippet22":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Misc/tpl_exceptions/vb/flatten2.vb" id="Snippet22":::
-
- You can also use the method to rethrow the inner exceptions from multiple instances thrown by multiple tasks in a single instance, as the following example shows.
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Misc/tpl_exceptions/vb/flatten2.vb" id="Snippet22":::
+
+ You can also use the method to rethrow the inner exceptions from multiple instances thrown by multiple tasks in a single instance, as the following example shows.
+
:::code language="csharp" source="~/snippets/csharp/System/AggregateException/Flatten/taskexceptions2.cs" id="Snippet13":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_Misc/tpl_exceptions/fs/taskexceptions2.fs" id="Snippet13":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Misc/tpl_exceptions/vb/taskexceptions2.vb" id="Snippet13":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Misc/tpl_exceptions/vb/taskexceptions2.vb" id="Snippet13":::
+
]]>
Exception Handling (Task Parallel Library)
@@ -731,11 +731,11 @@
The contextual information about the source or destination.
Initializes a new instance of the class with serialized data.
-
The argument is null.
@@ -785,24 +785,24 @@
The predicate to execute for each exception. The predicate accepts as an argument the to be processed and returns a Boolean to indicate whether the exception was handled.
Invokes a handler on each contained by this .
- was handled. After all invocations, if any exceptions went unhandled, all unhandled exceptions will be put into a new which will be thrown. Otherwise, the method simply returns. If any invocations of the `predicate` throws an exception, it will halt the processing of any more exceptions and immediately propagate the thrown exception as-is.
-
-## Examples
- Ordinarily, an exception handler that catches an exception uses a `foreach` loop (in C#) or `For Each` loop (in Visual Basic) to handle each exception in its collection. Instead, the following example uses the method to handle each exception, and only rethrows exceptions that are not `CustomException` instances.
-
+
+## Examples
+ Ordinarily, an exception handler that catches an exception uses a `foreach` loop (in C#) or `For Each` loop (in Visual Basic) to handle each exception in its collection. Instead, the following example uses the method to handle each exception, and only rethrows exceptions that are not `CustomException` instances.
+
:::code language="csharp" source="~/snippets/csharp/System/AggregateException/Handle/handlemethod2.cs" id="Snippet16":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_Misc/tpl_exceptions/fs/handlemethod2.fs" id="Snippet16":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Misc/tpl_exceptions/vb/handlemethod2.vb" id="Snippet16":::
-
- The following is a more complete example that uses the method to provide special handling for an when enumerating files.
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Misc/tpl_exceptions/vb/handlemethod2.vb" id="Snippet16":::
+
+ The following is a more complete example that uses the method to provide special handling for an when enumerating files.
+
:::code language="csharp" source="~/snippets/csharp/System/AggregateException/Handle/taskexceptions.cs" id="Snippet12":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_Misc/tpl_exceptions/fs/taskexceptions.fs" id="Snippet12":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Misc/tpl_exceptions/vb/taskexceptions.vb" id="Snippet12":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_Misc/tpl_exceptions/vb/taskexceptions.vb" id="Snippet12":::
+
]]>
The argument is null.
diff --git a/xml/System/AppDomain.xml b/xml/System/AppDomain.xml
index 2feadd467c7..39fcc80adf5 100644
--- a/xml/System/AppDomain.xml
+++ b/xml/System/AppDomain.xml
@@ -913,9 +913,9 @@ Application domains, which are represented by objects, h
is an abstract class.
- -or-
+-or-
- This member was invoked with a late-binding mechanism.
+This member was invoked with a late-binding mechanism.
The caller cannot provide activation attributes for an object that does not inherit from .
is an empty string ("").
@@ -993,9 +993,9 @@ Application domains, which are represented by objects, h
is an abstract class.
- -or-
+-or-
- This member was invoked with a late-binding mechanism.
+This member was invoked with a late-binding mechanism.
The caller cannot provide activation attributes for an object that does not inherit from .
is the empty string ("").
@@ -1304,9 +1304,9 @@ This method overload uses the information from the
is .
The application domain is .
- -or-
+-or-
- The property is not set on the object that is supplied for .
+The property is not set on the object that is supplied for .
@@ -1542,9 +1542,9 @@ This method overload uses the information from the
is not a valid assembly.
- -or-
+-or-
- Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
+Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
An assembly or module was loaded twice with two different evidences.
was not found.
@@ -1621,9 +1621,7 @@ This method overload uses the information from the
The display name of the assembly. See .
The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the property.
- An array of one or more attributes that can participate in activation. Typically, an array that contains a single object that specifies the URL that is required to activate a remote object.
-
- This parameter is related to client-activated objects.Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
+ An array of one or more attributes that can participate in activation. Typically, an array that contains a single object that specifies the URL that is required to activate a remote object. This parameter is related to client-activated objects.Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
Creates a new instance of the specified type defined in the specified assembly. A parameter specifies an array of activation attributes.
An object that is a wrapper for the new instance specified by . The return value needs to be unwrapped to access the real object.
@@ -1644,9 +1642,9 @@ This method overload uses the information from the
is not a valid assembly.
- -or-
+-or-
- Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
+Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
An assembly or module was loaded twice with two different evidences.
was not found.
@@ -1737,9 +1735,7 @@ This method overload uses the information from the
An object that enables the binding, coercion of argument types, invocation of members, and retrieval of objects using reflection. If is null, the default binder is used.
The arguments to pass to the constructor. This array of arguments must match in number, order, and type the parameters of the constructor to invoke. If the parameterless constructor is preferred, must be an empty array or null.
Culture-specific information that governs the coercion of to the formal types declared for the constructor. If is , the for the current thread is used.
- An array of one or more attributes that can participate in activation. Typically, an array that contains a single object that specifies the URL that is required to activate a remote object.
-
- This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
+ An array of one or more attributes that can participate in activation. Typically, an array that contains a single object that specifies the URL that is required to activate a remote object. This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
Creates a new instance of the specified type defined in the specified assembly. Parameters specify a binder, binding flags, constructor arguments, culture-specific information used to interpret arguments, and optional activation attributes.
An object that is a wrapper for the new instance specified by . The return value needs to be unwrapped to access the real object.
@@ -1758,9 +1754,9 @@ This method overload uses the information from the
is not a valid assembly.
- -or-
+-or-
- was compiled with a later version of the common language runtime than the version that is currently loaded.
+ was compiled with a later version of the common language runtime than the version that is currently loaded.
An assembly or module was loaded twice with two different evidences.
was not found.
@@ -1839,9 +1835,7 @@ This method overload uses the information from the
An object that enables the binding, coercion of argument types, invocation of members, and retrieval of objects using reflection. If is null, the default binder is used.
The arguments to pass to the constructor. This array of arguments must match in number, order, and type the parameters of the constructor to invoke. If the parameterless constructor is preferred, must be an empty array or null.
Culture-specific information that governs the coercion of to the formal types declared for the constructor. If is , the for the current thread is used.
- An array of one or more attributes that can participate in activation. Typically, an array that contains a single object that specifies the URL that is required to activate a remote object.
-
- This parameter is related to client-activated objects.Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
+ An array of one or more attributes that can participate in activation. Typically, an array that contains a single object that specifies the URL that is required to activate a remote object. This parameter is related to client-activated objects.Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
Information used to authorize creation of .
Creates a new instance of the specified type defined in the specified assembly. Parameters specify a binder, binding flags, constructor arguments, culture-specific information used to interpret arguments, activation attributes, and authorization to create the type.
An object that is a wrapper for the new instance specified by . The return value needs to be unwrapped to access the real object.
@@ -1861,9 +1855,9 @@ This method overload uses the information from the
is not a valid assembly.
- -or-
+-or-
- Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
+Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
An assembly or module was loaded twice with two different evidences.
was not found.
@@ -1871,9 +1865,9 @@ This method overload uses the information from the
No matching constructor was found.
The caller cannot provide activation attributes for an object that does not inherit from .
- -or-
+-or-
- is not . When legacy CAS policy is not enabled, should be
+ is not . When legacy CAS policy is not enabled, should be
was not found in .
This instance is .
@@ -1981,9 +1975,9 @@ This method overload uses the information from the
is not a valid assembly.
- -or-
+-or-
- Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
+Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
An assembly or module was loaded twice with two different evidences.
@@ -2047,9 +2041,7 @@ This method overload uses the information from the
The display name of the assembly. See .
The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the property.
- An array of one or more attributes that can participate in activation. Typically, an array that contains a single object that specifies the URL that is required to activate a remote object.
-
- This parameter is related to client-activated objects.Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
+ An array of one or more attributes that can participate in activation. Typically, an array that contains a single object that specifies the URL that is required to activate a remote object. This parameter is related to client-activated objects.Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
Creates a new instance of the specified type. Parameters specify the assembly where the type is defined, the name of the type, and an array of activation attributes.
An instance of the object specified by .
@@ -2086,9 +2078,9 @@ This method overload uses the information from the
is not a valid assembly.
- -or-
+-or-
- Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
+Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
An assembly or module was loaded twice with two different evidences.
@@ -2171,9 +2163,7 @@ This method overload uses the information from the
An object that enables the binding, coercion of argument types, invocation of members, and retrieval of objects using reflection. If is null, the default binder is used.
The arguments to pass to the constructor. This array of arguments must match in number, order, and type the parameters of the constructor to invoke. If the parameterless constructor is preferred, must be an empty array or null.
A culture-specific object used to govern the coercion of types. If is , the for the current thread is used.
- An array of one or more attributes that can participate in activation. Typically, an array that contains a single object. that specifies the URL that is required to activate a remote object.
-
- This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
+ An array of one or more attributes that can participate in activation. Typically, an array that contains a single object. that specifies the URL that is required to activate a remote object. This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
Creates a new instance of the specified type defined in the specified assembly, specifying whether the case of the type name is ignored; the binding attributes and the binder that are used to select the type to be created; the arguments of the constructor; the culture; and the activation attributes.
An instance of the object specified by .
@@ -2212,9 +2202,9 @@ This method overload uses the information from the
is not a valid assembly.
- -or-
+-or-
- was compiled with a later version of the common language runtime than the version that is currently loaded.
+ was compiled with a later version of the common language runtime than the version that is currently loaded.
An assembly or module was loaded twice with two different evidences.
@@ -2279,9 +2269,7 @@ This method overload uses the information from the
An object that enables the binding, coercion of argument types, invocation of members, and retrieval of objects using reflection. If is null, the default binder is used.
The arguments to pass to the constructor. This array of arguments must match in number, order, and type the parameters of the constructor to invoke. If the parameterless constructor is preferred, must be an empty array or null.
A culture-specific object used to govern the coercion of types. If is , the for the current thread is used.
- An array of one or more attributes that can participate in activation. Typically, an array that contains a single object that specifies the URL that is required to activate a remote object.
-
- This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
+ An array of one or more attributes that can participate in activation. Typically, an array that contains a single object that specifies the URL that is required to activate a remote object. This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
Information used to authorize creation of .
Creates a new instance of the specified type. Parameters specify the name of the type, and how it is found and created.
An instance of the object specified by .
@@ -2321,9 +2309,9 @@ This method overload uses the information from the
is not a valid assembly.
- -or-
+-or-
- Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
+Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
An assembly or module was loaded twice with two different evidences.
@@ -2441,9 +2429,9 @@ This method overload uses the information from the
is .
- -or-
+-or-
- is .
+ is .
was not found.
@@ -2454,9 +2442,9 @@ This method overload uses the information from the
is not a valid assembly.
- -or-
+-or-
- Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
+Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
An assembly or module was loaded twice with two different evidences.
This instance is .
@@ -2527,9 +2515,7 @@ This method overload uses the information from the
The name, including the path, of a file that contains an assembly that defines the requested type. The assembly is loaded using the method.
The fully qualified name of the requested type, including the namespace but not the assembly, as returned by the property.
- An array of one or more attributes that can participate in activation. Typically, an array that contains a single object that specifies the URL that is required to activate a remote object.
-
- This parameter is related to client-activated objects.Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
+ An array of one or more attributes that can participate in activation. Typically, an array that contains a single object that specifies the URL that is required to activate a remote object. This parameter is related to client-activated objects.Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
Creates a new instance of the specified type defined in the specified assembly file.
An object that is a wrapper for the new instance, or if is not found. The return value needs to be unwrapped to access the real object.
@@ -2561,9 +2547,9 @@ This method overload uses the information from the
is not a valid assembly.
- -or-
+-or-
- Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
+Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
An assembly or module was loaded twice with two different evidences.
This instance is .
@@ -2647,9 +2633,7 @@ This method overload uses the information from the
An object that enables the binding, coercion of argument types, invocation of members, and retrieval of objects through reflection. If is null, the default binder is used.
The arguments to pass to the constructor. This array of arguments must match in number, order, and type the parameters of the constructor to invoke. If the parameterless constructor is preferred, must be an empty array or null.
Culture-specific information that governs the coercion of to the formal types declared for the constructor. If is , the for the current thread is used.
- An array of one or more attributes that can participate in activation. Typically, an array that contains a single object that specifies the URL that is required to activate a remote object.
-
- This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
+ An array of one or more attributes that can participate in activation. Typically, an array that contains a single object that specifies the URL that is required to activate a remote object. This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
Creates a new instance of the specified type defined in the specified assembly file.
An object that is a wrapper for the new instance, or if is not found. The return value needs to be unwrapped to access the real object.
@@ -2669,9 +2653,9 @@ This method overload uses the information from the
is .
- -or-
+-or-
- is .
+ is .
The caller cannot provide activation attributes for an object that does not inherit from .
The operation is attempted on an unloaded application domain.
@@ -2683,9 +2667,9 @@ This method overload uses the information from the
is not a valid assembly.
- -or-
+-or-
- was compiled with a later version of the common language runtime than the version that is currently loaded.
+ was compiled with a later version of the common language runtime than the version that is currently loaded.
An assembly or module was loaded twice with two different evidences.
This instance is .
@@ -2757,9 +2741,7 @@ This method overload uses the information from the
An object that enables the binding, coercion of argument types, invocation of members, and retrieval of objects through reflection. If is null, the default binder is used.
The arguments to pass to the constructor. This array of arguments must match in number, order, and type the parameters of the constructor to invoke. If the parameterless constructor is preferred, must be an empty array or null.
Culture-specific information that governs the coercion of to the formal types declared for the constructor. If is , the for the current thread is used.
- An array of one or more attributes that can participate in activation. Typically, an array that contains a single object that specifies the URL that is required to activate a remote object.
-
- This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
+ An array of one or more attributes that can participate in activation. Typically, an array that contains a single object that specifies the URL that is required to activate a remote object. This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
Information used to authorize creation of .
Creates a new instance of the specified type defined in the specified assembly file.
An object that is a wrapper for the new instance, or if is not found. The return value needs to be unwrapped to access the real object.
@@ -2780,14 +2762,14 @@ This method overload uses the information from the
is .
- -or-
+-or-
- is .
+ is .
The caller cannot provide activation attributes for an object that does not inherit from .
- -or-
+-or-
- is not . When legacy CAS policy is not enabled, should be .
+ is not . When legacy CAS policy is not enabled, should be .
The operation is attempted on an unloaded application domain.
was not found.
@@ -2798,9 +2780,9 @@ This method overload uses the information from the
is not a valid assembly.
- -or-
+-or-
- Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
+Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
An assembly or module was loaded twice with two different evidences.
This instance is .
@@ -2888,9 +2870,9 @@ This method overload uses the information from the
is .
- -or-
+-or-
- is .
+ is .
The operation is attempted on an unloaded application domain.
was not found.
@@ -2901,9 +2883,9 @@ This method overload uses the information from the
is not a valid assembly.
- -or-
+-or-
- Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
+Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
An assembly or module was loaded twice with two different evidences.
@@ -2973,9 +2955,7 @@ This method overload uses the information from the
To be added.
The file name and path of the assembly that defines the requested type.
The fully qualified name of the requested type, including the namespace but not the assembly (see the property).
- An array of one or more attributes that can participate in activation. Typically, an array that contains a single object that specifies the URL that is required to activate a remote object.
-
- This parameter is related to client-activated objects.Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
+ An array of one or more attributes that can participate in activation. Typically, an array that contains a single object that specifies the URL that is required to activate a remote object. This parameter is related to client-activated objects.Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
Creates a new instance of the specified type defined in the specified assembly file.
The requested object, or if is not found.
@@ -2991,9 +2971,9 @@ This method overload uses the information from the
is .
- -or-
+-or-
- is .
+ is .
The caller cannot provide activation attributes for an object that does not inherit from .
The operation is attempted on an unloaded application domain.
@@ -3005,9 +2985,9 @@ This method overload uses the information from the
is not a valid assembly.
- -or-
+-or-
- Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
+Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
An assembly or module was loaded twice with two different evidences.
@@ -3090,9 +3070,7 @@ This method overload uses the information from the
An object that enables the binding, coercion of argument types, invocation of members, and retrieval of objects through reflection. If is null, the default binder is used.
The arguments to pass to the constructor. This array of arguments must match in number, order, and type the parameters of the constructor to invoke. If the parameterless constructor is preferred, must be an empty array or null.
Culture-specific information that governs the coercion of to the formal types declared for the constructor. If is , the for the current thread is used.
- An array of one or more attributes that can participate in activation. Typically, an array that contains a single object that specifies the URL that is required to activate a remote object.
-
- This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
+ An array of one or more attributes that can participate in activation. Typically, an array that contains a single object that specifies the URL that is required to activate a remote object. This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
Creates a new instance of the specified type defined in the specified assembly file, specifying whether the case of the type name is ignored; the binding attributes and the binder that are used to select the type to be created; the arguments of the constructor; the culture; and the activation attributes.
The requested object, or if is not found.
@@ -3108,9 +3086,9 @@ This method overload uses the information from the
is .
- -or-
+-or-
- is .
+ is .
The caller cannot provide activation attributes for an object that does not inherit from .
The operation is attempted on an unloaded application domain.
@@ -3122,9 +3100,9 @@ This method overload uses the information from the
is not a valid assembly.
- -or-
+-or-
- was compiled with a later version of the common language runtime that the version that is currently loaded.
+ was compiled with a later version of the common language runtime that the version that is currently loaded.
An assembly or module was loaded twice with two different evidences.
@@ -3189,9 +3167,7 @@ This method overload uses the information from the
An object that enables the binding, coercion of argument types, invocation of members, and retrieval of objects through reflection. If is null, the default binder is used.
The arguments to pass to the constructor. This array of arguments must match in number, order, and type the parameters of the constructor to invoke. If the parameterless constructor is preferred, must be an empty array or null.
Culture-specific information that governs the coercion of to the formal types declared for the constructor. If is , the for the current thread is used.
- An array of one or more attributes that can participate in activation. Typically, an array that contains a single object that specifies the URL that is required to activate a remote object.
-
- This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
+ An array of one or more attributes that can participate in activation. Typically, an array that contains a single object that specifies the URL that is required to activate a remote object. This parameter is related to client-activated objects. Client activation is a legacy technology that is retained for backward compatibility but is not recommended for new development. Distributed applications should instead use Windows Communication Foundation.
Information used to authorize creation of .
Creates a new instance of the specified type defined in the specified assembly file.
The requested object, or if is not found.
@@ -3208,9 +3184,9 @@ This method overload uses the information from the
is .
- -or-
+-or-
- is .
+ is .
The caller cannot provide activation attributes for an object that does not inherit from .
The operation is attempted on an unloaded application domain.
@@ -3222,9 +3198,9 @@ This method overload uses the information from the
is not a valid assembly.
- -or-
+-or-
- Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
+Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
An assembly or module was loaded twice with two different evidences.
@@ -3368,9 +3344,9 @@ This method overload uses the information from the
is .
The property of is .
- -or-
+-or-
- The property of begins with white space, or contains a forward or backward slash.
+The property of begins with white space, or contains a forward or backward slash.
The operation is attempted on an unloaded application domain.
@@ -3449,9 +3425,9 @@ This method overload uses the information from the
is .
The property of is .
- -or-
+-or-
- The property of starts with white space, or contains a forward or backward slash.
+The property of starts with white space, or contains a forward or backward slash.
The operation is attempted on an unloaded application domain.
@@ -3488,8 +3464,8 @@ This method overload uses the information from the
- [System.Obsolete("Assembly level declarative security is obsolete and is no longer enforced by the CLR by default. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
- [<System.Obsolete("Assembly level declarative security is obsolete and is no longer enforced by the CLR by default. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")>]
+ [System.Obsolete("Assembly level declarative security is obsolete and is no longer enforced by the CLR by default. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
+ [<System.Obsolete("Assembly level declarative security is obsolete and is no longer enforced by the CLR by default. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")>]
[System.Security.SecuritySafeCritical]
@@ -3547,9 +3523,9 @@ This method overload uses the information from the
is .
The property of is .
- -or-
+-or-
- The property of begins with white space, or contains a forward or backward slash.
+The property of begins with white space, or contains a forward or backward slash.
The operation is attempted on an unloaded application domain.
@@ -3630,9 +3606,9 @@ This method overload uses the information from the
is .
The property of is .
- -or-
+-or-
- The property of begins with white space, or contains a forward or backward slash.
+The property of begins with white space, or contains a forward or backward slash.
The operation is attempted on an unloaded application domain.
@@ -3694,9 +3670,9 @@ This method overload uses the information from the
is .
The property of is .
- -or-
+-or-
- The property of starts with white space, or contains a forward or backward slash.
+The property of starts with white space, or contains a forward or backward slash.
The operation is attempted on an unloaded application domain.
The value of was not one of the enumeration values.
@@ -3792,9 +3768,9 @@ This method overload uses the information from the
is .
The property of is .
- -or-
+-or-
- The property of begins with white space, or contains a forward or backward slash.
+The property of begins with white space, or contains a forward or backward slash.
The operation is attempted on an unloaded application domain.
@@ -3830,8 +3806,8 @@ This method overload uses the information from the
- [System.Obsolete("Assembly level declarative security is obsolete and is no longer enforced by the CLR by default. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
- [<System.Obsolete("Assembly level declarative security is obsolete and is no longer enforced by the CLR by default. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")>]
+ [System.Obsolete("Assembly level declarative security is obsolete and is no longer enforced by the CLR by default. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")]
+ [<System.Obsolete("Assembly level declarative security is obsolete and is no longer enforced by the CLR by default. See http://go.microsoft.com/fwlink/?LinkID=155570 for more information.")>]
[System.Security.SecuritySafeCritical]
@@ -3889,9 +3865,9 @@ This method overload uses the information from the
is .
The property of is .
- -or-
+-or-
- The property of begins with white space, or contains a forward or backward slash.
+The property of begins with white space, or contains a forward or backward slash.
The operation is attempted on an unloaded application domain.
@@ -3956,9 +3932,9 @@ This method overload uses the information from the
is .
The property of is .
- -or-
+-or-
- The property of starts with white space, or contains a forward or backward slash.
+The property of starts with white space, or contains a forward or backward slash.
The operation is attempted on an unloaded application domain.
@@ -4060,9 +4036,9 @@ This method overload uses the information from the
is .
The property of is .
- -or-
+-or-
- The property of begins with white space, or contains a forward or backward slash.
+The property of begins with white space, or contains a forward or backward slash.
The operation is attempted on an unloaded application domain.
@@ -4159,9 +4135,9 @@ This method overload uses the information from the
is .
The property of is .
- -or-
+-or-
- The property of begins with white space, or contains a forward or backward slash.
+The property of begins with white space, or contains a forward or backward slash.
The operation is attempted on an unloaded application domain.
@@ -4197,8 +4173,8 @@ This method overload uses the information from the
- [System.Obsolete("Assembly level declarative security is obsolete and is no longer enforced by the CLR by default. Please see http://go.microsoft.com/fwlink/?LinkId=155570 for more information.")]
- [<System.Obsolete("Assembly level declarative security is obsolete and is no longer enforced by the CLR by default. Please see http://go.microsoft.com/fwlink/?LinkId=155570 for more information.")>]
+ [System.Obsolete("Assembly level declarative security is obsolete and is no longer enforced by the CLR by default. Please see http://go.microsoft.com/fwlink/?LinkId=155570 for more information.")]
+ [<System.Obsolete("Assembly level declarative security is obsolete and is no longer enforced by the CLR by default. Please see http://go.microsoft.com/fwlink/?LinkId=155570 for more information.")>]
[System.Security.SecuritySafeCritical]
@@ -4264,9 +4240,9 @@ This method overload uses the information from the
is .
The property of is .
- -or-
+-or-
- The property of begins with white space, or contains a forward or backward slash.
+The property of begins with white space, or contains a forward or backward slash.
The operation is attempted on an unloaded application domain.
@@ -4372,9 +4348,9 @@ This method overload uses the information from the
is .
The property of is .
- -or-
+-or-
- The property of begins with white space, or contains a forward or backward slash.
+The property of begins with white space, or contains a forward or backward slash.
The operation is attempted on an unloaded application domain.
@@ -4467,9 +4443,9 @@ This method overload uses the information from the
is .
The property of is .
- -or-
+-or-
- The property of starts with white space, or contains a forward or backward slash.
+The property of starts with white space, or contains a forward or backward slash.
The operation is attempted on an unloaded application domain.
@@ -4913,9 +4889,9 @@ This method overload uses the information from the
is not a valid assembly.
- -or-
+-or-
- Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
+Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
The operation is attempted on an unloaded application domain.
An assembly or module was loaded twice with two different evidences.
The specified assembly has no entry point.
@@ -5006,9 +4982,9 @@ This method overload uses the information from the
is not a valid assembly.
- -or-
+-or-
- Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
+Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
The operation is attempted on an unloaded application domain.
An assembly or module was loaded twice with two different evidences.
The specified assembly has no entry point.
@@ -5104,9 +5080,9 @@ This method overload uses the information from the
is not a valid assembly.
- -or-
+-or-
- was compiled with a later version of the common language runtime than the version that is currently loaded.
+ was compiled with a later version of the common language runtime than the version that is currently loaded.
The operation is attempted on an unloaded application domain.
An assembly or module was loaded twice with two different evidences.
The specified assembly has no entry point.
@@ -5199,9 +5175,9 @@ This method overload uses the information from the
is not a valid assembly.
- -or-
+-or-
- Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
+Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
The operation is attempted on an unloaded application domain.
An assembly or module was loaded twice with two different evidences.
@@ -5314,9 +5290,9 @@ This method overload uses the information from the
is not a valid assembly.
- -or-
+-or-
- was compiled with a later version of the common language runtime than the version that is currently loaded.
+ was compiled with a later version of the common language runtime than the version that is currently loaded.
The operation is attempted on an unloaded application domain.
An assembly or module was loaded twice with two different evidences.
The specified assembly has no entry point.
@@ -5407,9 +5383,9 @@ This method overload uses the information from the
is not a valid assembly.
- -or-
+-or-
- Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
+Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
The operation is attempted on an unloaded application domain.
An assembly or module was loaded twice with two different evidences.
@@ -5494,9 +5470,9 @@ This method overload uses the information from the
The assembly specified by is not found.
The assembly specified by is not a valid assembly.
- -or-
+-or-
- Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
+Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
The operation is attempted on an unloaded application domain.
The assembly specified by was found, but could not be loaded.
The specified assembly has no entry point.
@@ -5581,9 +5557,9 @@ This method overload uses the information from the
The assembly specified by was found, but could not be loaded.
The assembly specified by is not a valid assembly.
- -or-
+-or-
- was compiled with a later version of the common language runtime than the version that is currently loaded.
+ was compiled with a later version of the common language runtime than the version that is currently loaded.
The operation is attempted on an unloaded application domain.
The specified assembly has no entry point.
@@ -5658,9 +5634,9 @@ This method overload uses the information from the
The assembly specified by was found, but could not be loaded.
The assembly specified by is not a valid assembly.
- -or-
+-or-
- Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
+Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
The operation is attempted on an unloaded application domain.
The specified assembly has no entry point.
@@ -5745,9 +5721,9 @@ This method overload uses the information from the
The assembly specified by was found, but could not be loaded.
The assembly specified by is not a valid assembly.
- -or-
+-or-
- was compiled with a later version of the common language runtime than the version that is currently loaded.
+ was compiled with a later version of the common language runtime than the version that is currently loaded.
The operation is attempted on an unloaded application domain.
The specified assembly has no entry point.
@@ -5829,9 +5805,9 @@ This method overload uses the information from the
The assembly specified by was found, but could not be loaded.
The assembly specified by is not a valid assembly.
- -or-
+-or-
- Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
+Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
The operation is attempted on an unloaded application domain.
is not . When legacy CAS policy is not enabled, should be .
@@ -5918,9 +5894,9 @@ This method overload uses the information from the
The assembly specified by was found, but could not be loaded.
The assembly specified by is not a valid assembly.
- -or-
+-or-
- Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
+Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
The operation is attempted on an unloaded application domain.
is not . When legacy CAS policy is not enabled, should be .
@@ -6190,8 +6166,8 @@ This method overload uses the information from the
- [System.Obsolete("AppDomain.GetCurrentThreadId has been deprecated because it does not provide a stable Id when managed threads are running on fibers (aka lightweight threads). To get a stable identifier for a managed thread, use the ManagedThreadId property on Thread. https://go.microsoft.com/fwlink/?linkid=14202", false)]
- [<System.Obsolete("AppDomain.GetCurrentThreadId has been deprecated because it does not provide a stable Id when managed threads are running on fibers (aka lightweight threads). To get a stable identifier for a managed thread, use the ManagedThreadId property on Thread. https://go.microsoft.com/fwlink/?linkid=14202", false)>]
+ [System.Obsolete("AppDomain.GetCurrentThreadId has been deprecated because it does not provide a stable Id when managed threads are running on fibers (aka lightweight threads). To get a stable identifier for a managed thread, use the ManagedThreadId property on Thread. https://go.microsoft.com/fwlink/?linkid=14202", false)]
+ [<System.Obsolete("AppDomain.GetCurrentThreadId has been deprecated because it does not provide a stable Id when managed threads are running on fibers (aka lightweight threads). To get a stable identifier for a managed thread, use the ManagedThreadId property on Thread. https://go.microsoft.com/fwlink/?linkid=14202", false)>]
[System.Obsolete("AppDomain.GetCurrentThreadId has been deprecated because it does not provide a stable Id when managed threads are running on fibers (aka lightweight threads). To get a stable identifier for a managed thread, use the ManagedThreadId property on Thread.")]
@@ -6202,8 +6178,8 @@ This method overload uses the information from the
[<System.Obsolete("AppDomain.GetCurrentThreadId has been deprecated because it does not provide a stable Id when managed threads are running on fibers (aka lightweight threads). To get a stable identifier for a managed thread, use the ManagedThreadId property on Thread instead.")>]
- [System.Obsolete("AppDomain.GetCurrentThreadId has been deprecated because it does not provide a stable Id when managed threads are running on fibers (aka lightweight threads). To get a stable identifier for a managed thread, use the ManagedThreadId property on Thread. http://go.microsoft.com/fwlink/?linkid=14202", false)]
- [<System.Obsolete("AppDomain.GetCurrentThreadId has been deprecated because it does not provide a stable Id when managed threads are running on fibers (aka lightweight threads). To get a stable identifier for a managed thread, use the ManagedThreadId property on Thread. http://go.microsoft.com/fwlink/?linkid=14202", false)>]
+ [System.Obsolete("AppDomain.GetCurrentThreadId has been deprecated because it does not provide a stable Id when managed threads are running on fibers (aka lightweight threads). To get a stable identifier for a managed thread, use the ManagedThreadId property on Thread. http://go.microsoft.com/fwlink/?linkid=14202", false)]
+ [<System.Obsolete("AppDomain.GetCurrentThreadId has been deprecated because it does not provide a stable Id when managed threads are running on fibers (aka lightweight threads). To get a stable identifier for a managed thread, use the ManagedThreadId property on Thread. http://go.microsoft.com/fwlink/?linkid=14202", false)>]
[System.Obsolete("AppDomain.GetCurrentThreadId has been deprecated because it does not provide a stable Id when managed threads are running on fibers (aka lightweight threads). To get a stable identifier for a managed thread, use the ManagedThreadId property on Thread.'")]
@@ -6895,9 +6871,9 @@ This method overload uses the information from the
is not a valid assembly.
- -or-
+-or-
- Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
+Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
The operation is attempted on an unloaded application domain.
An assembly or module was loaded twice with two different evidences.
@@ -6988,9 +6964,9 @@ This method overload uses the information from the
is not a valid assembly.
- -or-
+-or-
- Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
+Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
The operation is attempted on an unloaded application domain.
An assembly or module was loaded twice with two different evidences.
@@ -7067,9 +7043,9 @@ This method overload uses the information from the
is not a valid assembly.
- -or-
+-or-
- Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
+Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
The operation is attempted on an unloaded application domain.
An assembly or module was loaded twice with two different evidences.
@@ -7172,9 +7148,9 @@ This method overload uses the information from the
is not a valid assembly.
- -or-
+-or-
- Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
+Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
The operation is attempted on an unloaded application domain.
An assembly or module was loaded twice with two different evidences.
@@ -7252,9 +7228,9 @@ This method overload uses the information from the
is not a valid assembly.
- -or-
+-or-
- Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
+Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
The operation is attempted on an unloaded application domain.
An assembly or module was loaded twice with two different evidences.
@@ -7332,9 +7308,9 @@ This method overload uses the information from the
is not a valid assembly.
- -or-
+-or-
- Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
+Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
The operation is attempted on an unloaded application domain.
An assembly or module was loaded twice with two different evidences.
@@ -7426,9 +7402,9 @@ This method overload uses the information from the
is not a valid assembly.
- -or-
+-or-
- Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
+Version 2.0 or later of the common language runtime is currently loaded and was compiled with a later version.
The operation is attempted on an unloaded application domain.
An assembly or module was loaded twice with two different evidences.
@@ -9581,8 +9557,7 @@ In .NET Framework version 1.0 and 1.1, if the thread that calls
is .
-
-.NET Core and .NET 5+ only: In all cases.
+ .NET Core and .NET 5+ only: In all cases.
-or-
diff --git a/xml/System/AppDomainInitializer.xml b/xml/System/AppDomainInitializer.xml
index 6a95cf02500..2a380e48328 100644
--- a/xml/System/AppDomainInitializer.xml
+++ b/xml/System/AppDomainInitializer.xml
@@ -34,11 +34,11 @@
An array of strings to pass as arguments to the callback method.
Represents the callback method to invoke when the application domain is initialized.
- delegate to specify the callback method to invoke when an instance of the class is initialized.
-
+ delegate to specify the callback method to invoke when an instance of the class is initialized.
+
]]>
diff --git a/xml/System/AppDomainManager.xml b/xml/System/AppDomainManager.xml
index 0a9bec79a11..ecc311a9803 100644
--- a/xml/System/AppDomainManager.xml
+++ b/xml/System/AppDomainManager.xml
@@ -28,38 +28,38 @@
Provides a managed equivalent of an unmanaged host.
- [!IMPORTANT]
-> Do not use to configure an application domain in ASP.NET. In ASP.NET, configuration must be handled by the host.
-
- Implementing the class enables a hosting application to participate in the creation of new application domains. To replace the default , identify the assembly and type of the replacement in the APPDOMAIN_MANAGER_ASM and APPDOMAIN_MANAGER_TYPE environment variables, or use the [\](/dotnet/framework/configure-apps/file-schema/runtime/appdomainmanagerassembly-element) and [\](/dotnet/framework/configure-apps/file-schema/runtime/appdomainmanagertype-element) elements in your configuration file. The assembly must be fully trusted and be contained in the global assembly cache or the directory of the starting application. The type and assembly names must be fully qualified in the environment variables. For example:
-
- `set APPDOMAIN_MANAGER_TYPE=MyNamespace.TestAppDomainManager`
-
- `set APPDOMAIN_MANAGER_ASM=customappDomainmanager, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f1368f7b12a08d72`
-
+> Do not use to configure an application domain in ASP.NET. In ASP.NET, configuration must be handled by the host.
+
+ Implementing the class enables a hosting application to participate in the creation of new application domains. To replace the default , identify the assembly and type of the replacement in the APPDOMAIN_MANAGER_ASM and APPDOMAIN_MANAGER_TYPE environment variables, or use the [\](/dotnet/framework/configure-apps/file-schema/runtime/appdomainmanagerassembly-element) and [\](/dotnet/framework/configure-apps/file-schema/runtime/appdomainmanagertype-element) elements in your configuration file. The assembly must be fully trusted and be contained in the global assembly cache or the directory of the starting application. The type and assembly names must be fully qualified in the environment variables. For example:
+
+ `set APPDOMAIN_MANAGER_TYPE=MyNamespace.TestAppDomainManager`
+
+ `set APPDOMAIN_MANAGER_ASM=customappDomainmanager, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f1368f7b12a08d72`
+
> [!IMPORTANT]
-> If the assembly that contains your subclass of depends on assemblies that are marked with the conditional (APTCA) attribute, you must include those assemblies in the list that you pass to the property of the you use to create application domains. Otherwise, the assemblies that are marked with the conditional APTCA attribute will be disabled.
-
- The is the managed equivalent of the unmanaged host. An object participates in the creation of new application domains in a process and can customize the new before other managed code runs. The can also supply host managers that participate in other aspects of common language runtime execution. For example, an can identify a object that participates in the security decisions of the application domain.
-
+> If the assembly that contains your subclass of depends on assemblies that are marked with the conditional (APTCA) attribute, you must include those assemblies in the list that you pass to the property of the you use to create application domains. Otherwise, the assemblies that are marked with the conditional APTCA attribute will be disabled.
+
+ The is the managed equivalent of the unmanaged host. An object participates in the creation of new application domains in a process and can customize the new before other managed code runs. The can also supply host managers that participate in other aspects of common language runtime execution. For example, an can identify a object that participates in the security decisions of the application domain.
+
> [!NOTE]
-> Only assemblies granted `FullTrust`, such as assemblies in the global assembly cache or identified as `fullTrustAssemblies` in the method can be loaded in the constructor and the method.
-
+> Only assemblies granted `FullTrust`, such as assemblies in the global assembly cache or identified as `fullTrustAssemblies` in the method can be loaded in the constructor and the method.
+
> [!NOTE]
-> This class contains a link demand and an inheritance demand at the class level. A is thrown when either the immediate caller or the derived class does not have infrastructure permission. For details about security demands, see [Link Demands](/dotnet/framework/misc/link-demands) and [Inheritance Demands](https://docs.microsoft.com/previous-versions/dotnet/netframework-4.0/x4yx82e6(v=vs.100)).
-
-
-
-## Examples
- The following example shows a very simple implementation of .
-
+> This class contains a link demand and an inheritance demand at the class level. A is thrown when either the immediate caller or the derived class does not have infrastructure permission. For details about security demands, see [Link Demands](/dotnet/framework/misc/link-demands) and [Inheritance Demands](https://docs.microsoft.com/previous-versions/dotnet/netframework-4.0/x4yx82e6(v=vs.100)).
+
+
+
+## Examples
+ The following example shows a very simple implementation of .
+
:::code language="csharp" source="~/snippets/csharp/System/AppDomainManager/Overview/customAppDomainManager.cs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.AppDomainManager/VB/customAppDomainManager.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.AppDomainManager/VB/customAppDomainManager.vb" id="Snippet1":::
+
]]>
The caller does not have the correct permissions. See the Requirements section.
@@ -82,13 +82,13 @@
Initializes a new instance of the class.
- [!NOTE]
-> Only assemblies granted `FullTrust`, such as assemblies in the global assembly cache or identified as `fullTrustAssemblies` in the method can be loaded in the constructor and the method.
-
+> Only assemblies granted `FullTrust`, such as assemblies in the global assembly cache or identified as `fullTrustAssemblies` in the method can be loaded in the constructor and the method.
+
]]>
@@ -114,11 +114,11 @@
Gets the application activator that handles the activation of add-ins and manifest-based applications for the domain.
The application activator.
- class in each to which all add-in and manifest-based application activation calls are routed. The for the current can provide its own custom , or an instance of the default is created.
-
+ class in each to which all add-in and manifest-based application activation calls are routed. The for the current can provide its own custom , or an instance of the default is created.
+
]]>
@@ -149,13 +149,13 @@
if the host allows the operation specified by to be performed in the application domain; otherwise, .
- method has been called to increase the isolated storage quota. An application that hosts the common language runtime (CLR) can override the method to perform policy decisions based on an object (which inherits ), and can then allow or prevent the increase. For example, a host could prompt the end user to approve or deny the request to increase the quota. The host's implementation of should take into account the possibility of denial-of-service attacks. For example, it should prompt the user only if the method is called from a user-initiated event such as a button click.
-
+ method has been called to increase the isolated storage quota. An application that hosts the common language runtime (CLR) can override the method to perform policy decisions based on an object (which inherits ), and can then allow or prevent the increase. For example, a host could prompt the end user to approve or deny the request to increase the quota. The host's implementation of should take into account the possibility of denial-of-service attacks. For example, it should prompt the user only if the method is called from a user-initiated event such as a button click.
+
]]>
@@ -195,17 +195,17 @@
Returns a new or existing application domain.
A new or existing application domain.
- property.
-
- The default method calls the protected method to create the . Overrides of this method do not need to call the method but can return an existing domain.
-
+ property.
+
+ The default method calls the protected method to create the . Overrides of this method do not need to call the method but can return an existing domain.
+
]]>
- When you inherit from the class and override the method, you can perform custom application domain initialization activities before calling the method, or not call the helper method at all. For example, you could modify the evidence passed in as , update the fields of the associated , or reuse an exiting domain.
+ When you inherit from the class and override the method, you can perform custom application domain initialization activities before calling the method, or not call the helper method at all. For example, you could modify the evidence passed in as , update the fields of the associated , or reuse an exiting domain.
@@ -244,13 +244,13 @@
Provides a helper method to create an application domain.
A newly created application domain.
- property.
-
+ property.
+
]]>
@@ -284,11 +284,11 @@
Gets the entry assembly for an application.
The entry assembly for the application.
- method.
-
+ method.
+
]]>
@@ -314,11 +314,11 @@
Gets the host execution context manager that manages the flow of the execution context.
The host execution context manager.
- that can participate in the flow of the execution context across asynchronous calls.
-
+ that can participate in the flow of the execution context across asynchronous calls.
+
]]>
@@ -344,19 +344,19 @@
Gets the host security manager that participates in security decisions for the application domain.
The host security manager.
- to participate in the security decisions for the application domain.
-
-
-
-## Examples
- The following example shows an override of the property for a custom application domain manager. This code example is part of a larger example provided for the class.
-
+ to participate in the security decisions for the application domain.
+
+
+
+## Examples
+ The following example shows an override of the property for a custom application domain manager. This code example is part of a larger example provided for the class.
+
:::code language="csharp" source="~/snippets/csharp/System/AppDomainManager/Overview/customAppDomainManager.cs" id="Snippet3":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.AppDomainManager/VB/customAppDomainManager.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.AppDomainManager/VB/customAppDomainManager.vb" id="Snippet3":::
+
]]>
@@ -414,30 +414,30 @@
An object that contains application domain initialization information.
Initializes the new application domain.
- [!IMPORTANT]
-> Do not use this method to initialize an application domain in ASP.NET. In ASP.NET, configuration must be handled by the host. If you use this method to initialize the application domain, the host throws when it attempts to initialize the application domain. The exception message indicates that initialization has already occurred.
-
- This method is called immediately after the constructor. The default implementation does nothing. A custom implementation can set up internal classes and delegates, set up an interface with the unmanaged host interface, or set up event handlers for the new .
-
- Also, for add-in activations, a custom implementation could identify the current as the target application domain.
-
- Beginning with the .NET Framework 4, you can use this method to sandbox the default application domain at application startup, or to modify the sandbox of a new application domain. To do this, adjust the and properties on the object that is assigned to the property of `appDomainInfo`, before you initialize the application domain.
-
+> Do not use this method to initialize an application domain in ASP.NET. In ASP.NET, configuration must be handled by the host. If you use this method to initialize the application domain, the host throws when it attempts to initialize the application domain. The exception message indicates that initialization has already occurred.
+
+ This method is called immediately after the constructor. The default implementation does nothing. A custom implementation can set up internal classes and delegates, set up an interface with the unmanaged host interface, or set up event handlers for the new .
+
+ Also, for add-in activations, a custom implementation could identify the current as the target application domain.
+
+ Beginning with the .NET Framework 4, you can use this method to sandbox the default application domain at application startup, or to modify the sandbox of a new application domain. To do this, adjust the and properties on the object that is assigned to the property of `appDomainInfo`, before you initialize the application domain.
+
> [!NOTE]
-> Only assemblies granted `FullTrust`, such as assemblies in the global assembly cache or identified as `fullTrustAssemblies` in the method can be loaded in the constructor and the method.
-
-
-
-## Examples
- The following example shows an override of the method for a custom application domain manager. This code example is part of a larger example provided for the class.
-
+> Only assemblies granted `FullTrust`, such as assemblies in the global assembly cache or identified as `fullTrustAssemblies` in the method can be loaded in the constructor and the method.
+
+
+
+## Examples
+ The following example shows an override of the method for a custom application domain manager. This code example is part of a larger example provided for the class.
+
:::code language="csharp" source="~/snippets/csharp/System/AppDomainManager/Overview/customAppDomainManager.cs" id="Snippet2":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.AppDomainManager/VB/customAppDomainManager.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.AppDomainManager/VB/customAppDomainManager.vb" id="Snippet2":::
+
]]>
diff --git a/xml/System/AppDomainManagerInitializationOptions.xml b/xml/System/AppDomainManagerInitializationOptions.xml
index 8fadbebe961..ccc105aa60d 100644
--- a/xml/System/AppDomainManagerInitializationOptions.xml
+++ b/xml/System/AppDomainManagerInitializationOptions.xml
@@ -27,11 +27,11 @@
Specifies the action that a custom application domain manager takes when initializing a new domain.
- class. The flags apply only to custom application domain managers; they do not apply to the default manager. The method in the default application domain manager does nothing. The default enumeration value is None.
-
+ class. The flags apply only to custom application domain managers; they do not apply to the default manager. The method in the default application domain manager does nothing. The default enumeration value is None.
+
]]>
diff --git a/xml/System/AppDomainSetup.xml b/xml/System/AppDomainSetup.xml
index 077a6380ce2..bb0c8d65d20 100644
--- a/xml/System/AppDomainSetup.xml
+++ b/xml/System/AppDomainSetup.xml
@@ -70,16 +70,16 @@
Represents assembly binding information that can be added to an instance of .
- instance does not affect any existing . It can affect only the creation of a new , when the method is called with the instance as a parameter.
-
- This class implements the interface.
-
+ instance does not affect any existing . It can affect only the creation of a new , when the method is called with the instance as a parameter.
+
+ This class implements the interface.
+
> [!CAUTION]
-> The default value for the property is false. This setting is unsafe for services. To help prevent services from downloading partially trusted code, set this property to true
-
+> The default value for the property is false. This setting is unsafe for services. To help prevent services from downloading partially trusted code, set this property to true
+
]]>
How To: Configure an Application Domain
@@ -154,11 +154,11 @@
The activation context to be used for an application domain.
Initializes a new instance of the class with the specified activation context to use for manifest-based activation of an application domain.
- object specified for `activationContext` is used to generate an object containing information required to activate a new application domain. This object can be accessed by using the property.
-
+ object specified for `activationContext` is used to generate an object containing information required to activate a new application domain. This object can be accessed by using the property.
+
]]>
@@ -201,11 +201,11 @@
An object that specifies information required for the manifest-based activation of a new application domain.
Initializes a new instance of the class with the specified activation arguments required for manifest-based activation of an application domain.
- property.
-
+ property.
+
]]>
@@ -245,13 +245,13 @@
Gets or sets data about the activation of an application domain.
An object that contains data about the activation of an application domain.
- object supports manifest-based activation.
-
+ object supports manifest-based activation.
+
]]>
The property is set to an object whose application identity does not match the application identity of the object returned by the property. No exception is thrown if the property is .
@@ -284,23 +284,23 @@
Gets or sets the delegate, which represents a callback method that is invoked when the application domain is initialized.
A delegate that represents a callback method that is invoked when the application domain is initialized.
- property. The array is passed to the callback method each time an is initialized.
-
- The callback method is executed in the context of the newly created application domain.
-
-
-
-## Examples
- The following example creates a child application domain named `ChildDomain`, using an object and evidence from the default application domain. The property is set to the callback method `AppDomainInit`, which is invoked when the child domain is initialized. The arguments for the callback method are placed in an array of strings, which is assigned to the property. When the child domain is created, the callback method simply prints the strings.
-
+ property. The array is passed to the callback method each time an is initialized.
+
+ The callback method is executed in the context of the newly created application domain.
+
+
+
+## Examples
+ The following example creates a child application domain named `ChildDomain`, using an object and evidence from the default application domain. The property is set to the callback method `AppDomainInit`, which is invoked when the child domain is initialized. The arguments for the callback method are placed in an array of strings, which is assigned to the property. When the child domain is created, the callback method simply prints the strings.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/AppDomainInitializer/cpp/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/AppDomainSetup/AppDomainInitializer/source.cs" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/System/AppDomainSetup/AppDomainInitializer/source.fs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/AppDomainInitializer/VB/source.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/AppDomainInitializer/VB/source.vb" id="Snippet1":::
+
]]>
@@ -334,23 +334,23 @@
Gets or sets the arguments passed to the callback method represented by the delegate. The callback method is invoked when the application domain is initialized.
An array of strings that is passed to the callback method represented by the delegate, when the callback method is invoked during initialization.
- property to specify a callback method that is invoked during initialization. If the property is not set, the array assigned to this property is not used.
-
- The callback method is executed in the context of the newly created application domain.
-
-
-
-## Examples
- The following code example creates a child application domain named `ChildDomain`, using an object and evidence from the default application domain. The property is set to the callback method `AppDomainInit`, which is invoked when the child domain is initialized. The arguments for the callback method are placed in an array of strings, which is assigned to the property. When the child domain is created, the callback method simply prints the strings.
-
+ property to specify a callback method that is invoked during initialization. If the property is not set, the array assigned to this property is not used.
+
+ The callback method is executed in the context of the newly created application domain.
+
+
+
+## Examples
+ The following code example creates a child application domain named `ChildDomain`, using an object and evidence from the default application domain. The property is set to the callback method `AppDomainInit`, which is invoked when the child domain is initialized. The arguments for the callback method are placed in an array of strings, which is assigned to the property. When the child domain is created, the callback method simply prints the strings.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/AppDomainInitializer/cpp/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/AppDomainSetup/AppDomainInitializer/source.cs" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/System/AppDomainSetup/AppDomainInitializer/source.fs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/AppDomainInitializer/VB/source.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/AppDomainInitializer/VB/source.vb" id="Snippet1":::
+
]]>
@@ -382,21 +382,21 @@
Gets or sets the display name of the assembly that provides the type of the application domain manager for application domains created using this object.
The display name of the assembly that provides the of the application domain manager.
- property. If either of these properties is not set, the other is ignored.
-
- If no type is provided, the application domain manager is created from the same type as the parent application domain (that is, the application domain from which the method is called).
-
- When the application domain is loaded, is thrown if the assembly does not exist, or if the assembly does not contain the type specified by the property. is thrown if the assembly is found but the version information does not match.
-
- To set the application domain manager for the default application domain, use the [\](/dotnet/framework/configure-apps/file-schema/runtime/appdomainmanagerassembly-element) and [\](/dotnet/framework/configure-apps/file-schema/runtime/appdomainmanagertype-element) elements in the [\](/dotnet/framework/configure-apps/file-schema/runtime/runtime-element) section of the application configuration file, or use the environment variables described in .
-
- This feature requires the application to have full trust. (For example, an application running on the desktop has full trust.) If the application does not have full trust, a is thrown.
-
- The format of the assembly display name is given by the property.
-
+ property. If either of these properties is not set, the other is ignored.
+
+ If no type is provided, the application domain manager is created from the same type as the parent application domain (that is, the application domain from which the method is called).
+
+ When the application domain is loaded, is thrown if the assembly does not exist, or if the assembly does not contain the type specified by the property. is thrown if the assembly is found but the version information does not match.
+
+ To set the application domain manager for the default application domain, use the [\](/dotnet/framework/configure-apps/file-schema/runtime/appdomainmanagerassembly-element) and [\](/dotnet/framework/configure-apps/file-schema/runtime/appdomainmanagertype-element) elements in the [\](/dotnet/framework/configure-apps/file-schema/runtime/runtime-element) section of the application configuration file, or use the environment variables described in .
+
+ This feature requires the application to have full trust. (For example, an application running on the desktop has full trust.) If the application does not have full trust, a is thrown.
+
+ The format of the assembly display name is given by the property.
+
]]>
@@ -426,21 +426,21 @@
Gets or sets the full name of the type that provides the application domain manager for application domains created using this object.
The full name of the type, including the namespace.
- property. If either of these properties is not set, the other is ignored.
-
- If no type is provided, the application domain manager is created from the same type as the parent application domain (that is, the application domain from which the method is called).
-
- When the application domain is loaded, is thrown if the assembly specified by the property does not contain the type specified by this property.
-
- To set the application domain manager for the default application domain, use the [\](/dotnet/framework/configure-apps/file-schema/runtime/appdomainmanagerassembly-element) and [\](/dotnet/framework/configure-apps/file-schema/runtime/appdomainmanagertype-element) elements in the [\](/dotnet/framework/configure-apps/file-schema/runtime/runtime-element) section of the application configuration file, or use the environment variables described in .
-
- This feature requires the application to have full trust. (For example, an application running on the desktop has full trust.) If the application does not have full trust, a is thrown.
-
- The format of the full name of a type is given by the property.
-
+ property. If either of these properties is not set, the other is ignored.
+
+ If no type is provided, the application domain manager is created from the same type as the parent application domain (that is, the application domain from which the method is called).
+
+ When the application domain is loaded, is thrown if the assembly specified by the property does not contain the type specified by this property.
+
+ To set the application domain manager for the default application domain, use the [\](/dotnet/framework/configure-apps/file-schema/runtime/appdomainmanagerassembly-element) and [\](/dotnet/framework/configure-apps/file-schema/runtime/appdomainmanagertype-element) elements in the [\](/dotnet/framework/configure-apps/file-schema/runtime/runtime-element) section of the application configuration file, or use the environment variables described in .
+
+ This feature requires the application to have full trust. (For example, an application running on the desktop has full trust.) If the application does not have full trust, a is thrown.
+
+ The format of the full name of a type is given by the property.
+
]]>
@@ -492,26 +492,26 @@
Gets the name of the directory containing the application.
The name of the application base directory.
- property can influence which permissions are granted to an application domain. For example, an application domain originating from the local computer normally receives full trust based on its location of origin. However, if the property of that is set to the full name of an intranet directory, the setting restricts the permissions granted to the application domain to a LocalIntranet grant even though the application domain actually originates from the local computer.
-
-
-
-## Examples
- The following example demonstrates how to use the property to set the location where the assembly loader begins probing for assemblies to load into a new application domain.
-
+ property can influence which permissions are granted to an application domain. For example, an application domain originating from the local computer normally receives full trust based on its location of origin. However, if the property of that is set to the full name of an intranet directory, the setting restricts the permissions granted to the application domain to a LocalIntranet grant even though the application domain actually originates from the local computer.
+
+
+
+## Examples
+ The following example demonstrates how to use the property to set the location where the assembly loader begins probing for assemblies to load into a new application domain.
+
> [!NOTE]
-> You must ensure that the folder you specify exists.
-
+> You must ensure that the folder you specify exists.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/ADApplicationBase/CPP/adapplicationbase.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/AppDomain/CurrentDomain/adapplicationbase.cs" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/System/AppDomain/CurrentDomain/adapplicationbase.fs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/ADApplicationBase/VB/adapplicationbase.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/ADApplicationBase/VB/adapplicationbase.vb" id="Snippet1":::
+
]]>
@@ -547,22 +547,22 @@
Gets or sets the name of the application.
The name of the application.
- property when you create a new application domain.
-
- The example creates a new application domain, and then calls the method to load the example assembly into the new application domain and create an instance of the `Worker` class. The `Worker` class inherits , so the example can use the proxy returned by to call the `TestLoad` method.
-
- The `TestLoad` method loads an assembly that you specify. You must either specify a valid, fully qualified assembly name, or comment out the method. The `TestLoad` method lists the assemblies that are loaded into the new application domain, showing that your specified assembly and the example assembly are loaded.
-
- The example uses the attribute to tell the assembly loader how the application will share code across application domains.
-
+ property when you create a new application domain.
+
+ The example creates a new application domain, and then calls the method to load the example assembly into the new application domain and create an instance of the `Worker` class. The `Worker` class inherits , so the example can use the proxy returned by to call the `TestLoad` method.
+
+ The `TestLoad` method loads an assembly that you specify. You must either specify a valid, fully qualified assembly name, or comment out the method. The `TestLoad` method lists the assemblies that are loaded into the new application domain, showing that your specified assembly and the example assembly are loaded.
+
+ The example uses the attribute to tell the assembly loader how the application will share code across application domains.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/ADMultiDomain/CPP/admultidomain.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/AppDomainSetup/ApplicationName/admultidomain.cs" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/System/AppDomainSetup/ApplicationName/admultidomain.fs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/ADMultiDomain/VB/admultidomain.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/ADMultiDomain/VB/admultidomain.vb" id="Snippet1":::
+
]]>
@@ -604,11 +604,11 @@
Gets or sets an object containing security and trust information.
An object that contains security and trust information.
- is created. Once changed, it cannot be reset to a null reference.
-
+ is created. Once changed, it cannot be reset to a null reference.
+
]]>
The property is set to an object whose application identity does not match the application identity of the object returned by the property. No exception is thrown if the property is .
@@ -652,13 +652,13 @@
Gets or sets the name of an area specific to the application where files are shadow copied.
The fully qualified name of the directory path and file name where files are shadow copied.
- property must also be set. If the property is not set, the property is ignored and the shadow copy cache location defaults to the download cache.
-
- For more information on shadow copying, see [Shadow Copying Assemblies](/dotnet/framework/app-domains/shadow-copy-assemblies).
-
+ property must also be set. If the property is not set, the property is ignored and the shadow copy cache location defaults to the download cache.
+
+ For more information on shadow copying, see [Shadow Copying Assemblies](/dotnet/framework/app-domains/shadow-copy-assemblies).
+
]]>
@@ -703,13 +703,13 @@
Gets or sets the name of the configuration file for an application domain.
The name of the configuration file.
-
Runtime Settings Schema
@@ -743,13 +743,13 @@
if probing is not allowed; otherwise, . The default is .
- property is `true`, the value of the property is ignored. That is, no assemblies are probed for in the directories specified by the property. In addition, the values of the property and the property are ignored. No assemblies are probed for in the directories specified by the property.
-
- The property provides an additional layer of control over the loading process. In the normal assembly loading sequence, the application base is probed before the event is raised. However, some applications might need to load assemblies from an OLE compound file within a document, or from a unique known location that is neither in the global assembly cache nor in the directories specified by the and properties. Such applications can use the property to avoid the delay caused by normal probing, and to avoid loading copies of the necessary assembly that might be located in the normal probing paths.
-
+ property is `true`, the value of the property is ignored. That is, no assemblies are probed for in the directories specified by the property. In addition, the values of the property and the property are ignored. No assemblies are probed for in the directories specified by the property.
+
+ The property provides an additional layer of control over the loading process. In the normal assembly loading sequence, the application base is probed before the event is raised. However, some applications might need to load assemblies from an OLE compound file within a document, or from a unique known location that is neither in the global assembly cache nor in the directories specified by the and properties. Such applications can use the property to avoid the delay caused by normal probing, and to avoid loading copies of the necessary assembly that might be located in the normal probing paths.
+
]]>
@@ -783,13 +783,13 @@
if redirection of assemblies is not allowed; if it is allowed.
- property is designed to be used by services and server applications where assembly binding redirection is not part of the application scenario.
-
+ property is designed to be used by services and server applications where assembly binding redirection is not part of the application scenario.
+
The value of this property is only considered when loading strong-named assemblies. Assemblies that do not have a strong-name will always have binding redirects applied.
-
+
]]>
@@ -823,14 +823,14 @@
if HTTP download of assemblies is not allowed; if it is allowed.
- property is designed to be used by services and server applications where downloading code from an intranet or the Internet is not part of the application scenario.
-
+ property is designed to be used by services and server applications where downloading code from an intranet or the Internet is not part of the application scenario.
+
> [!CAUTION]
-> The default value for the property is `false`. This setting is unsafe for services. To help prevent services from downloading partially trusted code, set this property to `true`.
-
+> The default value for the property is `false`. This setting is unsafe for services. To help prevent services from downloading partially trusted code, set this property to `true`.
+
]]>
@@ -864,13 +864,13 @@
if the section of the configuration file for an application domain is ignored; if the declared publisher policy is honored.
- property specifically applies to a Web application that is loaded locally. Use this property to help prevent a malicious attempt to execute an unsafe Web application in safe mode.
-
- For more information about bypassing publisher policy, see the [Redirecting Assembly Versions](/dotnet/framework/configure-apps/redirect-assembly-versions) topic. For more information about safe mode, see the "Examining the Configuration Files" section of the [How the Runtime Locates Assemblies](/dotnet/framework/deployment/how-the-runtime-locates-assemblies) topic.
-
+ property specifically applies to a Web application that is loaded locally. Use this property to help prevent a malicious attempt to execute an unsafe Web application in safe mode.
+
+ For more information about bypassing publisher policy, see the [Redirecting Assembly Versions](/dotnet/framework/configure-apps/redirect-assembly-versions) topic. For more information about safe mode, see the "Examining the Configuration Files" section of the [How the Runtime Locates Assemblies](/dotnet/framework/deployment/how-the-runtime-locates-assemblies) topic.
+
]]>
@@ -916,39 +916,39 @@
Gets or sets the base directory where the directory for dynamically generated files is located.
The directory where the is located. Note: The return value of this property is different from the value assigned.
- property. Dynamic assemblies that will be loaded and executed by the new application domain can be placed there.
+
+ When you assign a path to the property, an additional subdirectory is added; the name of this subdirectory is the hash code of the value assigned to the property. Thus, the base directory subsequently returned by this property is always different from the value assigned.
-## Remarks
- Use this property to set the base directory where the dynamic directory for the new application domain will be located. When code in the new application domain loads an assembly, assembly resolution looks first in the normal probing paths. If it does not find the assembly, it looks in the dynamic directory, which is returned by the property. Dynamic assemblies that will be loaded and executed by the new application domain can be placed there.
-
- When you assign a path to the property, an additional subdirectory is added; the name of this subdirectory is the hash code of the value assigned to the property. Thus, the base directory subsequently returned by this property is always different from the value assigned.
-
> [!IMPORTANT]
-> Assigning a value to this property does not create any directories. The directories must be created or verified by the code that uses them.
-
+> Assigning a value to this property does not create any directories. The directories must be created or verified by the code that uses them.
+
The dynamic directory is a subdirectory of . Its simple name is the value returned by the property, so its format is *original path*\\*hash code*\\*application name*.
-
-## Examples
- The following example demonstrates how to use the property to set the path an application domain probes when loading dynamic assemblies.
-
- The example creates an object and sets its property to "Example" and its property to "C:\DynamicAssemblyDir". The example then displays the property, to show that the hash code of the application name has been appended as a subdirectory of the path that was originally assigned.
-
+
+## Examples
+ The following example demonstrates how to use the property to set the path an application domain probes when loading dynamic assemblies.
+
+ The example creates an object and sets its property to "Example" and its property to "C:\DynamicAssemblyDir". The example then displays the property, to show that the hash code of the application name has been appended as a subdirectory of the path that was originally assigned.
+
> [!NOTE]
-> The base directory in this example is intended to be outside the probing path for the example application. Be sure to compile the example in a different location. Delete the base directory and all its subdirectories each time you run the example.
-
- The example creates a new application domain using the object. The example then creates the dynamic directory if it does not already exist. Although the example uses the application domain's property to get the name of the dynamic directory, it could just as easily create the directory beforehand by concatenating the original path, the hash code of the application name, and the application name.
-
- The example has a `GenerateDynamicAssembly` method that emits an assembly named `DynamicHelloWorld.dll` and stores it in the new application domain's dynamic directory. The dynamic assembly contains one type, `HelloWorld`, that has a static method (`Shared` method in Visual Basic) named `HelloFromAD`. Calling this method displays the name of the application domain.
-
- The `Example` class derives from , so the example can create an instance of the class in the new application domain and call its `Test` method. The `Test` method loads the dynamic assembly by its display name and calls the static `HelloFromAD` method.
-
- You can show that the dynamic directory is searched after the normal probing paths by writing code for an assembly named `DynamicHelloWorld.dll` and compiling it in the same directory as this example. The assembly must have a class named `HelloWorld` with a static method named `HelloFromAD`. This method does not have to have the same functionality as the one in the example; it can simply display a string to the console. The assembly must also have an attribute that sets its version to 1.0.0.0. When you run the example, the assembly you compiled in the current directory is found before the dynamic directory is searched.
-
+> The base directory in this example is intended to be outside the probing path for the example application. Be sure to compile the example in a different location. Delete the base directory and all its subdirectories each time you run the example.
+
+ The example creates a new application domain using the object. The example then creates the dynamic directory if it does not already exist. Although the example uses the application domain's property to get the name of the dynamic directory, it could just as easily create the directory beforehand by concatenating the original path, the hash code of the application name, and the application name.
+
+ The example has a `GenerateDynamicAssembly` method that emits an assembly named `DynamicHelloWorld.dll` and stores it in the new application domain's dynamic directory. The dynamic assembly contains one type, `HelloWorld`, that has a static method (`Shared` method in Visual Basic) named `HelloFromAD`. Calling this method displays the name of the application domain.
+
+ The `Example` class derives from , so the example can create an instance of the class in the new application domain and call its `Test` method. The `Test` method loads the dynamic assembly by its display name and calls the static `HelloFromAD` method.
+
+ You can show that the dynamic directory is searched after the normal probing paths by writing code for an assembly named `DynamicHelloWorld.dll` and compiling it in the same directory as this example. The assembly must have a class named `HelloWorld` with a static method named `HelloFromAD`. This method does not have to have the same functionality as the one in the example; it can simply display a string to the console. The assembly must also have an attribute that sets its version to 1.0.0.0. When you run the example, the assembly you compiled in the current directory is found before the dynamic directory is searched.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/ADDynamicBase/CPP/addynamicbase.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/AppDomain/DynamicDirectory/addynamicbase.cs" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/System/AppDomain/DynamicDirectory/addynamicbase.fs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/ADDynamicBase/VB/addynamicbase.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/ADDynamicBase/VB/addynamicbase.vb" id="Snippet1":::
+
]]>
This property cannot be set because the application name on the application domain is .
@@ -982,18 +982,18 @@
Returns the XML configuration information set by the method, which overrides the application's XML configuration information.
An array that contains the XML configuration information that was set by the method, or if the method has not been called.
- method provides a way to override the configuration information of an application that creates a new application domain. The configuration file information in `value` overrides the configuration file information for the application. For example, when the Example.exe application creates a new application domain, it can override the configuration information originally obtained from Example.exe.config file.
-
+ method provides a way to override the configuration information of an application that creates a new application domain. The configuration file information in `value` overrides the configuration file information for the application. For example, when the Example.exe application creates a new application domain, it can override the configuration information originally obtained from Example.exe.config file.
+
> [!IMPORTANT]
-> Some consumers of configuration file information do not use the information stored by the method. The runtime does not enforce this. To ensure that all configuration file information is overridden in a new application domain, use the property to specify a configuration file. The method does affect assembly binding.
-
- The XML in `value` is the same as the XML in a normal configuration file, except that it is stored as a array.
-
- To access the configuration bytes for an application domain, use the property to get the object for the application domain, then use the method.
-
+> Some consumers of configuration file information do not use the information stored by the method. The runtime does not enforce this. To ensure that all configuration file information is overridden in a new application domain, use the property to specify a configuration file. The method does affect assembly binding.
+
+ The XML in `value` is the same as the XML in a normal configuration file, except that it is stored as a array.
+
+ To access the configuration bytes for an application domain, use the property to get the object for the application domain, then use the method.
+
]]>
@@ -1065,16 +1065,16 @@
Specifies the optimization policy used to load an executable.
An enumerated constant that is used with the .
- property to set the optimization policy used to load the assembly into an application domain.
-
+ property to set the optimization policy used to load the assembly into an application domain.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/ADDyno/CPP/addyno.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/AppDomain/CreateInstanceAndUnwrap/addyno.cs" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/System/AppDomain/CreateInstanceAndUnwrap/addyno.fs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/ADDyno/VB/addyno.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/ADDyno/VB/addyno.vb" id="Snippet1":::
+
]]>
@@ -1104,19 +1104,19 @@
Gets or sets a list of assemblies marked with the flag that are made visible to partial-trust code running in a sandboxed application domain.
An array of partial assembly names, where each partial name consists of the simple assembly name and the public key.
- (APTCA) attribute can be made conditional by setting its property to . An APTCA assembly that is marked with cannot be used by partially trusted code unless the host application allows it.
-
- The host of a sandboxed application domain allows code in the application domain to use assemblies with conditional APTCA attributes by creating an array that contains the simple name and public key of each assembly, and assigning the array to this property. For example, an element of the array might look like the following: "MyAssembly, PublicKey=0024000004800000940000000602000000240000525341310004000001000100db2ad5e5fedc67ea526ff72ad426ef68e08e241d296c499eedfec6648dcc62b1a12f72be5833a45bbec481b68415b08a5fbc9f9ef247b523dd72bbea65bb532784ddc5c704544bd2f1c2d46fdbe41e4f949e76f9947357b2d5cf8ca9f970701bbd6e8ab64ad31b20ad0be9b56dae4f6b83332b92a2a3b8ea2804c40efbc0b6b9".
-
+ (APTCA) attribute can be made conditional by setting its property to . An APTCA assembly that is marked with cannot be used by partially trusted code unless the host application allows it.
+
+ The host of a sandboxed application domain allows code in the application domain to use assemblies with conditional APTCA attributes by creating an array that contains the simple name and public key of each assembly, and assigning the array to this property. For example, an element of the array might look like the following: "MyAssembly, PublicKey=0024000004800000940000000602000000240000525341310004000001000100db2ad5e5fedc67ea526ff72ad426ef68e08e241d296c499eedfec6648dcc62b1a12f72be5833a45bbec481b68415b08a5fbc9f9ef247b523dd72bbea65bb532784ddc5c704544bd2f1c2d46fdbe41e4f949e76f9947357b2d5cf8ca9f970701bbd6e8ab64ad31b20ad0be9b56dae4f6b83332b92a2a3b8ea2804c40efbc0b6b9".
+
> [!IMPORTANT]
-> If you are using a subclass of , and the assembly that defines it depends on assemblies that are marked with the conditional APTCA attribute, you must include those assemblies in the list that you pass to the property of the you use to create application domains. Otherwise the assemblies that are marked with the conditional APTCA attribute will be disabled.
-
+> If you are using a subclass of , and the assembly that defines it depends on assemblies that are marked with the conditional APTCA attribute, you must include those assemblies in the list that you pass to the property of the you use to create application domains. Otherwise the assemblies that are marked with the conditional APTCA attribute will be disabled.
+
> [!NOTE]
-> When you are debugging an application that is running in a sandboxed application domain, some messages can be misleading. For example, a message might state that one of your fully trusted assemblies has only limited permissions, when the real cause of the problem is that a security demand that exceeds the grant set of the sandboxed application domain has propagated to the boundary of the sandboxed application domain and failed.
-
+> When you are debugging an application that is running in a sandboxed application domain, some messages can be misleading. For example, a message might state that one of your fully trusted assemblies has only limited permissions, when the real cause of the problem is that a security demand that exceeds the grant set of the sandboxed application domain has propagated to the boundary of the sandboxed application domain and failed.
+
]]>
@@ -1161,11 +1161,11 @@
Gets or sets the list of directories under the application base directory that are probed for private assemblies.
A list of directory names separated by semicolons.
- are not under , they are ignored.
-
+ are not under , they are ignored.
+
]]>
@@ -1201,11 +1201,11 @@
Gets or sets a string value that includes or excludes from the search path for the application, and searches only .
A null reference ( in Visual Basic) to include the application base path when searching for assemblies; any non-null string value to exclude the path. The default value is .
- (""), to exclude the application directory path - that is, - from the search path for the application, and to search for assemblies only in .
-
+ (""), to exclude the application directory path - that is, - from the search path for the application, and to search for assemblies only in .
+
]]>
@@ -1237,13 +1237,13 @@
if interface caching is disabled for interop calls in application domains created with the current object; otherwise, .
-
@@ -1277,25 +1277,25 @@
An enumerable set of string values that specify compatibility switches, or to erase the existing compatibility switches.
Sets the specified switches, making the application domain compatible with previous versions of the .NET Framework for the specified issues.
- method to specify that one or more of these breaking changes should be rolled back for the application domain, to make the behavior compatible with the previous version of the .NET Framework.
-
- Each time you call this method, it replaces the existing switch settings. To erase the settings, specify `null` for the `switches` parameter.
-
- The set of string values you provide for `switches` can be a simple string array, because arrays implement the interface.
-
- The following table provides examples of compatibility switches that can be set to restore the behavior of earlier versions of the .NET Framework.
-
-|Switch|Meaning|
-|------------|-------------|
-|"NetFx40_LegacySecurityPolicy"|Code access security (CAS) for the .NET Framework 3.5 is enabled in this application domain. See [<NetFx40_LegacySecurityPolicy> Element](/dotnet/framework/configure-apps/file-schema/runtime/netfx40-legacysecuritypolicy-element).|
-|"NetFx40_Legacy20SortingBehavior"|String sorting defaults for the .NET Framework 3.5 are enabled in this application domain. Successfully restoring legacy sorting behavior also requires the sort00001000.dll dynamic link library to be available on the local system. See [<CompatSortNLSVersion> Element](/dotnet/framework/configure-apps/file-schema/runtime/compatsortnlsversion-element).|
-|"NetFx40_Legacy40SortingBehavior"|String sorting defaults for the .NET Framework 4 and Unicode 5.0 are enabled in this application domain. Successfully restoring legacy sorting behavior also requires the sort00060101.dll dynamic link library to be available on the local system.|
-|"NetFx40_TimeSpanLegacyFormatMode"| formatting behavior for the .NET Framework 3.5 is enabled in this application domain. See [<TimeSpan_LegacyFormatMode> Element](/dotnet/framework/configure-apps/file-schema/runtime/timespan-legacyformatmode-element) and the "Restoring Legacy TimeSpan Formatting" section of the topic.|
-|"UseRandomizedStringHashAlgorithm"|The runtime calculates hash codes for strings on a per application domain basis instead of using a single hashing algorithm that produces a consistent hash code across application domains. See [<UseRandomizedStringHashAlgorithm> Element](/dotnet/framework/configure-apps/file-schema/runtime/userandomizedstringhashalgorithm-element).|
-
+ method to specify that one or more of these breaking changes should be rolled back for the application domain, to make the behavior compatible with the previous version of the .NET Framework.
+
+ Each time you call this method, it replaces the existing switch settings. To erase the settings, specify `null` for the `switches` parameter.
+
+ The set of string values you provide for `switches` can be a simple string array, because arrays implement the interface.
+
+ The following table provides examples of compatibility switches that can be set to restore the behavior of earlier versions of the .NET Framework.
+
+|Switch|Meaning|
+|------------|-------------|
+|"NetFx40_LegacySecurityPolicy"|Code access security (CAS) for the .NET Framework 3.5 is enabled in this application domain. See [<NetFx40_LegacySecurityPolicy> Element](/dotnet/framework/configure-apps/file-schema/runtime/netfx40-legacysecuritypolicy-element).|
+|"NetFx40_Legacy20SortingBehavior"|String sorting defaults for the .NET Framework 3.5 are enabled in this application domain. Successfully restoring legacy sorting behavior also requires the sort00001000.dll dynamic link library to be available on the local system. See [<CompatSortNLSVersion> Element](/dotnet/framework/configure-apps/file-schema/runtime/compatsortnlsversion-element).|
+|"NetFx40_Legacy40SortingBehavior"|String sorting defaults for the .NET Framework 4 and Unicode 5.0 are enabled in this application domain. Successfully restoring legacy sorting behavior also requires the sort00060101.dll dynamic link library to be available on the local system.|
+|"NetFx40_TimeSpanLegacyFormatMode"| formatting behavior for the .NET Framework 3.5 is enabled in this application domain. See [<TimeSpan_LegacyFormatMode> Element](/dotnet/framework/configure-apps/file-schema/runtime/timespan-legacyformatmode-element) and the "Restoring Legacy TimeSpan Formatting" section of the topic.|
+|"UseRandomizedStringHashAlgorithm"|The runtime calculates hash codes for strings on a per application domain basis instead of using a single hashing algorithm that produces a consistent hash code across application domains. See [<UseRandomizedStringHashAlgorithm> Element](/dotnet/framework/configure-apps/file-schema/runtime/userandomizedstringhashalgorithm-element).|
+
]]>
@@ -1335,16 +1335,16 @@
An array that contains the XML configuration information to be used for the application domain.
Provides XML configuration information for the application domain, replacing the application's XML configuration information.
- method provides a way to replace the configuration information of an application that creates a new application domain. The configuration file information in `value` replaces the configuration file information for the application. For example, when the Example.exe application creates a new application domain, it can replace the configuration information originally obtained from the Example.exe.config file.
-
+ method provides a way to replace the configuration information of an application that creates a new application domain. The configuration file information in `value` replaces the configuration file information for the application. For example, when the Example.exe application creates a new application domain, it can replace the configuration information originally obtained from the Example.exe.config file.
+
> [!IMPORTANT]
-> Some consumers of configuration file information do not use the information stored by the method. The runtime does not enforce this. To ensure that all configuration file information is replaced in a new application domain, use the property to specify a configuration file. The method does affect assembly binding.
-
- The XML in `value` is the same as the XML in a normal configuration file, except that it is stored as a array.
-
+> Some consumers of configuration file information do not use the information stored by the method. The runtime does not enforce this. To ensure that all configuration file information is replaced in a new application domain, use the property to specify a configuration file. The method does affect assembly binding.
+
+ The XML in `value` is the same as the XML in a normal configuration file, except that it is stored as a array.
+
]]>
Runtime Settings Schema
@@ -1388,35 +1388,35 @@
A pointer to the function that overrides .
Provides the common language runtime with an alternate implementation of a string comparison function.
- method:
-
-- `IsNLSDefinedString`
-
-- `CompareStringEx`
-
-- `LCMapStringEx`
-
-- `FindNLSStringEx`
-
-- `CompareStringOrdinal`
-
-- `GetNLSVersion`
-
- For information about these functions, see [National Language Support Functions](https://go.microsoft.com/fwlink/?LinkId=228134).
-
+ method:
+
+- `IsNLSDefinedString`
+
+- `CompareStringEx`
+
+- `LCMapStringEx`
+
+- `FindNLSStringEx`
+
+- `CompareStringOrdinal`
+
+- `GetNLSVersion`
+
+ For information about these functions, see [National Language Support Functions](https://go.microsoft.com/fwlink/?LinkId=228134).
+
]]>
is .
- is not 1 or greater.
-
- -or-
-
- is .
+ is not 1 or greater.
+
+-or-
+
+ is .
@@ -1456,18 +1456,18 @@
Gets or sets the names of the directories containing assemblies to be shadow copied.
A list of directory names separated by semicolons.
- and properties. The property restricts the shadow copy to the assemblies in the directories specified by .
-
- If you don't assign a string to the property, or if you set this property to `null`, all assemblies in the directories specified by the and properties are shadow copied.
-
+ and properties. The property restricts the shadow copy to the assemblies in the directories specified by .
+
+ If you don't assign a string to the property, or if you set this property to `null`, all assemblies in the directories specified by the and properties are shadow copied.
+
> [!IMPORTANT]
-> Directory paths must not contain semicolons, because the semicolon is the delimiter character. There is no escape character for semicolons.
-
- When shadow copying is in effect, assembly files are copied to another location before the assemblies are loaded. The original assembly file is not locked, so it can be updated. For more information on shadow copying, see [Shadow Copying Assemblies](/dotnet/framework/app-domains/shadow-copy-assemblies).
-
+> Directory paths must not contain semicolons, because the semicolon is the delimiter character. There is no escape character for semicolons.
+
+ When shadow copying is in effect, assembly files are copied to another location before the assemblies are loaded. The original assembly file is not locked, so it can be updated. For more information on shadow copying, see [Shadow Copying Assemblies](/dotnet/framework/app-domains/shadow-copy-assemblies).
+
]]>
@@ -1506,11 +1506,11 @@
Gets or sets a string that indicates whether shadow copying is turned on or off.
The string value "true" to indicate that shadow copying is turned on; or "false" to indicate that shadow copying is turned off.
-
@@ -1554,13 +1554,13 @@
Gets (or, in .NET Framework, sets) a string that specifies the target framework in a format that can be parsed by the constructor.
The target framework of the executable that started the process.
- property is inferred from the attribute. In Visual Studio 2010 and later, this attribute is added to the assembly automatically based on the setting of the project's **Target Framework** property.
-
+ property is inferred from the attribute. In Visual Studio 2010 and later, this attribute is added to the assembly automatically based on the setting of the project's **Target Framework** property.
+
]]>
diff --git a/xml/System/AppDomainUnloadedException.xml b/xml/System/AppDomainUnloadedException.xml
index dacb8c49e5c..91b5e9a7ef9 100644
--- a/xml/System/AppDomainUnloadedException.xml
+++ b/xml/System/AppDomainUnloadedException.xml
@@ -66,45 +66,45 @@
The exception that is thrown when an attempt is made to access an unloaded application domain.
- that is not handled in user code has the following effect:
-
-- If a thread was started in managed code, it is terminated. The unhandled exception is not allowed to terminate the application.
-
-- If a task is executing on a thread, it is terminated and the thread is returned to the thread pool. The unhandled exception is not allowed to terminate the application.
-
-- If a thread started in unmanaged code, such as the main application thread, it is terminated. The unhandled exception is allowed to proceed, and the operating system terminates the application.
-
- uses the HRESULT COR_E_APPDOMAINUNLOADED, which has the value 0x80131014.
-
- For a list of initial property values for an instance of , see the constructors.
-
-
-
-## Examples
- This section contains two code examples. The first example demonstrates the effects of an on various threads, and the second shows elementary application domain unloading.
-
- Example 1
-
- The following code example defines a `TestClass` class that can be marshaled across application domain boundaries and an `Example` class containing a `static` (`Shared` in Visual Basic) `ThreadProc` method. The `ThreadProc` method creates an application domain, creates a `TestClass` object in the domain, and calls a method of `TestClass` that unloads the executing domain, causing an .
-
- The `TestClass` method is executed without exception handling from a thread and from an ordinary thread, demonstrating that the unhandled exception terminates the task or thread but not the application. It is then executed with and without exception handling from the main application thread, demonstrating that it terminates the application if not handled.
-
+ that is not handled in user code has the following effect:
+
+- If a thread was started in managed code, it is terminated. The unhandled exception is not allowed to terminate the application.
+
+- If a task is executing on a thread, it is terminated and the thread is returned to the thread pool. The unhandled exception is not allowed to terminate the application.
+
+- If a thread started in unmanaged code, such as the main application thread, it is terminated. The unhandled exception is allowed to proceed, and the operating system terminates the application.
+
+ uses the HRESULT COR_E_APPDOMAINUNLOADED, which has the value 0x80131014.
+
+ For a list of initial property values for an instance of , see the constructors.
+
+
+
+## Examples
+ This section contains two code examples. The first example demonstrates the effects of an on various threads, and the second shows elementary application domain unloading.
+
+ Example 1
+
+ The following code example defines a `TestClass` class that can be marshaled across application domain boundaries and an `Example` class containing a `static` (`Shared` in Visual Basic) `ThreadProc` method. The `ThreadProc` method creates an application domain, creates a `TestClass` object in the domain, and calls a method of `TestClass` that unloads the executing domain, causing an .
+
+ The `TestClass` method is executed without exception handling from a thread and from an ordinary thread, demonstrating that the unhandled exception terminates the task or thread but not the application. It is then executed with and without exception handling from the main application thread, demonstrating that it terminates the application if not handled.
+
:::code language="csharp" source="~/snippets/csharp/System/AppDomainUnloadedException/Overview/Sample.cs" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/System/AppDomainUnloadedException/Overview/Sample.fs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/AppDomainUnloadedException/vb/Sample.vb" id="Snippet1":::
-
- Example 2
-
- The following code example creates and unloads an application domain, and demonstrates that an is thrown on a subsequent attempt to access the unloaded domain.
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/AppDomainUnloadedException/vb/Sample.vb" id="Snippet1":::
+
+ Example 2
+
+ The following code example creates and unloads an application domain, and demonstrates that an is thrown on a subsequent attempt to access the unloaded domain.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/ADUnload/CPP/adunload.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/AppDomain/Unload/adunload.cs" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/System/AppDomain/Unload/adunload.fs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/ADUnload/VB/adunload.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/ADUnload/VB/adunload.vb" id="Snippet1":::
+
]]>
@@ -158,18 +158,18 @@
Initializes a new instance of the class.
- property of the new instance to a system-supplied message that describes the error, such as "The target application domain has been unloaded." This message takes into account the current system culture.
-
- The following table shows the initial property values for an instance of .
-
-|Property|Value|
-|--------------|-----------|
-||A null reference (`Nothing` in Visual Basic).|
-||The localized error message string.|
-
+ property of the new instance to a system-supplied message that describes the error, such as "The target application domain has been unloaded." This message takes into account the current system culture.
+
+ The following table shows the initial property values for an instance of .
+
+|Property|Value|
+|--------------|-----------|
+||A null reference (`Nothing` in Visual Basic).|
+||The localized error message string.|
+
]]>
@@ -215,18 +215,18 @@
The message that describes the error.
Initializes a new instance of the class with a specified error message.
- .
-
-|Property|Value|
-|--------------|-----------|
-||A null reference (`Nothing` in Visual Basic).|
-||The error message string.|
-
+ .
+
+|Property|Value|
+|--------------|-----------|
+||A null reference (`Nothing` in Visual Basic).|
+||The error message string.|
+
]]>
@@ -291,11 +291,11 @@
The contextual information about the source or destination.
Initializes a new instance of the class with serialized data.
-
XML and SOAP Serialization
@@ -344,20 +344,20 @@
The exception that is the cause of the current exception. If the parameter is not a null reference, the current exception is raised in a block that handles the inner exception.
Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception.
- property. The property returns the same value that is passed into the constructor, or a null reference if the property does not supply the inner exception value to the constructor.
-
- The following table shows the initial property values for an instance of .
-
-|Property|Value|
-|--------------|-----------|
-||The inner exception reference.|
-||The error message string.|
-
+ property. The property returns the same value that is passed into the constructor, or a null reference if the property does not supply the inner exception value to the constructor.
+
+ The following table shows the initial property values for an instance of .
+
+|Property|Value|
+|--------------|-----------|
+||The inner exception reference.|
+||The error message string.|
+
]]>
diff --git a/xml/System/ApplicationException.xml b/xml/System/ApplicationException.xml
index 3252f04a800..d51a0b3fd00 100644
--- a/xml/System/ApplicationException.xml
+++ b/xml/System/ApplicationException.xml
@@ -59,13 +59,13 @@
Serves as the base class for application-defined exceptions.
- [!IMPORTANT]
-> You should derive custom exceptions from the class rather than the class. You should not throw an exception in your code, and you should not catch an exception unless you intend to re-throw the original exception.
-
+> You should derive custom exceptions from the class rather than the class. You should not throw an exception in your code, and you should not catch an exception unless you intend to re-throw the original exception.
+
]]>
@@ -116,18 +116,18 @@
Initializes a new instance of the class.
- property of the new instance to a system-supplied message that describes the error, such as "An application error has occurred." This message takes into account the current system culture.
-
- The following table shows the initial property values for an instance of .
-
-|Property|Value|
-|--------------|-----------|
-||A null reference (`Nothing` in Visual Basic).|
-||The localized error message string.|
-
+ property of the new instance to a system-supplied message that describes the error, such as "An application error has occurred." This message takes into account the current system culture.
+
+ The following table shows the initial property values for an instance of .
+
+|Property|Value|
+|--------------|-----------|
+||A null reference (`Nothing` in Visual Basic).|
+||The localized error message string.|
+
]]>
@@ -170,20 +170,20 @@
A message that describes the error.
Initializes a new instance of the class with a specified error message.
- .
-
-|Property|Value|
-|--------------|-----------|
-||A null reference (`Nothing` in Visual Basic).|
-|`Message`|The error message string.|
-
+ .
+
+|Property|Value|
+|--------------|-----------|
+||A null reference (`Nothing` in Visual Basic).|
+|`Message`|The error message string.|
+
]]>
@@ -245,11 +245,11 @@
The contextual information about the source or destination.
Initializes a new instance of the class with serialized data.
-
XML and Soap Serialization
@@ -295,20 +295,20 @@
The exception that is the cause of the current exception. If the parameter is not a null reference, the current exception is raised in a block that handles the inner exception.
Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception.
- property. The property returns the same value that is passed into the constructor, or a null reference if the property does not supply the inner exception value to the constructor.
-
- The following table shows the initial property values for an instance of .
-
-|Property|Value|
-|--------------|-----------|
-||The inner exception reference.|
-||The error message string.|
-
+ property. The property returns the same value that is passed into the constructor, or a null reference if the property does not supply the inner exception value to the constructor.
+
+ The following table shows the initial property values for an instance of .
+
+|Property|Value|
+|--------------|-----------|
+||The inner exception reference.|
+||The error message string.|
+
]]>
diff --git a/xml/System/ApplicationId.xml b/xml/System/ApplicationId.xml
index bdf3f2707a0..355368ba27c 100644
--- a/xml/System/ApplicationId.xml
+++ b/xml/System/ApplicationId.xml
@@ -157,13 +157,13 @@
is .
- -or-
+-or-
- is .
+ is .
- -or-
+-or-
- is .
+ is .
is an empty string.
diff --git a/xml/System/ApplicationIdentity.xml b/xml/System/ApplicationIdentity.xml
index 26a386ce2ce..61a0f06fa58 100644
--- a/xml/System/ApplicationIdentity.xml
+++ b/xml/System/ApplicationIdentity.xml
@@ -43,19 +43,19 @@
Provides the ability to uniquely identify a manifest-activated application. This class cannot be inherited.
- class is used in the activation of manifest-based applications.
-
-
-
-## Examples
- The following code example demonstrates the use of an object to obtain the for a manifest-based application. This code example is part of a larger example provided for the class.
-
+ class is used in the activation of manifest-based applications.
+
+
+
+## Examples
+ The following code example demonstrates the use of an object to obtain the for a manifest-based application. This code example is part of a larger example provided for the class.
+
:::code language="csharp" source="~/snippets/csharp/System/ActivationContext/Overview/program.cs" id="Snippet2":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.ActivationContext/vb/program.vb" id="Snippet2":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.ActivationContext/vb/program.vb" id="Snippet2":::
+
]]>
@@ -97,65 +97,65 @@
The full name of the application.
Initializes a new instance of the class.
-
@@ -199,23 +199,23 @@ http://testserver/ActivationContext/ActivationContext.application
Gets the location of the deployment manifest as a URL.
The URL of the deployment manifest.
- property values for an application named ActivationContext:
-
-- `http://testserver/ActivationContext/ActivationContext.application`
-
-- `file://C:/UserFiles/UserName/SolutionName/ActivationContext/publish/ActivationContext.application`.
-
-
-
-## Examples
- The following code example demonstrates the use of an object to obtain the value of the property for a manifest-based application. This code example is part of a larger example provided for the class.
-
+ property values for an application named ActivationContext:
+
+- `http://testserver/ActivationContext/ActivationContext.application`
+
+- `file://C:/UserFiles/UserName/SolutionName/ActivationContext/publish/ActivationContext.application`.
+
+
+
+## Examples
+ The following code example demonstrates the use of an object to obtain the value of the property for a manifest-based application. This code example is part of a larger example provided for the class.
+
:::code language="csharp" source="~/snippets/csharp/System/ActivationContext/Overview/program.cs" id="Snippet3":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.ActivationContext/vb/program.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.ActivationContext/vb/program.vb" id="Snippet3":::
+
]]>
@@ -257,19 +257,19 @@ http://testserver/ActivationContext/ActivationContext.application
Gets the full name of the application.
The full name of the application, also known as the display name.
- property, see the constructor.
-
-
-
-## Examples
- The following code example demonstrates the use of an object to obtain the value of the property for a manifest-based application. This code example is part of a larger example provided for the class.
-
+ property, see the constructor.
+
+
+
+## Examples
+ The following code example demonstrates the use of an object to obtain the value of the property for a manifest-based application. This code example is part of a larger example provided for the class.
+
:::code language="csharp" source="~/snippets/csharp/System/ActivationContext/Overview/program.cs" id="Snippet3":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.ActivationContext/vb/program.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.ActivationContext/vb/program.vb" id="Snippet3":::
+
]]>
@@ -353,11 +353,11 @@ http://testserver/ActivationContext/ActivationContext.application
Returns the full name of the manifest-activated application.
The full name of the manifest-activated application.
- constructor.
-
+ constructor.
+
]]>
diff --git a/xml/System/ArgIterator.xml b/xml/System/ArgIterator.xml
index 0d27381d62b..26e2ac56552 100644
--- a/xml/System/ArgIterator.xml
+++ b/xml/System/ArgIterator.xml
@@ -40,13 +40,13 @@
Represents a variable-length argument list; that is, the parameters of a function that takes a variable number of arguments.
- structure to enumerate the mandatory and optional arguments in an argument list. The structure is not generally useful for applications other than compilers.
-
- The functionality in the structure is typically hidden in the syntax of a specific programming language. For example, in the C++ programming language you declare a variable-length argument list by specifying an ellipsis ("...") at the end of the argument list. The structure is useful primarily when a development language does not provide direct support for accessing variable-length parameters.
-
+ structure to enumerate the mandatory and optional arguments in an argument list. The structure is not generally useful for applications other than compilers.
+
+ The functionality in the structure is typically hidden in the syntax of a specific programming language. For example, in the C++ programming language you declare a variable-length argument list by specifying an ellipsis ("...") at the end of the argument list. The structure is useful primarily when a development language does not provide direct support for accessing variable-length parameters.
+
]]>
@@ -102,11 +102,11 @@
An argument list consisting of mandatory and optional arguments.
Initializes a new instance of the structure using the specified argument list.
- object enumerates the argument list starting from the first optional argument.
-
+ object enumerates the argument list starting from the first optional argument.
+
]]>
@@ -157,11 +157,11 @@
A pointer to the argument in to access first, or the first mandatory argument in if is .
Initializes a new instance of the structure using the specified argument list and a pointer to an item in the list.
- object enumerates the argument list starting from the argument specified by `ptr`, or the first mandatory argument if `ptr` is `null`.
-
+ object enumerates the argument list starting from the argument specified by `ptr`, or the first mandatory argument if `ptr` is `null`.
+
]]>
@@ -201,13 +201,13 @@
Concludes processing of the variable-length argument list represented by this instance.
- concludes the processing of a variable-length argument list. However, this method has no actual implementation; the method body is empty. You can use this method in your code as a marker to indicate where variable-length argument list processing logically ends.
-
- The method corresponds to the `va_end` method in the C standard library.
-
+ concludes the processing of a variable-length argument list. However, this method has no actual implementation; the method body is empty. You can use this method in your code as a marker to indicate where variable-length argument list processing logically ends.
+
+ The method corresponds to the `va_end` method in the C standard library.
+
]]>
@@ -355,11 +355,11 @@
Returns the next argument in a variable-length argument list.
The next argument as a object.
-
An attempt was made to read beyond the end of the list.
@@ -414,11 +414,11 @@
Returns the next argument in a variable-length argument list that has a specified type.
The next argument as a object.
-
An attempt was made to read beyond the end of the list.
@@ -467,13 +467,13 @@
Returns the type of the next argument.
The type of the next argument.
- returns the type of the argument as specified in the calling function. For example, if an argument is type , but the calling function specifies the argument as type , reports the argument as type .
-
+ returns the type of the argument as specified in the calling function. For example, if an argument is type , but the calling function specifies the argument as type , reports the argument as type .
+
]]>
diff --git a/xml/System/ArgumentException.xml b/xml/System/ArgumentException.xml
index c64c7f49dba..a5e14e6f186 100644
--- a/xml/System/ArgumentException.xml
+++ b/xml/System/ArgumentException.xml
@@ -76,36 +76,36 @@
The exception that is thrown when one of the arguments provided to a method is not valid.
- is thrown when a method is invoked and at least one of the passed arguments does not meet the parameter specification of the called method. The property identifies the invalid argument.
-
- Most commonly, an is thrown by the common language runtime or another class library and indicates developer error. If you throw an from your code, you should ensure that the exception's property includes a meaningful error message that describes the invalid argument and the expected range of values for the argument.
-
- The primary derived classes of are and . These derived classes should be used instead of , except in situations where neither of the derived classes is acceptable. For example, exceptions should be thrown by:
-
-- whenever `null` is passed to a method that does not accept it as a valid argument.
-
-- when the value of an argument is outside the range of acceptable values; for example, when the value "46" is passed as the month argument during the creation of a .
-
-If the method call does not have any argument or if the failure does not involve the arguments themselves, then should be used.
-
- uses the HRESULT COR_E_ARGUMENT, which has the value 0x80070057.
-
-For a list of initial property values for an instance of , see the constructors.
-
+ is thrown when a method is invoked and at least one of the passed arguments does not meet the parameter specification of the called method. The property identifies the invalid argument.
+
+ Most commonly, an is thrown by the common language runtime or another class library and indicates developer error. If you throw an from your code, you should ensure that the exception's property includes a meaningful error message that describes the invalid argument and the expected range of values for the argument.
+
+ The primary derived classes of are and . These derived classes should be used instead of , except in situations where neither of the derived classes is acceptable. For example, exceptions should be thrown by:
+
+- whenever `null` is passed to a method that does not accept it as a valid argument.
+
+- when the value of an argument is outside the range of acceptable values; for example, when the value "46" is passed as the month argument during the creation of a .
+
+If the method call does not have any argument or if the failure does not involve the arguments themselves, then should be used.
+
+ uses the HRESULT COR_E_ARGUMENT, which has the value 0x80070057.
+
+For a list of initial property values for an instance of , see the constructors.
+
In F#, you can use the [invalidArg](/dotnet/fsharp/language-reference/exception-handling/the-invalidarg-function) function to generate and raise an ArgumentException.
-
+
## Examples
-The following example demonstrates how to throw and catch an . It uses the [ArgumentException.GetType().Name](xref:System.Type.Name%2A) property to display the name of the exception object, and also uses the property to display the text of the exception message.
-
+The following example demonstrates how to throw and catch an . It uses the [ArgumentException.GetType().Name](xref:System.Type.Name%2A) property to display the name of the exception object, and also uses the property to display the text of the exception message.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/ArgumentException/cpp/argumentexception2.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System/ArgumentException/Overview/argumentexception2.cs" interactive="try-dotnet" id="Snippet3":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/ArgumentException/FS/argumentexception2.fs" id="Snippet3":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/ArgumentException/vb/program2.vb" id="Snippet3":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/ArgumentException/vb/program2.vb" id="Snippet3":::
+
]]>
@@ -162,18 +162,18 @@ The following example demonstrates how to throw and catch an
Initializes a new instance of the class.
- property of the new instance to a system-supplied message that describes the error, such as "An invalid argument was specified." This message takes into account the current system culture.
-
- The following table shows the initial property values for an instance of .
-
-|Property|Value|
-|--------------|-----------|
-||A null reference (`Nothing` in Visual Basic).|
-||The localized error message string.|
-
+ property of the new instance to a system-supplied message that describes the error, such as "An invalid argument was specified." This message takes into account the current system culture.
+
+ The following table shows the initial property values for an instance of .
+
+|Property|Value|
+|--------------|-----------|
+||A null reference (`Nothing` in Visual Basic).|
+||The localized error message string.|
+
]]>
@@ -220,18 +220,18 @@ The following example demonstrates how to throw and catch an The error message that explains the reason for the exception.
Initializes a new instance of the class with a specified error message.
- property of the new instance to a system-supplied message that describes the error, such as "An invalid argument was specified." This message takes into account the current system culture.
-
- The following table shows the initial property values for an instance of .
-
-|Property|Value|
-|--------------|-----------|
-||A null reference (`Nothing` in Visual Basic).|
-||The error message string.|
-
+ property of the new instance to a system-supplied message that describes the error, such as "An invalid argument was specified." This message takes into account the current system culture.
+
+ The following table shows the initial property values for an instance of .
+
+|Property|Value|
+|--------------|-----------|
+||A null reference (`Nothing` in Visual Basic).|
+||The error message string.|
+
]]>
@@ -293,11 +293,11 @@ The following example demonstrates how to throw and catch an The contextual information about the source or destination.
Initializes a new instance of the class with serialized data.
-
XML and SOAP Serialization
@@ -347,20 +347,20 @@ The following example demonstrates how to throw and catch an The exception that is the cause of the current exception. If the parameter is not a null reference, the current exception is raised in a block that handles the inner exception.
Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception.
- property of the new instance using the value of the `message` parameter. The content of the `message` parameter is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.
-
- An exception that is thrown as a direct result of a previous exception should include a reference to the previous exception in the property. The property returns the same value that is passed into the constructor, or `null` if the property does not supply the inner exception value to the constructor.
-
- The following table shows the initial property values for an instance of .
-
-|Property|Value|
-|--------------|-----------|
-||The inner exception reference.|
-||The localized error message string.|
-
+ property of the new instance using the value of the `message` parameter. The content of the `message` parameter is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.
+
+ An exception that is thrown as a direct result of a previous exception should include a reference to the previous exception in the property. The property returns the same value that is passed into the constructor, or `null` if the property does not supply the inner exception value to the constructor.
+
+ The following table shows the initial property values for an instance of .
+
+|Property|Value|
+|--------------|-----------|
+||The inner exception reference.|
+||The localized error message string.|
+
]]>
@@ -411,28 +411,28 @@ The following example demonstrates how to throw and catch an The name of the parameter that caused the current exception.
Initializes a new instance of the class with a specified error message and the name of the parameter that causes this exception.
- property of the new instance using the value of the `message` parameter. The content of the `message` parameter is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.
-
- This constructor initializes the property of the new instance using `paramName`. The content of `paramName` is intended to be understood by humans.
-
- The following table shows the initial property values for an instance of .
-
-|Property|Value|
-|--------------|-----------|
-||The error message string.|
-||The parameter name string.|
-
-
-
-## Examples
- The following code example demonstrates how to call the constructor. This code example is part of a larger example provided for the class.
-
+ property of the new instance using the value of the `message` parameter. The content of the `message` parameter is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.
+
+ This constructor initializes the property of the new instance using `paramName`. The content of `paramName` is intended to be understood by humans.
+
+ The following table shows the initial property values for an instance of .
+
+|Property|Value|
+|--------------|-----------|
+||The error message string.|
+||The parameter name string.|
+
+
+
+## Examples
+ The following code example demonstrates how to call the constructor. This code example is part of a larger example provided for the class.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/ArgumentException/cpp/ArgumentException.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System/ArgumentException/Overview/argumentexception.cs" id="Snippet2":::
- :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/ArgumentException/FS/argumentexception.fs" id="Snippet2":::
+ :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/ArgumentException/FS/argumentexception.fs" id="Snippet2":::
]]>
@@ -484,23 +484,23 @@ The following example demonstrates how to throw and catch an The exception that is the cause of the current exception. If the parameter is not a null reference, the current exception is raised in a block that handles the inner exception.
Initializes a new instance of the class with a specified error message, the parameter name, and a reference to the inner exception that is the cause of this exception.
- property of the new instance using the value of the `message` parameter. The content of the `message` parameter is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.
-
- This constructor initializes the property of the new instance using `paramName`. The content of `paramName` is intended to be understood by humans.
-
- An exception that is thrown as a direct result of a previous exception should include a reference to the previous exception in the property. The property returns the same value that is passed into the constructor, or `null` if the property does not supply the inner exception value to the constructor.
-
- The following table shows the initial property values for an instance of .
-
-|Property|Value|
-|--------------|-----------|
-||The inner exception reference.|
-||The localized error message string.|
-||The parameter name string.|
-
+ property of the new instance using the value of the `message` parameter. The content of the `message` parameter is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.
+
+ This constructor initializes the property of the new instance using `paramName`. The content of `paramName` is intended to be understood by humans.
+
+ An exception that is thrown as a direct result of a previous exception should include a reference to the previous exception in the property. The property returns the same value that is passed into the constructor, or `null` if the property does not supply the inner exception value to the constructor.
+
+ The following table shows the initial property values for an instance of .
+
+|Property|Value|
+|--------------|-----------|
+||The inner exception reference.|
+||The localized error message string.|
+||The parameter name string.|
+
]]>
@@ -570,13 +570,13 @@ The following example demonstrates how to throw and catch an The contextual information about the source or destination.
Sets the object with the parameter name and additional exception information.
- sets a with all the exception object data targeted for serialization. During deserialization, the exception object is reconstituted from the transmitted over the stream.
-
- For more information, see .
-
+ sets a with all the exception object data targeted for serialization. During deserialization, the exception object is reconstituted from the transmitted over the stream.
+
+ For more information, see .
+
]]>
The object is a null reference ( in Visual Basic).
@@ -633,27 +633,30 @@ The following example demonstrates how to throw and catch an
Gets the error message and the parameter name, or only the error message if no parameter name is set.
- A text string describing the details of the exception. The value of this property takes one of two forms:
-
- Condition
-
- Value
-
- - The is a null reference ( in Visual Basic) or of zero length.
-
- The string passed to the constructor.
-
-
- The is not null reference ( in Visual Basic) and it has a length greater than zero.
-
- The string appended with the name of the invalid parameter.
-
-
+ A text string describing the details of the exception. The value of this property takes one of two forms:
+
+ Condition
+
+
+ Value
+
+
+
+ -
+ The is a null reference ( in Visual Basic) or of zero length.
+ The string passed to the constructor.
+
+ -
+ The is not null reference ( in Visual Basic) and it has a length greater than zero.
+ The string appended with the name of the invalid parameter.
+
+
- . The error message should be localized.
-
+ . The error message should be localized.
+
]]>
@@ -700,15 +703,15 @@ The following example demonstrates how to throw and catch an Gets the name of the parameter that causes this exception.
The parameter name.
- should carry the name of the parameter that causes this exception.
-
- This property is read-only, and returns the same value as was passed into the constructor. Overriding methods should be used solely to customize the format of the parameter name.
-
- The parameter name should not be translated for localization purposes.
-
+ should carry the name of the parameter that causes this exception.
+
+ This property is read-only, and returns the same value as was passed into the constructor. Overriding methods should be used solely to customize the format of the parameter name.
+
+ The parameter name should not be translated for localization purposes.
+
]]>
diff --git a/xml/System/ArgumentNullException.xml b/xml/System/ArgumentNullException.xml
index 138ac620bd3..5b0813ed4bd 100644
--- a/xml/System/ArgumentNullException.xml
+++ b/xml/System/ArgumentNullException.xml
@@ -64,23 +64,23 @@
The exception that is thrown when a null reference ( in Visual Basic) is passed to a method that does not accept it as a valid argument.
- exception is thrown when a method is invoked and at least one of the passed arguments is `null` but should never be `null`.
-
- An exception is thrown at run time in the following two major circumstances, both of which reflect developer error:
-
-- An uninstantiated object is passed to a method. To prevent the error, instantiate the object.
-
-- An object returned from a method call is then passed as an argument to a second method, but the value of the original returned object is `null`. To prevent the error, check for a return value that is `null` and call the second method only if the return value is not `null`.
-
- behaves identically to . It is provided so that application code can differentiate between exceptions caused by `null` arguments and exceptions caused by arguments that are not null. For errors caused by arguments that are not null, see .
-
- uses the HRESULT E_POINTER, which has the value 0x80004003.
-
- For a list of initial property values for an instance of , see the constructors.
-
+ exception is thrown when a method is invoked and at least one of the passed arguments is `null` but should never be `null`.
+
+ An exception is thrown at run time in the following two major circumstances, both of which reflect developer error:
+
+- An uninstantiated object is passed to a method. To prevent the error, instantiate the object.
+
+- An object returned from a method call is then passed as an argument to a second method, but the value of the original returned object is `null`. To prevent the error, check for a return value that is `null` and call the second method only if the return value is not `null`.
+
+ behaves identically to . It is provided so that application code can differentiate between exceptions caused by `null` arguments and exceptions caused by arguments that are not null. For errors caused by arguments that are not null, see .
+
+ uses the HRESULT E_POINTER, which has the value 0x80004003.
+
+ For a list of initial property values for an instance of , see the constructors.
+
]]>
@@ -137,18 +137,18 @@
Initializes a new instance of the class.
- property of the new instance to a system-supplied message that describes the error, such as "Value cannot be null." This message takes into account the current system culture.
-
- The following table shows the initial property values for an instance of .
-
-|Property|Value|
-|--------------|-----------|
-||A null reference (`Nothing` in Visual Basic).|
-||A localized error message string, such as "Value cannot be null." for the English language.|
-
+ property of the new instance to a system-supplied message that describes the error, such as "Value cannot be null." This message takes into account the current system culture.
+
+ The following table shows the initial property values for an instance of .
+
+|Property|Value|
+|--------------|-----------|
+||A null reference (`Nothing` in Visual Basic).|
+||A localized error message string, such as "Value cannot be null." for the English language.|
+
]]>
@@ -195,21 +195,21 @@
The name of the parameter that caused the exception.
Initializes a new instance of the class with the name of the parameter that causes this exception.
- property of the new instance to a system-supplied message that describes the error and includes the parameter name. This message takes into account the current system culture.
-
- This constructor initializes the property of the new instance using the `paramName` parameter. The content of `paramName` is intended to be understood by humans.
-
- The following table shows the initial property values for an instance of .
-
-|Property|Value|
-|--------------|-----------|
-||A null reference (`Nothing` in Visual Basic).|
-||A localized error message string that identifies the null argument. For example, if the `paramName` argument is "arg1", the English language message string is:
On .NET 5+ and .NET Core: `Value cannot be null. (Parameter name: 'arg1')`
On .NET Framework: `Value cannot be null.\r\nParameter name: arg1`|
-||The parameter name string.|
-
+ property of the new instance to a system-supplied message that describes the error and includes the parameter name. This message takes into account the current system culture.
+
+ This constructor initializes the property of the new instance using the `paramName` parameter. The content of `paramName` is intended to be understood by humans.
+
+ The following table shows the initial property values for an instance of .
+
+|Property|Value|
+|--------------|-----------|
+||A null reference (`Nothing` in Visual Basic).|
+||A localized error message string that identifies the null argument. For example, if the `paramName` argument is "arg1", the English language message string is:
On .NET 5+ and .NET Core: `Value cannot be null. (Parameter name: 'arg1')`
On .NET Framework: `Value cannot be null.\r\nParameter name: arg1`|
+||The parameter name string.|
+
]]>
@@ -271,11 +271,11 @@
An object that describes the source or destination of the serialized data.
Initializes a new instance of the class with serialized data.
-
XML and SOAP Serialization
@@ -370,21 +370,21 @@
A message that describes the error.
Initializes an instance of the class with a specified error message and the name of the parameter that causes this exception.
- property of the new instance using the value of the `message` parameter. The content of the `message` parameter is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.
-
- This constructor initializes the property of the new instance using the `paramName` parameter. The content of `paramName` is intended to be understood by humans.
-
- The following table shows the initial property values for an instance of .
-
-|Property|Value|
-|--------------|-----------|
-||A null reference (`Nothing` in Visual Basic).|
-||The error message string.|
-||The parameter name string.|
-
+ property of the new instance using the value of the `message` parameter. The content of the `message` parameter is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.
+
+ This constructor initializes the property of the new instance using the `paramName` parameter. The content of `paramName` is intended to be understood by humans.
+
+ The following table shows the initial property values for an instance of .
+
+|Property|Value|
+|--------------|-----------|
+||A null reference (`Nothing` in Visual Basic).|
+||The error message string.|
+||The parameter name string.|
+
]]>
diff --git a/xml/System/ArgumentOutOfRangeException.xml b/xml/System/ArgumentOutOfRangeException.xml
index 225c394cca6..706ad245e0f 100644
--- a/xml/System/ArgumentOutOfRangeException.xml
+++ b/xml/System/ArgumentOutOfRangeException.xml
@@ -830,21 +830,24 @@ The following example defines a class to contain information about an invited gu
Gets the error message and the string representation of the invalid argument value, or only the error message if the argument value is null.
- The text message for this exception. The value of this property takes one of two forms, as follows.
-
- Condition
-
- Value
-
- - The is .
-
- The string passed to the constructor.
-
-
- The is not .
-
- The string appended with the string representation of the invalid argument value.
-
-
+ The text message for this exception. The value of this property takes one of two forms, as follows.
+
+ Condition
+
+
+ Value
+
+
+
+ -
+ The is .
+ The string passed to the constructor.
+
+ -
+ The is not .
+ The string appended with the string representation of the invalid argument value.
+
+
The exception that is thrown for errors in an arithmetic, casting, or conversion operation.
- is the base class for the following exceptions:
-
-- , which is thrown in integer division when the divisor is 0. For example, attempting to divide 10 by 0 throws a exception.
-
-- , which is thrown when an operation is performed on or returns , , , , , , and the programming language used does not support those values.
-
-- , which is thrown when the result of an operation is outside the bounds of the target data type. That is, it is less than a number's `MinValue` property or greater than its `MaxValue` property. For example, attempting to assign 200 + 200 to a value throws an exception, since 400 greater than 256, the upper bound of the data type.
-
- Your code should not handle or throw this exception. Instead, you should either handle or throw one of its derived classes, since it more precisely indicates the exact nature of the error.
-
- For a list of initial property values for an instance of , see the constructors.
-
- uses the HRESULT COR_E_ARITHMETIC, which has the value 0x80070216.
-
+ is the base class for the following exceptions:
+
+- , which is thrown in integer division when the divisor is 0. For example, attempting to divide 10 by 0 throws a exception.
+
+- , which is thrown when an operation is performed on or returns , , , , , , and the programming language used does not support those values.
+
+- , which is thrown when the result of an operation is outside the bounds of the target data type. That is, it is less than a number's `MinValue` property or greater than its `MaxValue` property. For example, attempting to assign 200 + 200 to a value throws an exception, since 400 greater than 256, the upper bound of the data type.
+
+ Your code should not handle or throw this exception. Instead, you should either handle or throw one of its derived classes, since it more precisely indicates the exact nature of the error.
+
+ For a list of initial property values for an instance of , see the constructors.
+
+ uses the HRESULT COR_E_ARITHMETIC, which has the value 0x80070216.
+
]]>
@@ -143,18 +143,18 @@
Initializes a new instance of the class.
- property of the new instance to a system-supplied message that describes the error, such as "The arithmetic operation is not allowed." This message takes into account the current system culture.
-
- The following table shows initial property values for an instance of .
-
-|Property|Value|
-|--------------|-----------|
-||`null`.|
-||The localized error message string.|
-
+ property of the new instance to a system-supplied message that describes the error, such as "The arithmetic operation is not allowed." This message takes into account the current system culture.
+
+ The following table shows initial property values for an instance of .
+
+|Property|Value|
+|--------------|-----------|
+||`null`.|
+||The localized error message string.|
+
]]>
@@ -201,18 +201,18 @@
A that describes the error.
Initializes a new instance of the class with a specified error message.
- .
-
-|Property|Value|
-|--------------|-----------|
-||The null reference (`Nothing` in Visual Basic).|
-||The error message string.|
-
+ .
+
+|Property|Value|
+|--------------|-----------|
+||The null reference (`Nothing` in Visual Basic).|
+||The error message string.|
+
]]>
@@ -274,11 +274,11 @@
The contextual information about the source or destination.
Initializes a new instance of the class with serialized data.
-
XML and SOAP Serialization
@@ -328,18 +328,18 @@
The exception that is the cause of the current exception. If the parameter is not a null reference, the current exception is raised in a block that handles the inner exception.
Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception.
- property. The property returns the same value that is passed into the constructor, or a null reference (`Nothing` in Visual Basic) if the property does not supply the inner exception value to the constructor.
-
- The following table shows initial property values for an instance of .
-
-|Property|Value|
-|--------------|-----------|
-||The inner exception reference.|
-||The error message string.|
-
+ property. The property returns the same value that is passed into the constructor, or a null reference (`Nothing` in Visual Basic) if the property does not supply the inner exception value to the constructor.
+
+ The following table shows initial property values for an instance of .
+
+|Property|Value|
+|--------------|-----------|
+||The inner exception reference.|
+||The error message string.|
+
]]>
diff --git a/xml/System/Array.xml b/xml/System/Array.xml
index e45a647cae0..691567b0aeb 100644
--- a/xml/System/Array.xml
+++ b/xml/System/Array.xml
@@ -143,11 +143,7 @@
]]>
- Public static ( in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
-
- This implementation does not provide a synchronized (thread safe) wrapper for an ; however, .NET classes based on provide their own synchronized version of the collection using the property.
-
- Enumerating through a collection is intrinsically not a thread-safe procedure. Even when a collection is synchronized, other threads can still modify the collection, which causes the enumerator to throw an exception. To guarantee thread safety during enumeration, you can either lock the collection during the entire enumeration or catch the exceptions resulting from changes made by other threads.
+ Public static ( in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe. This implementation does not provide a synchronized (thread safe) wrapper for an ; however, .NET classes based on provide their own synchronized version of the collection using the property. Enumerating through a collection is intrinsically not a thread-safe procedure. Even when a collection is synchronized, other threads can still modify the collection, which causes the enumerator to throw an exception. To guarantee thread safety during enumeration, you can either lock the collection during the entire enumeration or catch the exceptions resulting from changes made by other threads.
Performing Culture-Insensitive String Operations in Arrays
@@ -420,9 +416,9 @@
The object to search for.
The implementation to use when comparing elements.
- -or-
+-or-
- to use the implementation of each element.
+ to use the implementation of each element.
Searches an entire one-dimensional sorted array for a value using the specified interface.
The index of the specified in the specified , if is found; otherwise, a negative number. If is not found and is less than one or more elements in , the negative number returned is the bitwise complement of the index of the first element that is larger than . If is not found and is greater than all elements in , the negative number returned is the bitwise complement of (the index of the last element plus 1). If this method is called with a non-sorted , the return value can be incorrect and a negative number could be returned, even if is present in .
@@ -562,15 +558,15 @@
is less than the lower bound of .
- -or-
+-or-
- is less than zero.
+ is less than zero.
and do not specify a valid range in .
- -or-
+-or-
- is of a type that is not compatible with the elements of .
+ is of a type that is not compatible with the elements of .
does not implement the interface, and the search encounters an element that does not implement the interface.
@@ -651,9 +647,9 @@
The object to search for.
The implementation to use when comparing elements.
- -or-
+-or-
- to use the implementation of each element.
+ to use the implementation of each element.
Searches a range of elements in a one-dimensional sorted array for a value, using the specified interface.
The index of the specified in the specified , if is found; otherwise, a negative number. If is not found and is less than one or more elements in , the negative number returned is the bitwise complement of the index of the first element that is larger than . If is not found and is greater than all elements in , the negative number returned is the bitwise complement of (the index of the last element plus 1). If this method is called with a non-sorted , the return value can be incorrect and a negative number could be returned, even if is present in .
@@ -691,15 +687,15 @@
is less than the lower bound of .
- -or-
+-or-
- is less than zero.
+ is less than zero.
and do not specify a valid range in .
- -or-
+-or-
- is , and is of a type that is not compatible with the elements of .
+ is , and is of a type that is not compatible with the elements of .
is , does not implement the interface, and the search encounters an element that does not implement the interface.
@@ -888,9 +884,9 @@
The object to search for.
The implementation to use when comparing elements.
- -or-
+-or-
- to use the implementation of each element.
+ to use the implementation of each element.
Searches an entire one-dimensional sorted array for a value using the specified generic interface.
The index of the specified in the specified , if is found; otherwise, a negative number. If is not found and is less than one or more elements in , the negative number returned is the bitwise complement of the index of the first element that is larger than . If is not found and is greater than all elements in , the negative number returned is the bitwise complement of (the index of the last element plus 1). If this method is called with a non-sorted , the return value can be incorrect and a negative number could be returned, even if is present in .
@@ -1044,15 +1040,15 @@
is less than the lower bound of .
- -or-
+-or-
- is less than zero.
+ is less than zero.
and do not specify a valid range in .
- -or-
+-or-
- is of a type that is not compatible with the elements of .
+ is of a type that is not compatible with the elements of .
does not implement the generic interface.
@@ -1139,9 +1135,9 @@
The object to search for.
The implementation to use when comparing elements.
- -or-
+-or-
- to use the implementation of each element.
+ to use the implementation of each element.
Searches a range of elements in a one-dimensional sorted array for a value, using the specified generic interface.
The index of the specified in the specified , if is found; otherwise, a negative number. If is not found and is less than one or more elements in , the negative number returned is the bitwise complement of the index of the first element that is larger than . If is not found and is greater than all elements in , the negative number returned is the bitwise complement of (the index of the last element plus 1). If this method is called with a non-sorted , the return value can be incorrect and a negative number could be returned, even if is present in .
@@ -1174,15 +1170,15 @@
is less than the lower bound of .
- -or-
+-or-
- is less than zero.
+ is less than zero.
and do not specify a valid range in .
- -or-
+-or-
- is , and is of a type that is not compatible with the elements of .
+ is , and is of a type that is not compatible with the elements of .
is , and does not implement the generic interface.
@@ -1323,13 +1319,13 @@
is less than the lower bound of .
- -or-
+-or-
- is less than zero.
+ is less than zero.
- -or-
+-or-
- The sum of and is greater than the size of .
+The sum of and is greater than the size of .
@@ -1474,7 +1470,7 @@
The that receives the data.
A 32-bit integer that represents the index in the at which storing begins.
A 32-bit integer that represents the number of elements to copy.
- Copies a range of elements from an starting at the specified source index and pastes them to another starting at the specified destination index. Guarantees that all changes are undone if the copy does not succeed completely.
+ Copies a range of elements from an starting at the specified source index and pastes them to another starting at the specified destination index. Guarantees that all changes are undone if the copy does not succeed completely.
is .
- -or-
+-or-
- is .
+ is .
and have different ranks.
The type is neither the same as nor derived from the type.
@@ -1510,19 +1506,19 @@
is less than the lower bound of the first dimension of .
- -or-
+-or-
- is less than the lower bound of the first dimension of .
+ is less than the lower bound of the first dimension of .
- -or-
+-or-
- is less than zero.
+ is less than zero.
is greater than the number of elements from to the end of .
- -or-
+-or-
- is greater than the number of elements from to the end of .
+ is greater than the number of elements from to the end of .
@@ -1616,9 +1612,9 @@
is .
- -or-
+-or-
- is .
+ is .
@@ -1750,9 +1746,9 @@
is .
- -or-
+-or-
- is .
+ is .
and have different ranks.
@@ -1763,9 +1759,9 @@
is greater than the number of elements in .
- -or-
+-or-
- is greater than the number of elements in .
+ is greater than the number of elements in .
@@ -1864,9 +1860,9 @@
is .
- -or-
+-or-
- is .
+ is .
and have different ranks.
@@ -1877,9 +1873,9 @@
is greater than the number of elements in .
- -or-
+-or-
- is greater than the number of elements in .
+ is greater than the number of elements in .
@@ -1990,9 +1986,9 @@
is .
- -or-
+-or-
- is .
+ is .
and have different ranks.
@@ -2001,19 +1997,19 @@
is less than the lower bound of the first dimension of .
- -or-
+-or-
- is less than the lower bound of the first dimension of .
+ is less than the lower bound of the first dimension of .
- -or-
+-or-
- is less than zero.
+ is less than zero.
is greater than the number of elements from to the end of .
- -or-
+-or-
- is greater than the number of elements from to the end of .
+ is greater than the number of elements from to the end of .
@@ -2116,9 +2112,9 @@
is .
- -or-
+-or-
- is .
+ is .
and have different ranks.
@@ -2127,19 +2123,19 @@
is outside the range of valid indexes for the .
- -or-
+-or-
- is outside the range of valid indexes for the .
+ is outside the range of valid indexes for the .
- -or-
+-or-
- is less than 0 or greater than Int32.MaxValue.
+ is less than 0 or greater than Int32.MaxValue.
is greater than the number of elements from to the end of .
- -or-
+-or-
- is greater than the number of elements from to the end of .
+ is greater than the number of elements from to the end of .
@@ -2248,9 +2244,9 @@
is multidimensional.
- -or-
+-or-
- The number of elements in the source array is greater than the available number of elements from to the end of the destination .
+The number of elements in the source array is greater than the available number of elements from to the end of the destination .
The type of the source cannot be cast automatically to the type of the destination .
The source array is multidimensional.
At least one element in the source cannot be cast to the type of destination .
@@ -2331,9 +2327,9 @@
is multidimensional.
- -or-
+-or-
- The number of elements in the source array is greater than the available number of elements from to the end of the destination .
+The number of elements in the source array is greater than the available number of elements from to the end of the destination .
The type of the source cannot be cast automatically to the type of the destination .
The source is multidimensional.
At least one element in the source cannot be cast to the type of destination .
@@ -2435,9 +2431,9 @@
is not supported. For example, is not supported.
- -or-
+-or-
- is an open generic type.
+ is an open generic type.
is less than zero.
@@ -2532,21 +2528,21 @@
is .
- -or-
+-or-
- is .
+ is .
is not a valid .
- -or-
+-or-
- The array contains less than one element.
+The array contains less than one element.
is not supported. For example, is not supported.
- -or-
+-or-
- is an open generic type.
+ is an open generic type.
Any value in is less than zero.
@@ -2632,21 +2628,21 @@
is .
- -or-
+-or-
- is .
+ is .
is not a valid .
- -or-
+-or-
- The array contains less than one element.
+The array contains less than one element.
is not supported. For example, is not supported.
- -or-
+-or-
- is an open generic type.
+ is an open generic type.
Any value in is less than zero or greater than Int32.MaxValue.
@@ -2729,15 +2725,15 @@
is not supported. For example, is not supported.
- -or-
+-or-
- is an open generic type.
+ is an open generic type.
is less than zero.
- -or-
+-or-
- is less than zero.
+ is less than zero.
@@ -2830,34 +2826,34 @@
is .
- -or-
+-or-
- is .
+ is .
- -or-
+-or-
- is .
+ is .
is not a valid .
- -or-
+-or-
- The array contains less than one element.
+The array contains less than one element.
- -or-
+-or-
- The and arrays do not contain the same number of elements.
+The and arrays do not contain the same number of elements.
is not supported. For example, is not supported.
- -or-
+-or-
- is an open generic type.
+ is an open generic type.
Any value in is less than zero.
- -or-
+-or-
- Any value in is very large, such that the sum of a dimension's lower bound and length is greater than Int32.MaxValue.
+Any value in is very large, such that the sum of a dimension's lower bound and length is greater than Int32.MaxValue.
@@ -2941,19 +2937,19 @@
is not supported. For example, is not supported.
- -or-
+-or-
- is an open generic type.
+ is an open generic type.
is less than zero.
- -or-
+-or-
- is less than zero.
+ is less than zero.
- -or-
+-or-
- is less than zero.
+ is less than zero.
@@ -3107,9 +3103,9 @@
is .
- -or-
+-or-
- is .
+ is .
@@ -3222,8 +3218,7 @@
The new value for the elements in the specified range.
A 32-bit integer that represents the index in the at which filling begins.
The number of elements to copy.
- Assigns the given of type to the elements of the specified which are
- within the range of (inclusive) and the next number of indices.
+ Assigns the given of type to the elements of the specified which are within the range of (inclusive) and the next number of indices.
To be added.
@@ -3315,9 +3310,9 @@
is .
- -or-
+-or-
- is .
+ is .
@@ -3423,9 +3418,9 @@
is .
- -or-
+-or-
- is .
+ is .
@@ -3539,9 +3534,9 @@
is .
- -or-
+-or-
- is .
+ is .
@@ -3625,9 +3620,9 @@
is .
- -or-
+-or-
- is .
+ is .
is outside the range of valid indexes for .
@@ -3715,19 +3710,19 @@
is .
- -or-
+-or-
- is .
+ is .
is outside the range of valid indexes for .
- -or-
+-or-
- is less than zero.
+ is less than zero.
- -or-
+-or-
- and do not specify a valid section in .
+ and do not specify a valid section in .
@@ -3827,9 +3822,9 @@
is .
- -or-
+-or-
- is .
+ is .
@@ -3943,9 +3938,9 @@
is .
- -or-
+-or-
- is .
+ is .
@@ -4029,9 +4024,9 @@
is .
- -or-
+-or-
- is .
+ is .
is outside the range of valid indexes for .
@@ -4119,19 +4114,19 @@
is .
- -or-
+-or-
- is .
+ is .
is outside the range of valid indexes for .
- -or-
+-or-
- is less than zero.
+ is less than zero.
- -or-
+-or-
- and do not specify a valid section in .
+ and do not specify a valid section in .
@@ -4209,16 +4204,16 @@
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.array.foreach/cpp/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/Array/ForEachT/source.cs" interactive="try-dotnet" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.array.foreach/fs/source.fs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.array.foreach/vb/source.vb" id="Snippet1":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.array.foreach/vb/source.vb" id="Snippet1":::
]]>
is .
- -or-
+-or-
- is .
+ is .
@@ -4376,9 +4371,9 @@
is less than zero.
- -or-
+-or-
- is equal to or greater than .
+ is equal to or greater than .
@@ -4444,9 +4439,9 @@
is less than zero.
- -or-
+-or-
- is equal to or greater than .
+ is equal to or greater than .
@@ -4532,9 +4527,9 @@
is less than zero.
- -or-
+-or-
- is equal to or greater than .
+ is equal to or greater than .
@@ -4616,9 +4611,9 @@
is less than zero.
- -or-
+-or-
- is equal to or greater than .
+ is equal to or greater than .
@@ -5541,13 +5536,13 @@
is outside the range of valid indexes for .
- -or-
+-or-
- is less than zero.
+ is less than zero.
- -or-
+-or-
- and do not specify a valid section in .
+ and do not specify a valid section in .
is multidimensional.
@@ -5811,13 +5806,13 @@
is outside the range of valid indexes for .
- -or-
+-or-
- is less than zero.
+ is less than zero.
- -or-
+-or-
- and do not specify a valid section in .
+ and do not specify a valid section in .
Performing Culture-Insensitive String Operations in Arrays
@@ -6376,13 +6371,13 @@
is outside the range of valid indexes for .
- -or-
+-or-
- is less than zero.
+ is less than zero.
- -or-
+-or-
- and do not specify a valid section in .
+ and do not specify a valid section in .
is multidimensional.
@@ -6648,13 +6643,13 @@
is outside the range of valid indexes for .
- -or-
+-or-
- is less than zero.
+ is less than zero.
- -or-
+-or-
- and do not specify a valid section in .
+ and do not specify a valid section in .
Performing Culture-Insensitive String Operations in Arrays
@@ -7214,9 +7209,9 @@ int[,,] TDArray = new int[1,1,1];
is less than the lower bound of .
- -or-
+-or-
- is less than zero.
+ is less than zero.
and do not specify a valid range in .
@@ -7330,9 +7325,9 @@ int[,,] TDArray = new int[1,1,1];
is less than the lower bound of .
- -or-
+-or-
- is less than zero.
+ is less than zero.
and do not specify a valid range in .
@@ -8194,9 +8189,9 @@ int[,,] TDArray = new int[1,1,1];
The one-dimensional that contains the keys to sort.
The one-dimensional that contains the items that correspond to each of the keys in the .
- -or-
+-or-
- to sort only the .
+ to sort only the .
Sorts a pair of one-dimensional objects (one contains the keys and the other contains the corresponding items) based on the keys in the first using the implementation of each key.
is .
The is multidimensional.
- -or-
+-or-
- The is multidimensional.
+The is multidimensional.
is not , and the length of is greater than the length of .
One or more elements in the do not implement the interface.
@@ -8309,9 +8304,9 @@ int[,,] TDArray = new int[1,1,1];
The one-dimensional array to sort.
The implementation to use when comparing elements.
- -or-
+-or-
- to use the implementation of each element.
+ to use the implementation of each element.
Sorts the elements in a one-dimensional using the specified .
The one-dimensional that contains the keys to sort.
The one-dimensional that contains the items that correspond to each of the keys in the .
- -or-
+-or-
- to sort only the .
+ to sort only the .
The implementation to use when comparing elements.
- -or-
+-or-
- to use the implementation of each element.
+ to use the implementation of each element.
Sorts a pair of one-dimensional objects (one contains the keys and the other contains the corresponding items) based on the keys in the first using the specified .
is .
The is multidimensional.
- -or-
+-or-
- The is multidimensional.
+The is multidimensional.
is not , and the length of is greater than the length of .
- -or-
+-or-
- The implementation of caused an error during the sort. For example, might not return 0 when comparing an item with itself.
+The implementation of caused an error during the sort. For example, might not return 0 when comparing an item with itself.
is , and one or more elements in the do not implement the interface.
@@ -8606,9 +8601,9 @@ This method is an O(`n` log `n`) operation, where `n` is the
is less than the lower bound of .
- -or-
+-or-
- is less than zero.
+ is less than zero.
and do not specify a valid range in .
One or more elements in do not implement the interface.
@@ -8676,9 +8671,9 @@ This method is an O(`n` log `n`) operation, where `n` is the The one-dimensional that contains the keys to sort.
The one-dimensional that contains the items that correspond to each of the keys in the .
- -or-
+-or-
- to sort only the .
+ to sort only the .
The starting index of the range to sort.
The number of elements in the range to sort.
Sorts a range of elements in a pair of one-dimensional objects (one contains the keys and the other contains the corresponding items) based on the keys in the first using the implementation of each key.
@@ -8722,25 +8717,25 @@ This method is an O(`n` log `n`) operation, where `n` is the is .
The is multidimensional.
- -or-
+-or-
- The is multidimensional.
+The is multidimensional.
is less than the lower bound of .
- -or-
+-or-
- is less than zero.
+ is less than zero.
is not , and the length of is greater than the length of .
- -or-
+-or-
- and do not specify a valid range in the .
+ and do not specify a valid range in the .
- -or-
+-or-
- is not , and and do not specify a valid range in the .
+ is not , and and do not specify a valid range in the .
One or more elements in the do not implement the interface.
@@ -8810,9 +8805,9 @@ This method is an O(`n` log `n`) operation, where `n` is the The number of elements in the range to sort.
The implementation to use when comparing elements.
- -or-
+-or-
- to use the implementation of each element.
+ to use the implementation of each element.
Sorts the elements in a range of elements in a one-dimensional using the specified .
is less than the lower bound of .
- -or-
+-or-
- is less than zero.
+ is less than zero.
and do not specify a valid range in .
- -or-
+-or-
- The implementation of caused an error during the sort. For example, might not return 0 when comparing an item with itself.
+The implementation of caused an error during the sort. For example, might not return 0 when comparing an item with itself.
is , and one or more elements in do not implement the interface.
@@ -8952,16 +8947,16 @@ This method is an O(`n` log `n`) operation, where `n` is the The one-dimensional that contains the keys to sort.
The one-dimensional that contains the items that correspond to each of the keys in the .
- -or-
+-or-
- to sort only the .
+ to sort only the .
The starting index of the range to sort.
The number of elements in the range to sort.
The implementation to use when comparing elements.
- -or-
+-or-
- to use the implementation of each element.
+ to use the implementation of each element.
Sorts a range of elements in a pair of one-dimensional objects (one contains the keys and the other contains the corresponding items) based on the keys in the first using the specified .
is .
The is multidimensional.
- -or-
+-or-
- The is multidimensional.
+The is multidimensional.
is less than the lower bound of .
- -or-
+-or-
- is less than zero.
+ is less than zero.
is not , and the lower bound of does not match the lower bound of .
- -or-
+-or-
- is not , and the length of is greater than the length of .
+ is not , and the length of is greater than the length of .
- -or-
+-or-
- and do not specify a valid range in the .
+ and do not specify a valid range in the .
- -or-
+-or-
- is not , and and do not specify a valid range in the .
+ is not , and and do not specify a valid range in the .
- -or-
+-or-
- The implementation of caused an error during the sort. For example, might not return 0 when comparing an item with itself.
+The implementation of caused an error during the sort. For example, might not return 0 when comparing an item with itself.
is , and one or more elements in the do not implement the interface.
@@ -9374,9 +9369,9 @@ This method is an O(`n` log `n`) operation, where `n` is the
is .
- -or-
+-or-
- is .
+ is .
The implementation of caused an error during the sort. For example, might not return 0 when comparing an item with itself.
.NET Framework 4 and earlier versions used only the Quicksort algorithm. Quicksort identifies invalid comparers in some situations in which the sorting operation throws an exception, and throws an exception to the caller. Starting with .NET Framework 4.5, it is possible that sorting operations that previously threw will not throw an exception, because the insertion sort and heapsort algorithms do not detect an invalid comparer. For the most part, this applies to arrays with less than or equal to 6 elements.
@@ -9493,9 +9488,9 @@ This method is an O(`n` log `n`) operation, where `n` is the
is less than the lower bound of .
- -or-
+-or-
- is less than zero.
+ is less than zero.
and do not specify a valid range in .
One or more elements in do not implement the generic interface.
@@ -9625,15 +9620,15 @@ This method is an O(`n` log `n`) operation, where `n` is the
is less than the lower bound of .
- -or-
+-or-
- is less than zero.
+ is less than zero.
and do not specify a valid range in .
- -or-
+-or-
- The implementation of caused an error during the sort. For example, might not return 0 when comparing an item with itself.
+The implementation of caused an error during the sort. For example, might not return 0 when comparing an item with itself.
is , and one or more elements in do not implement the generic interface.
@@ -9774,9 +9769,9 @@ This method is an O(`n` log `n`) operation, where `n` is the
is not , and the lower bound of does not match the lower bound of .
- -or-
+-or-
- is not , and the length of is greater than the length of .
+ is not , and the length of is greater than the length of .
One or more elements in the do not implement the generic interface.
@@ -9920,13 +9915,13 @@ This method is an O(`n` log `n`) operation, where `n` is the
is not , and the lower bound of does not match the lower bound of .
- -or-
+-or-
- is not , and the length of is greater than the length of .
+ is not , and the length of is greater than the length of .
- -or-
+-or-
- The implementation of caused an error during the sort. For example, might not return 0 when comparing an item with itself.
+The implementation of caused an error during the sort. For example, might not return 0 when comparing an item with itself.
is , and one or more elements in the do not implement the generic interface.
@@ -10069,23 +10064,23 @@ This method is an O(`n` log `n`) operation, where `n` is the
is less than the lower bound of .
- -or-
+-or-
- is less than zero.
+ is less than zero.
is not , and the lower bound of does not match the lower bound of .
- -or-
+-or-
- is not , and the length of is greater than the length of .
+ is not , and the length of is greater than the length of .
- -or-
+-or-
- and do not specify a valid range in the .
+ and do not specify a valid range in the .
- -or-
+-or-
- is not , and and do not specify a valid range in the .
+ is not , and and do not specify a valid range in the .
One or more elements in the do not implement the generic interface.
@@ -10236,27 +10231,27 @@ This method is an O(`n` log `n`) operation, where `n` is the
is less than the lower bound of .
- -or-
+-or-
- is less than zero.
+ is less than zero.
is not , and the lower bound of does not match the lower bound of .
- -or-
+-or-
- is not , and the length of is greater than the length of .
+ is not , and the length of is greater than the length of .
- -or-
+-or-
- and do not specify a valid range in the .
+ and do not specify a valid range in the .
- -or-
+-or-
- is not , and and do not specify a valid range in the .
+ is not , and and do not specify a valid range in the .
- -or-
+-or-
- The implementation of caused an error during the sort. For example, might not return 0 when comparing an item with itself.
+The implementation of caused an error during the sort. For example, might not return 0 when comparing an item with itself.
is , and one or more elements in the do not implement the generic interface.
@@ -10770,9 +10765,9 @@ This member is an explicit interface member implementation. It can be used only
is not a valid index in the .
The is read-only.
- -or-
+-or-
- The has a fixed size.
+The has a fixed size.
is null reference in the .
@@ -10924,9 +10919,9 @@ This member is an explicit interface member implementation. It can be used only
is less than zero.
- -or-
+-or-
- is equal to or greater than .
+ is equal to or greater than .
The current does not have exactly one dimension.
@@ -10986,9 +10981,9 @@ This member is an explicit interface member implementation. It can be used only
The is read-only.
- -or-
+-or-
- The has a fixed size.
+The has a fixed size.
@@ -11048,9 +11043,9 @@ This member is an explicit interface member implementation. It can be used only
index is not a valid index in the .
The is read-only.
- -or-
+-or-
- The has a fixed size.
+The has a fixed size.
@@ -11099,25 +11094,34 @@ This member is an explicit interface member implementation. It can be used only
The object to compare with the current instance.
An object that compares the current object and .
Determines whether the current collection object precedes, occurs in the same position as, or follows another object in the sort order.
- An integer that indicates the relationship of the current collection object to other, as shown in the following table.
-
- Return value
-
- Description
-
- - -1
-
- The current instance precedes .
-
-
- 0
-
- The current instance and are equal.
-
-
- 1
-
- The current instance follows .
-
-
+ An integer that indicates the relationship of the current collection object to other, as shown in the following table.
+
+ Return value
+
+
+ Description
+
+
+
+ -
+ -1
+
+
+ The current instance precedes .
+
+ -
+ 0
+
+
+ The current instance and are equal.
+
+ -
+ 1
+
+
+ The current instance follows .
+
+
is .
- -or-
+-or-
- is .
+ is .
diff --git a/xml/System/ArraySegment`1+Enumerator.xml b/xml/System/ArraySegment`1+Enumerator.xml
index 4bf07ec0da6..f033baa9b3a 100644
--- a/xml/System/ArraySegment`1+Enumerator.xml
+++ b/xml/System/ArraySegment`1+Enumerator.xml
@@ -58,18 +58,18 @@
Provides an enumerator for the elements of an .
- . At this position, is undefined. You must call to advance the enumerator to the first item in the before reading the value of .
returns the same value until is called. sets to the next item in the .
-If passes the end of the , returns `false`. When the enumerator is at this state, subsequent calls to also return `false` and is undefined. You cannot set to the first item in the again; you must create a new enumerator instance instead.
-
+If passes the end of the , returns `false`. When the enumerator is at this state, subsequent calls to also return `false` and is undefined. You cannot set to the first item in the again; you must create a new enumerator instance instead.
+
]]>
@@ -116,17 +116,17 @@ If passes the end of the <
Gets a reference to the item at the current position of the enumerator.
The element of the at the current position of the enumerator.
- must be called to advance the enumerator to the first element of the array segment before reading the value of `Current`.
-- The last call to returned `false`, which indicates the end of the array segment.
+- The last call to returned `false`, which indicates the end of the array segment.
-`Current` returns the same value until is called. sets `Current` to the next item in the array segment.
+`Current` returns the same value until is called. sets `Current` to the next item in the array segment.
]]>
@@ -200,11 +200,11 @@ If passes the end of the <
if the enumerator was successfully advanced to the next element; if the enumerator has passed the end of the array segment.
- The type of the elements in the array segment.
Delimits a section of a one-dimensional array.
- is a wrapper around an array that delimits a range of elements in that array. Multiple instances can refer to the same original array and can overlap. The original array must be one-dimensional and must have zero-based indexing.
-
+ is a wrapper around an array that delimits a range of elements in that array. Multiple instances can refer to the same original array and can overlap. The original array must be one-dimensional and must have zero-based indexing.
+
> [!NOTE]
-> implements the interface starting with the .NET Framework 4.6; in previous versions of the .NET Framework, the structure did not implement this interface.
-
- The structure is useful whenever the elements of an array will be manipulated in distinct segments. For example:
-
-- You can pass an object that represents only a portion of an array as an argument to a method, rather than call a relatively expensive method like to pass a copy of a portion of an array.
-
-- In a multithreaded app, you can use the structure to have each thread operate on only a portion of the array.
-
-- For task-based asynchronous operations, you can use an object to ensure that each task operates on a distinct segment of the array. The following example divides an array into individual segments with up to ten elements. Each element in the segment is multiplied by its segment number. The result shows that using the class to manipulate elements in this way changes the values of its underlying array.
-
+> implements the interface starting with the .NET Framework 4.6; in previous versions of the .NET Framework, the structure did not implement this interface.
+
+ The structure is useful whenever the elements of an array will be manipulated in distinct segments. For example:
+
+- You can pass an object that represents only a portion of an array as an argument to a method, rather than call a relatively expensive method like to pass a copy of a portion of an array.
+
+- In a multithreaded app, you can use the structure to have each thread operate on only a portion of the array.
+
+- For task-based asynchronous operations, you can use an object to ensure that each task operates on a distinct segment of the array. The following example divides an array into individual segments with up to ten elements. Each element in the segment is multiplied by its segment number. The result shows that using the class to manipulate elements in this way changes the values of its underlying array.
+
:::code language="csharp" source="~/snippets/csharp/System/ArraySegmentT/Overview/segmentexample.cs" id="Snippet2":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.ArraySegment/FS/segmentexample.fs" id="Snippet2":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.ArraySegment/VB/segmentexample.vb" id="Snippet2":::
-
- Note, however, that although the structure can be used to divide an array into distinct segments, the segments are not completely independent of one another. The property returns the entire original array, not a copy of the array; therefore, changes made to the array returned by the property are made to the original array. If this is undesirable, you should perform operations on a copy of the array, rather than an object that represents a portion of the array.
-
- The method and the equality and inequality operators test for reference equality when they compare two objects. For two objects to be considered equal, they must meet all of the following conditions:
-
-- Reference the same array.
-
-- Begin at the same index in the array.
-
-- Have the same number of elements.
-
- If you want to retrieve an element by its index in the object, you must cast it to an object and retrieve it or modify it by using the property. Note that this is not necessary in F#. The following example retrieves the element in an object that delimits a section of a string array.
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.ArraySegment/VB/segmentexample.vb" id="Snippet2":::
+
+ Note, however, that although the structure can be used to divide an array into distinct segments, the segments are not completely independent of one another. The property returns the entire original array, not a copy of the array; therefore, changes made to the array returned by the property are made to the original array. If this is undesirable, you should perform operations on a copy of the array, rather than an object that represents a portion of the array.
+
+ The method and the equality and inequality operators test for reference equality when they compare two objects. For two objects to be considered equal, they must meet all of the following conditions:
+
+- Reference the same array.
+
+- Begin at the same index in the array.
+
+- Have the same number of elements.
+
+ If you want to retrieve an element by its index in the object, you must cast it to an object and retrieve it or modify it by using the property. Note that this is not necessary in F#. The following example retrieves the element in an object that delimits a section of a string array.
+
:::code language="csharp" source="~/snippets/csharp/System/ArraySegmentT/Overview/example1.cs" interactive="try-dotnet" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.arraysegment.class/fs/example1.fs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.arraysegment.class/vb/example1.vb" id="Snippet1":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.arraysegment.class/vb/example1.vb" id="Snippet1":::
+
+
+
+## Examples
+ The following code example passes an structure to a method.
-
-
-## Examples
- The following code example passes an structure to a method.
-
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.ArraySegment/CPP/arraysegment.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/ArraySegmentT/Overview/arraysegment.cs" interactive="try-dotnet" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.ArraySegment/FS/arraysegment.fs" id="Snippet1":::
@@ -165,16 +165,16 @@
Initializes a new instance of the structure.
- structure to a method.
-
+ structure to a method.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.ArraySegment/CPP/arraysegment.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/ArraySegmentT/Overview/arraysegment.cs" interactive="try-dotnet" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.ArraySegment/FS/arraysegment.fs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.ArraySegment/VB/arraysegment.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.ArraySegment/VB/arraysegment.vb" id="Snippet1":::
+
]]>
@@ -219,15 +219,15 @@
The array to wrap.
Initializes a new instance of the structure that delimits all the elements in the specified array.
- that delimits all the elements of `array`. That is, the property of the is 0 and its property is the length of `array`. To create an that delimits only part of an array, use the constructor.
-
- The original array must be one-dimensional and must have zero-based indexing.
-
- Multiple instances can refer to the same original array and can overlap.
-
+ that delimits all the elements of `array`. That is, the property of the is 0 and its property is the length of `array`. To create an that delimits only part of an array, use the constructor.
+
+ The original array must be one-dimensional and must have zero-based indexing.
+
+ Multiple instances can refer to the same original array and can overlap.
+
]]>
@@ -279,12 +279,12 @@
The number of elements in the range.
Initializes a new instance of the structure that delimits the specified range of the elements in the specified array.
- instances can refer to the same original array and can overlap.
+ instances can refer to the same original array and can overlap.
]]>
@@ -344,21 +344,21 @@
Gets the original array containing the range of elements that the array segment delimits.
The original array that was passed to the constructor, and that contains the range delimited by the .
- property returns the original array, not a copy of the array; therefore, changes made through the property are made directly to the original array.
-
-
-
-## Examples
- The following code example passes an to a method.
-
+ property returns the original array, not a copy of the array; therefore, changes made through the property are made directly to the original array.
+
+
+
+## Examples
+ The following code example passes an to a method.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.ArraySegment/CPP/arraysegment.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/ArraySegmentT/Overview/arraysegment.cs" interactive="try-dotnet" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.ArraySegment/FS/arraysegment.fs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.ArraySegment/VB/arraysegment.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.ArraySegment/VB/arraysegment.vb" id="Snippet1":::
+
]]>
@@ -408,10 +408,9 @@
To be added.
The underlying array of this instance is .
- -or-
+-or-
-The underlying array of is .
-
+The underlying array of is .
The length of the underlying array of this instance is larger than the length of the underlying array of .
@@ -543,16 +542,16 @@ The underlying array of is Gets the number of elements in the range delimited by the array segment.
The number of elements in the range delimited by the .
- structure to a method.
-
+ structure to a method.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.ArraySegment/CPP/arraysegment.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/ArraySegmentT/Overview/arraysegment.cs" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.ArraySegment/FS/arraysegment.fs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.ArraySegment/VB/arraysegment.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.ArraySegment/VB/arraysegment.vb" id="Snippet1":::
+
]]>
@@ -664,17 +663,17 @@ The underlying array of is
if the specified structure is equal to the current instance; otherwise, .
- objects are considered to be equal if all the following conditions are met:
-
-- They reference the same array.
-
-- They begin at the same index in the array.
-
-- They have the same number of elements.
-
+ objects are considered to be equal if all the following conditions are met:
+
+- They reference the same array.
+
+- They begin at the same index in the array.
+
+- They have the same number of elements.
+
]]>
@@ -738,17 +737,17 @@ The underlying array of is
if the specified object is a structure and is equal to the current instance; otherwise, .
- objects are considered to be equal if all the following conditions are met:
-
-- They reference the same array.
-
-- They begin at the same index in the array.
-
-- They have the same number of elements.
-
+ objects are considered to be equal if all the following conditions are met:
+
+- They reference the same array.
+
+- They begin at the same index in the array.
+
+- They have the same number of elements.
+
]]>
@@ -915,16 +914,16 @@ The underlying array of is Gets the position of the first element in the range delimited by the array segment, relative to the start of the original array.
The position of the first element in the range delimited by the , relative to the start of the original array.
- structure to a method.
-
+ structure to a method.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.ArraySegment/CPP/arraysegment.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/ArraySegmentT/Overview/arraysegment.cs" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.ArraySegment/FS/arraysegment.fs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.ArraySegment/VB/arraysegment.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.ArraySegment/VB/arraysegment.vb" id="Snippet1":::
+
]]>
@@ -992,17 +991,17 @@ The underlying array of is
if is equal to ; otherwise, .
- objects are considered to be equal if all the following conditions are met:
-
-- They reference the same array.
-
-- They begin at the same index.
-
-- They have the same number of elements.
-
+ objects are considered to be equal if all the following conditions are met:
+
+- They reference the same array.
+
+- They begin at the same index.
+
+- They have the same number of elements.
+
The equivalent method for this operator is ]]>
@@ -1106,17 +1105,17 @@ The underlying array of is
if is not equal to ; otherwise, .
- objects are considered to be unequal if they are of the same closed generic type but any of the following conditions is true:
-
-- They do not reference the same array.
-
-- They have different starting indexes.
-
-- They have a different number of elements.
-
+ objects are considered to be unequal if they are of the same closed generic type but any of the following conditions is true:
+
+- They do not reference the same array.
+
+- They have different starting indexes.
+
+- They have a different number of elements.
+
The equivalent method for this operator is ]]>
@@ -1204,7 +1203,7 @@ The underlying array of is
is greater than the length of the underlying array of this instance.
- -or-
+-or-
is greater than the length of the underlying array of this instance - .
@@ -1349,11 +1348,11 @@ The underlying array of is
if is found in the array segment; otherwise, .
- instance is cast to an interface.
-
+ instance is cast to an interface.
+
]]>
The underlying array is .
@@ -1399,11 +1398,11 @@ The underlying array of is The zero-based index in at which copying begins.
Copies the elements of the array segment to an array, starting at the specified array index.
- instance is cast to an interface.
-
+ instance is cast to an interface.
+
]]>
@@ -1411,15 +1410,15 @@ The underlying array of is
is less than 0.
- is multidimensional.
-
- -or-
-
- The number of elements in the source array segment is greater than the available space from to the end of the destination .
-
- -or-
-
- Type cannot be cast automatically to the type of the destination .
+ is multidimensional.
+
+-or-
+
+The number of elements in the source array segment is greater than the available space from to the end of the destination .
+
+-or-
+
+Type cannot be cast automatically to the type of the destination .
The underlying array for this instance is .
@@ -1462,15 +1461,15 @@ The underlying array of is System.Boolean
- Gets a value that indicates whether the array segment is read-only.
+ Gets a value that indicates whether the array segment is read-only.
if the array segment is read-only; otherwise, .
- instance is cast to an interface.
-
+ instance is cast to an interface.
+
]]>
@@ -1567,11 +1566,11 @@ The underlying array of is Returns an enumerator that iterates through the array segment.
An enumerator that can be used to iterate through the array segment.
- instance is cast to an interface.
-
+ instance is cast to an interface.
+
]]>
The underlying array is .
@@ -1623,11 +1622,11 @@ The underlying array of is Determines the index of a specific item in the array segment.
The index of if found in the list; otherwise, -1.
- instance is cast to an interface.
-
+ instance is cast to an interface.
+
]]>
The underlying array is .
@@ -1729,15 +1728,15 @@ The underlying array of is Gets or sets the element at the specified index.
The element at the specified index.
- instance is cast to an interface, as the following example shows.
-
+ instance is cast to an interface, as the following example shows.
+
:::code language="csharp" source="~/snippets/csharp/System/ArraySegmentT/Overview/example1.cs" interactive="try-dotnet" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.arraysegment.class/fs/example1.fs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.arraysegment.class/vb/example1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.arraysegment.class/vb/example1.vb" id="Snippet1":::
+
]]>
@@ -1839,11 +1838,11 @@ The underlying array of is Gets the element at the specified index of the array segment.
The element at the specified index.
- instance is cast to an interface.
-
+ instance is cast to an interface.
+
]]>
@@ -1895,11 +1894,11 @@ The underlying array of is Returns an enumerator that iterates through an array segment.
An enumerator that can be used to iterate through the array segment.
- instance is cast to an interface.
-
+ instance is cast to an interface.
+
]]>
The underlying array is .
diff --git a/xml/System/ArrayTypeMismatchException.xml b/xml/System/ArrayTypeMismatchException.xml
index f7f7fd44124..322b4dc295c 100644
--- a/xml/System/ArrayTypeMismatchException.xml
+++ b/xml/System/ArrayTypeMismatchException.xml
@@ -70,33 +70,33 @@
The exception that is thrown when an attempt is made to store an element of the wrong type within an array.
- is thrown when the system cannot convert the element to the type declared for the array. For example, an element of type cannot be stored in an array because conversion between these types is not supported. It is generally unnecessary for applications to throw this exception.
-
- The following Microsoft intermediate language (MSIL) instructions throw :
-
-- `ldelem.`
-
-- `ldelema`
-
-- `stelem.`
-
- uses the HRESULT COR_E_ARRAYTYPEMISMATCH, which has the value 0x80131503.
-
- For a list of initial property values for an instance of , see the constructors.
-
-
-
-## Examples
- The following code example demonstrates scenarios where is thrown.
-
+ is thrown when the system cannot convert the element to the type declared for the array. For example, an element of type cannot be stored in an array because conversion between these types is not supported. It is generally unnecessary for applications to throw this exception.
+
+ The following Microsoft intermediate language (MSIL) instructions throw :
+
+- `ldelem.`
+
+- `ldelema`
+
+- `stelem.`
+
+ uses the HRESULT COR_E_ARRAYTYPEMISMATCH, which has the value 0x80131503.
+
+ For a list of initial property values for an instance of , see the constructors.
+
+
+
+## Examples
+ The following code example demonstrates scenarios where is thrown.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.ArrayTypeMismatch/CPP/class1.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/ArrayTypeMismatchException/Overview/class1.cs" interactive="try-dotnet" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.ArrayTypeMismatch/FS/class1.fs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.ArrayTypeMismatch/VB/class1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.ArrayTypeMismatch/VB/class1.vb" id="Snippet1":::
+
]]>
@@ -153,28 +153,28 @@
Initializes a new instance of the class.
- property of the new instance to a system-supplied message that describes the error, such as "Source array type cannot be assigned to destination array type." This message takes into account the current system culture.
-
- The following table shows the initial property values for an instance of .
-
-|Property|Value|
-|--------------|-----------|
-||A null reference (`Nothing` in Visual Basic).|
-||The localized error message string.|
-
-
-
-## Examples
- The following example demonstrates the ArrayTypeMismatchException() constructor of the class. It contains a function which takes two arrays as arguments and checks whether the two arrays are of the same type. If the arrays are of different types, a new is thrown and then caught in the calling method.
-
+ property of the new instance to a system-supplied message that describes the error, such as "Source array type cannot be assigned to destination array type." This message takes into account the current system culture.
+
+ The following table shows the initial property values for an instance of .
+
+|Property|Value|
+|--------------|-----------|
+||A null reference (`Nothing` in Visual Basic).|
+||The localized error message string.|
+
+
+
+## Examples
+ The following example demonstrates the ArrayTypeMismatchException() constructor of the class. It contains a function which takes two arrays as arguments and checks whether the two arrays are of the same type. If the arrays are of different types, a new is thrown and then caught in the calling method.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/ArrayTypeMisMatch_Constructor1/CPP/arraytypemismatch_constructor1.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/ArrayTypeMismatchException/.ctor/arraytypemismatch_constructor1.cs" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/ArrayTypeMisMatch_Constructor1/FS/arraytypemismatch_constructor1.fs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/ArrayTypeMisMatch_Constructor1/VB/arraytypemismatch_constructor1.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/ArrayTypeMisMatch_Constructor1/VB/arraytypemismatch_constructor1.vb" id="Snippet1":::
+
]]>
@@ -221,28 +221,28 @@
A that describes the error.
Initializes a new instance of the class with a specified error message.
- .
-
-|Property|Value|
-|--------------|-----------|
-||A null reference (`Nothing` in Visual Basic).|
-||The error message string.|
-
-
-
-## Examples
- The following example demonstrates the ArrayTypeMismatchException(String) constructor of the class. It contains a function which takes two arrays as arguments and checks whether the two arrays are of the same type. If the arrays are of different types, a new is thrown and then caught in the calling method.
-
+ .
+
+|Property|Value|
+|--------------|-----------|
+||A null reference (`Nothing` in Visual Basic).|
+||The error message string.|
+
+
+
+## Examples
+ The following example demonstrates the ArrayTypeMismatchException(String) constructor of the class. It contains a function which takes two arrays as arguments and checks whether the two arrays are of the same type. If the arrays are of different types, a new is thrown and then caught in the calling method.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/ArrayTypeMisMatch_Constructor2/CPP/arraytypemismatch_constructor2.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/ArrayTypeMismatchException/.ctor/arraytypemismatch_constructor2.cs" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/ArrayTypeMisMatch_Constructor2/FS/arraytypemismatch_constructor2.fs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/ArrayTypeMisMatch_Constructor2/VB/arraytypemismatch_constructor2.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/ArrayTypeMisMatch_Constructor2/VB/arraytypemismatch_constructor2.vb" id="Snippet1":::
+
]]>
@@ -304,11 +304,11 @@
The contextual information about the source or destination.
Initializes a new instance of the class with serialized data.
-
XML and SOAP Serialization
@@ -358,28 +358,28 @@
The exception that is the cause of the current exception. If the parameter is not a null reference, the current exception is raised in a block that handles the inner exception.
Initializes a new instance of the class with a specified error message and a reference to the inner exception that is the cause of this exception.
- property. The property returns the same value that is passed into the constructor, or a null reference (`Nothing` in Visual Basic) if the property does not supply the inner exception value to the constructor.
-
- The following table shows the initial property values for an instance of .
-
-|Property|Value|
-|--------------|-----------|
-||The inner exception reference.|
-||The error message string.|
-
-
-
-## Examples
- The following code example demonstrates the constructor of the class. It contains a function that takes two arrays as arguments and checks whether the two arrays are of the same type. If the arrays are of different types, a new is thrown and then caught in the calling method.
-
+ property. The property returns the same value that is passed into the constructor, or a null reference (`Nothing` in Visual Basic) if the property does not supply the inner exception value to the constructor.
+
+ The following table shows the initial property values for an instance of .
+
+|Property|Value|
+|--------------|-----------|
+||The inner exception reference.|
+||The error message string.|
+
+
+
+## Examples
+ The following code example demonstrates the constructor of the class. It contains a function that takes two arrays as arguments and checks whether the two arrays are of the same type. If the arrays are of different types, a new is thrown and then caught in the calling method.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/ArrayTypeMisMatch_Constructor3/CPP/arraytypemismatch_constructor3.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/ArrayTypeMismatchException/.ctor/arraytypemismatch_constructor3.cs" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/ArrayTypeMisMatch_Constructor3/FS/arraytypemismatch_constructor3.fs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/ArrayTypeMisMatch_Constructor3/VB/arraytypemismatch_constructor3.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/ArrayTypeMisMatch_Constructor3/VB/arraytypemismatch_constructor3.vb" id="Snippet1":::
+
]]>
diff --git a/xml/System/AssemblyLoadEventArgs.xml b/xml/System/AssemblyLoadEventArgs.xml
index d74d08c5d07..bfecabd1bf8 100644
--- a/xml/System/AssemblyLoadEventArgs.xml
+++ b/xml/System/AssemblyLoadEventArgs.xml
@@ -145,11 +145,11 @@
Gets an that represents the currently loaded assembly.
An instance of that represents the currently loaded assembly.
- event occurs.
-
+ event occurs.
+
]]>
diff --git a/xml/System/AssemblyLoadEventHandler.xml b/xml/System/AssemblyLoadEventHandler.xml
index 1b6ec0d6f64..f13f5e53d0e 100644
--- a/xml/System/AssemblyLoadEventHandler.xml
+++ b/xml/System/AssemblyLoadEventHandler.xml
@@ -74,11 +74,11 @@
An that contains the event data.
Represents the method that handles the event of an .
- is used to specify the methods that are invoked in response to an event. To associate an instance of with an event, add the instance to the event. The methods referenced by the are invoked whenever an assembly is loaded, until the is removed from the event.
-
+ is used to specify the methods that are invoked in response to an event. To associate an instance of with an event, add the instance to the event. The methods referenced by the are invoked whenever an assembly is loaded, until the is removed from the event.
+
]]>
diff --git a/xml/System/AsyncCallback.xml b/xml/System/AsyncCallback.xml
index 585bebba634..f278c9787a5 100644
--- a/xml/System/AsyncCallback.xml
+++ b/xml/System/AsyncCallback.xml
@@ -62,22 +62,22 @@
The result of the asynchronous operation.
References a method to be called when a corresponding asynchronous operation completes.
- delegate to process the results of an asynchronous operation in a separate thread. The delegate represents a callback method that is called when the asynchronous operation completes. The callback method takes an parameter, which is subsequently used to obtain the results of the asynchronous operation.
-
- For more information about asynchronous programming, see [Using an AsyncCallback Delegate to End an Asynchronous Operation](/dotnet/standard/asynchronous-programming-patterns/using-an-asynccallback-delegate-to-end-an-asynchronous-operation) and [Using an AsyncCallback Delegate and State Object](/dotnet/standard/asynchronous-programming-patterns/using-an-asynccallback-delegate-and-state-object) in [Event-based Asynchronous Pattern (EAP)](/dotnet/standard/asynchronous-programming-patterns/event-based-asynchronous-pattern-eap).
-
-
-
-## Examples
- The following code example demonstrates using asynchronous methods in the class to retrieve Domain Name System (DNS) information for user-specified computers. This example creates an delegate that references the `ProcessDnsInformation` method. This method is called once for each asynchronous request for DNS information.
-
+ delegate to process the results of an asynchronous operation in a separate thread. The delegate represents a callback method that is called when the asynchronous operation completes. The callback method takes an parameter, which is subsequently used to obtain the results of the asynchronous operation.
+
+ For more information about asynchronous programming, see [Using an AsyncCallback Delegate to End an Asynchronous Operation](/dotnet/standard/asynchronous-programming-patterns/using-an-asynccallback-delegate-to-end-an-asynchronous-operation) and [Using an AsyncCallback Delegate and State Object](/dotnet/standard/asynchronous-programming-patterns/using-an-asynccallback-delegate-and-state-object) in [Event-based Asynchronous Pattern (EAP)](/dotnet/standard/asynchronous-programming-patterns/event-based-asynchronous-pattern-eap).
+
+
+
+## Examples
+ The following code example demonstrates using asynchronous methods in the class to retrieve Domain Name System (DNS) information for user-specified computers. This example creates an delegate that references the `ProcessDnsInformation` method. This method is called once for each asynchronous request for DNS information.
+
:::code language="csharp" source="~/snippets/csharp/System/AsyncCallback/Overview/AsyncDelegateNoStateObject.cs" id="Snippet4":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/AsyncDesignPattern/FS/AsyncDelegateNoStateObject.fs" id="Snippet4":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/AsyncDesignPattern/VB/AsyncDelegateNoState.vb" id="Snippet4":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/AsyncDesignPattern/VB/AsyncDelegateNoState.vb" id="Snippet4":::
+
]]>
diff --git a/xml/System/AttributeTargets.xml b/xml/System/AttributeTargets.xml
index 7ff96078791..e19c9cf21b7 100644
--- a/xml/System/AttributeTargets.xml
+++ b/xml/System/AttributeTargets.xml
@@ -59,26 +59,26 @@
Specifies the application elements on which it is valid to apply an attribute.
- class uses this enumeration to specify the kind of element on which it is valid to apply an attribute.
-
- enumeration values can be combined with a bitwise OR operation to get the preferred combination.
-
-
-
-## Examples
- The following example illustrates the application of attributes to various targets.
-
+ class uses this enumeration to specify the kind of element on which it is valid to apply an attribute.
+
+ enumeration values can be combined with a bitwise OR operation to get the preferred combination.
+
+
+
+## Examples
+ The following example illustrates the application of attributes to various targets.
+
> [!NOTE]
-> Visual Basic and Visual C++ syntax currently do not support the application of attributes to type parameters.
-
+> Visual Basic and Visual C++ syntax currently do not support the application of attributes to type parameters.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/AttrTargs/CPP/attrtargs.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/AttributeTargets/Overview/attrtargs.cs" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR/AttrTargs/FS/attrtargs.fs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/AttrTargs/VB/AttrTargs.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/AttrTargs/VB/AttrTargs.vb" id="Snippet1":::
+
]]>
diff --git a/xml/System/AttributeUsageAttribute.xml b/xml/System/AttributeUsageAttribute.xml
index be5e32457d9..d46f4524cba 100644
--- a/xml/System/AttributeUsageAttribute.xml
+++ b/xml/System/AttributeUsageAttribute.xml
@@ -60,29 +60,29 @@
Specifies the usage of another attribute class. This class cannot be inherited.
- on your attribute class. The indicated attribute class must derive from , either directly or indirectly.
-
- Attribute classes have positional and named parameters. Each public constructor for an attribute class defines a valid sequence of positional parameters for that class. Named parameters are defined by the non-static, public, and read-write fields or properties of the attribute class.
-
- The three properties of are set by defining the following parameters:
-
--
-
- This positional parameter specifies the program elements that the indicated attribute can be placed on. The set of all possible elements that you can place an attribute on is listed in the enumeration. You can combine several values using a bitwise OR operation to get the desired combination of valid program elements.
-
--
-
- This named parameter specifies whether the indicated attribute can be specified more than once for a given program element.
-
--
-
- This named parameter specifies whether the indicated attribute can be inherited by derived classes and overriding members.
-
- For more information about using attributes, see and [Attributes](/dotnet/standard/attributes/).
-
+ on your attribute class. The indicated attribute class must derive from , either directly or indirectly.
+
+ Attribute classes have positional and named parameters. Each public constructor for an attribute class defines a valid sequence of positional parameters for that class. Named parameters are defined by the non-static, public, and read-write fields or properties of the attribute class.
+
+ The three properties of are set by defining the following parameters:
+
+-
+
+ This positional parameter specifies the program elements that the indicated attribute can be placed on. The set of all possible elements that you can place an attribute on is listed in the enumeration. You can combine several values using a bitwise OR operation to get the desired combination of valid program elements.
+
+-
+
+ This named parameter specifies whether the indicated attribute can be specified more than once for a given program element.
+
+-
+
+ This named parameter specifies whether the indicated attribute can be inherited by derived classes and overriding members.
+
+ For more information about using attributes, see and [Attributes](/dotnet/standard/attributes/).
+
]]>
@@ -131,23 +131,23 @@
The set of values combined using a bitwise OR operation to indicate which program elements are valid.
Initializes a new instance of the class with the specified list of , the value, and the value.
- values using a bitwise OR operation to get the desired combination of valid program elements.
-
- For default property values, see the , , and properties.
-
-
-
-## Examples
- The definition of the DispId attribute illustrates the use of a bitwise OR operation to combine several values.
-
+ values using a bitwise OR operation to get the desired combination of valid program elements.
+
+ For default property values, see the , , and properties.
+
+
+
+## Examples
+ The definition of the DispId attribute illustrates the use of a bitwise OR operation to combine several values.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_Classic/classic AttributeUsageAttribute.AttributeUsageAttribute Example/CPP/source.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/AttributeUsageAttribute/.ctor/source.cs" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_Classic/classic AttributeUsageAttribute.AttributeUsageAttribute Example/FS/source.fs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_Classic/classic AttributeUsageAttribute.AttributeUsageAttribute Example/VB/source.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_Classic/classic AttributeUsageAttribute.AttributeUsageAttribute Example/VB/source.vb" id="Snippet1":::
+
]]>
@@ -195,11 +195,11 @@
if more than one instance is allowed to be specified; otherwise, . The default is .
-
@@ -247,32 +247,32 @@
if the attribute can be inherited by derived classes and overriding members; otherwise, . The default is .
- property determines:
-
-- Whether classes derived from a base class tagged with the attribute to which the attribute is applied inherit that attribute.
-
-- Whether methods of derived classes that override a base class method tagged with the attribute to which the attribute is applied inherit that attribute. (If a class inherits a base class member, it also inherits any attributes applied to that member.)
-
-
-
-## Examples
- The following example illustrates the difference between an attribute to which an attribute with an property value of `true` is applied and one to which attribute with an property value of `false` is applied. The example defines two attributes, `InheritedAttribute` and `NotInheritedAttribute`. Both attributes can apply to classes and methods. Because the property of the attribute applied to `InheritedAttribute` is `true`, it is inherited by derived classes and the members of derived classes that override the base class method. On the other hand, because the property of the attribute applied to `NotInheritedAttribute` is `false`, it is not inherited by derived classes and the members of derived classes that override the base class method.
-
+ property determines:
+
+- Whether classes derived from a base class tagged with the attribute to which the attribute is applied inherit that attribute.
+
+- Whether methods of derived classes that override a base class method tagged with the attribute to which the attribute is applied inherit that attribute. (If a class inherits a base class member, it also inherits any attributes applied to that member.)
+
+
+
+## Examples
+ The following example illustrates the difference between an attribute to which an attribute with an property value of `true` is applied and one to which attribute with an property value of `false` is applied. The example defines two attributes, `InheritedAttribute` and `NotInheritedAttribute`. Both attributes can apply to classes and methods. Because the property of the attribute applied to `InheritedAttribute` is `true`, it is inherited by derived classes and the members of derived classes that override the base class method. On the other hand, because the property of the attribute applied to `NotInheritedAttribute` is `false`, it is not inherited by derived classes and the members of derived classes that override the base class method.
+
:::code language="csharp" source="~/snippets/csharp/System/AttributeUsageAttribute/Inherited/Inherited1.cs" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/System.AttributeUsageAttribute.Inherited/fs/Inherited1.fs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/System.AttributeUsageAttribute.Inherited/vb/Inherited1.vb" id="Snippet1":::
-
- The example then defines two base classes. The first, `BaseA`, has a single method, `MethodA`. The second, `BaseB`, has a single method, `MethodB`. `BaseA` and `MethodA` are tagged with the `InheritedAttribute` attribute, and `BaseB` and `MethodB` are tagged with the `NotInheritedAttribute` attribute. `DerivedA` inherits from `BaseA` and overrides its `MethodA` method. `DerivedB` inherits from `BaseB` and overrides its `MethodB` method.
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/System.AttributeUsageAttribute.Inherited/vb/Inherited1.vb" id="Snippet1":::
+
+ The example then defines two base classes. The first, `BaseA`, has a single method, `MethodA`. The second, `BaseB`, has a single method, `MethodB`. `BaseA` and `MethodA` are tagged with the `InheritedAttribute` attribute, and `BaseB` and `MethodB` are tagged with the `NotInheritedAttribute` attribute. `DerivedA` inherits from `BaseA` and overrides its `MethodA` method. `DerivedB` inherits from `BaseB` and overrides its `MethodB` method.
+
:::code language="csharp" source="~/snippets/csharp/System/AttributeUsageAttribute/Inherited/Inherited1.cs" id="Snippet2":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/System.AttributeUsageAttribute.Inherited/fs/Inherited1.fs" id="Snippet2":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/System.AttributeUsageAttribute.Inherited/vb/Inherited1.vb" id="Snippet2":::
-
- As the output from the example shows, `DerivedA` and `DerivedA.MethodA` inherit the `InheritedAttribute` attribute, but `DerivedB` and `DerivedB.MethodB` do not inherit the `NotInheritedAttribute` attribute.
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/System.AttributeUsageAttribute.Inherited/vb/Inherited1.vb" id="Snippet2":::
+
+ As the output from the example shows, `DerivedA` and `DerivedA.MethodA` inherit the `InheritedAttribute` attribute, but `DerivedB` and `DerivedB.MethodB` do not inherit the `NotInheritedAttribute` attribute.
+
]]>
diff --git a/xml/System/Base64FormattingOptions.xml b/xml/System/Base64FormattingOptions.xml
index 8ded655fe6f..119410866b4 100644
--- a/xml/System/Base64FormattingOptions.xml
+++ b/xml/System/Base64FormattingOptions.xml
@@ -51,24 +51,24 @@
Specifies whether relevant and methods insert line breaks in their output.
- and methods convert the value of an array of 8-bit unsigned integers to an equivalent string representation that consists of base 64 digits. The string representation can contain one or more line breaks, where a line break is defined as a carriage return character (U+000D) followed by a line feed character (U+000A). Because line breaks are considered white-space characters in a base-64 encoding, they are ignored when converting a base-64 encoded string back to a byte array. The line breaks are simply convenient when displaying the encoded string to a control or a device such as a console window.
-
- The `None` and `InsertLineBreaks` values are mutually exclusive. Therefore, although the `Base64FormattingOptions` enumeration is marked with the attribute, it makes no sense to perform a bitwise combination of these two values.
-
-
-
-## Examples
- The following example calls the method with a `InsertLineBreaks` argument to insert line breaks in the string that is produced by encoding a 100-element byte array:
-
+ and methods convert the value of an array of 8-bit unsigned integers to an equivalent string representation that consists of base 64 digits. The string representation can contain one or more line breaks, where a line break is defined as a carriage return character (U+000D) followed by a line feed character (U+000A). Because line breaks are considered white-space characters in a base-64 encoding, they are ignored when converting a base-64 encoded string back to a byte array. The line breaks are simply convenient when displaying the encoded string to a control or a device such as a console window.
+
+ The `None` and `InsertLineBreaks` values are mutually exclusive. Therefore, although the `Base64FormattingOptions` enumeration is marked with the attribute, it makes no sense to perform a bitwise combination of these two values.
+
+
+
+## Examples
+ The following example calls the method with a `InsertLineBreaks` argument to insert line breaks in the string that is produced by encoding a 100-element byte array:
+
:::code language="csharp" source="~/snippets/csharp/System/Base64FormattingOptions/Overview/ToBase64String3.cs" interactive="try-dotnet" id="Snippet3":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/System.Convert.ToBase64String/fs/ToBase64String3.fs" id="Snippet3":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/System.Convert.ToBase64String/vb/ToBase64String3.vb" id="Snippet3":::
-
- As the output from the example shows, the succeeds in restoring the original byte array; the line break characters are ignored during the conversion.
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/System.Convert.ToBase64String/vb/ToBase64String3.vb" id="Snippet3":::
+
+ As the output from the example shows, the succeeds in restoring the original byte array; the line break characters are ignored during the conversion.
+
]]>
diff --git a/xml/System/BinaryData.xml b/xml/System/BinaryData.xml
index 53240f33dd0..0ff9fb24c64 100644
--- a/xml/System/BinaryData.xml
+++ b/xml/System/BinaryData.xml
@@ -1170,15 +1170,15 @@
Converts the value of this instance to a string using UTF-8.
A string representation of the value of this instance.
-
diff --git a/xml/System/BitConverter.xml b/xml/System/BitConverter.xml
index 39b77afb496..c7e01314def 100644
--- a/xml/System/BitConverter.xml
+++ b/xml/System/BitConverter.xml
@@ -65,57 +65,57 @@
Converts base data types to an array of bytes, and an array of bytes to base data types.
- class helps manipulate value types in their fundamental form, as a series of bytes. A byte is defined as an 8-bit unsigned integer. The class includes static methods to convert each of the primitive types to and from an array of bytes, as the following table illustrates.
-
-|Type|To byte conversion|From byte conversion|
-|----------|------------------------|--------------------------|
-||||
-||||
-||
-or-
|
-or-
|
-||||
-||||
-||||
-||||
-||||
-||||
-||||
-
+ class helps manipulate value types in their fundamental form, as a series of bytes. A byte is defined as an 8-bit unsigned integer. The class includes static methods to convert each of the primitive types to and from an array of bytes, as the following table illustrates.
+
+|Type|To byte conversion|From byte conversion|
+|----------|------------------------|--------------------------|
+||||
+||||
+||
-or-
|
-or-
|
+||||
+||||
+||||
+||||
+||||
+||||
+||||
+
If you use methods to round-trip data, make sure that the overload and the `To`*Type* method specify the same type. As the following example illustrates, restoring an array that represents a signed integer by calling the method can result in a value that is different from the original. For more information, see [Working with Signed Non-Decimal and Bitwise Values](/archive/blogs/bclteam/working-with-signed-non-decimal-and-bitwise-values-ron-petrusha).
-
+
:::code language="csharp" source="~/snippets/csharp/System/BitConverter/Overview/example1.cs" interactive="try-dotnet" id="Snippet3":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.Class/FS/example1.fs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.BitConverter.Class/VB/example1.vb" id="Snippet3":::
-
- The order of bytes in the array returned by the method overloads (as well as the order of bits in the integer returned by the method) depends on whether the computer architecture is little-endian or big-endian. Similarly, the order of bytes in the array and returned by the `To`*IntegerValue* methods and the method depends on whether the computer architecture is little-endian or big-endian. The endianness of an architecture is indicated by the property, which returns `true` on little-endian systems and `false` on big-endian systems. On little-endian systems, lower-order bytes precede higher-order bytes. On big-endian system, higher-order bytes precede lower-order bytes. The following table illustrates the difference in the byte arrays that result from passing the integer 1,234,567,890 (0x499602D2) to the method. The bytes are listed in order from the byte at index 0 to the byte at index 3.
-
-|||
-|-|-|
-|Little-endian|D2-02-96-49|
-|Big-endian|49-96-02-D2|
-
- Because the return value of some methods depends on system architecture, be careful when transmitting byte data beyond machine boundaries:
-
-- If all systems sending and receiving data are guaranteed to have the same endianness, nothing has be done to the data.
-
-- If systems sending and receiving data can have different endianness, always transmit data in a particular order. This means that the order of bytes in the array may have to be reversed either before sending them or after receiving them. A common convention is to transmit data in network byte order (big-endian order). The following example provides an implementation for sending an integer value in network byte order.
-
+
+ The order of bytes in the array returned by the method overloads (as well as the order of bits in the integer returned by the method) depends on whether the computer architecture is little-endian or big-endian. Similarly, the order of bytes in the array and returned by the `To`*IntegerValue* methods and the method depends on whether the computer architecture is little-endian or big-endian. The endianness of an architecture is indicated by the property, which returns `true` on little-endian systems and `false` on big-endian systems. On little-endian systems, lower-order bytes precede higher-order bytes. On big-endian system, higher-order bytes precede lower-order bytes. The following table illustrates the difference in the byte arrays that result from passing the integer 1,234,567,890 (0x499602D2) to the method. The bytes are listed in order from the byte at index 0 to the byte at index 3.
+
+|||
+|-|-|
+|Little-endian|D2-02-96-49|
+|Big-endian|49-96-02-D2|
+
+ Because the return value of some methods depends on system architecture, be careful when transmitting byte data beyond machine boundaries:
+
+- If all systems sending and receiving data are guaranteed to have the same endianness, nothing has be done to the data.
+
+- If systems sending and receiving data can have different endianness, always transmit data in a particular order. This means that the order of bytes in the array may have to be reversed either before sending them or after receiving them. A common convention is to transmit data in network byte order (big-endian order). The following example provides an implementation for sending an integer value in network byte order.
+
:::code language="csharp" source="~/snippets/csharp/System/BitConverter/Overview/networkorder1.cs" interactive="try-dotnet" id="Snippet4":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.Class/FS/networkorder1.fs" id="Snippet4":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.BitConverter.Class/VB/networkorder1.vb" id="Snippet4":::
-
+
- If systems sending and receiving data can have different endianness and the data to be transmitted consists of signed integers, call the method to convert the data to network byte order and the method to convert it to the order required by the recipient.
-
-## Examples
- The following code example illustrates the use of several class methods.
-
+
+## Examples
+ The following code example illustrates the use of several class methods.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.BitConverter.Class/CPP/bitconv.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/BitConverter/Overview/bitconv.cs" interactive="try-dotnet" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.Class/FS/bitconv.fs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.BitConverter.Class/VB/bitconv.vb" id="Snippet1":::
-
+
]]>
@@ -174,14 +174,14 @@
Converts the specified double-precision floating point number to a 64-bit signed integer.
A 64-bit signed integer whose value is equivalent to .
- method depends on whether the computer architecture is little-endian or big-endian.
-
-## Examples
- The following code example converts the bit patterns of several values to values with the `DoubleToInt64Bits` method.
-
+
+## Examples
+ The following code example converts the bit patterns of several values to values with the `DoubleToInt64Bits` method.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.BitConverter.DoubleInt64/CPP/dbltobits.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System/BitConverter/DoubleToInt64Bits/dbltobits.cs" interactive="try-dotnet" id="Snippet2":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.DoubleInt64/FS/dbltobits.fs" id="Snippet2":::
@@ -293,18 +293,18 @@
Returns the specified Boolean value as a byte array.
A byte array with length 1.
- value by calling the method.
-
-## Examples
- The following example converts the bit patterns of values to arrays with the `GetBytes` method.
-
- :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.BitConverter.GetBytes.Others/CPP/bytesbool.cpp" id="Snippet1":::
- :::code language="csharp" source="~/snippets/csharp/System/BitConverter/GetBytes/bytesbool.cs" interactive="try-dotnet" id="Snippet1":::
- :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.GetBytes.Others/FS/bytesbool.fs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.BitConverter.GetBytes.Others/VB/bytesbool.vb" id="Snippet1":::
+
+## Examples
+ The following example converts the bit patterns of values to arrays with the `GetBytes` method.
+
+ :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.BitConverter.GetBytes.Others/CPP/bytesbool.cpp" id="Snippet1":::
+ :::code language="csharp" source="~/snippets/csharp/System/BitConverter/GetBytes/bytesbool.cs" interactive="try-dotnet" id="Snippet1":::
+ :::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.GetBytes.Others/FS/bytesbool.fs" id="Snippet1":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.BitConverter.GetBytes.Others/VB/bytesbool.vb" id="Snippet1":::
]]>
@@ -358,14 +358,14 @@
Returns the specified Unicode character value as an array of bytes.
An array of bytes with length 2.
- method depends on whether the computer architecture is little-endian or big-endian.
-## Examples
- The following code example converts the bit patterns of values (Unicode characters) to arrays with the `GetBytes` method.
-
+## Examples
+ The following code example converts the bit patterns of values (Unicode characters) to arrays with the `GetBytes` method.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.BitConverter.GetBytes.Others/CPP/byteschar.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System/BitConverter/GetBytes/byteschar.cs" interactive="try-dotnet" id="Snippet2":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.GetBytes.Others/FS/byteschar.fs" id="Snippet2":::
@@ -429,14 +429,14 @@
Returns the specified double-precision floating-point value as an array of bytes.
An array of bytes with length 8.
- method depends on whether the computer architecture is little-endian or big-endian.
-
-## Examples
- The following code example converts the bit patterns of values to arrays with the `GetBytes` method.
-
+
+## Examples
+ The following code example converts the bit patterns of values to arrays with the `GetBytes` method.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.BitConverter.GetBytes.Others/CPP/bytesdouble.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System/BitConverter/GetBytes/bytesdouble.cs" interactive="try-dotnet" id="Snippet4":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.GetBytes.Others/FS/bytesdouble.fs" id="Snippet4":::
@@ -536,14 +536,14 @@
Returns the specified 16-bit signed integer value as an array of bytes.
An array of bytes with length 2.
- method depends on whether the computer architecture is little-endian or big-endian.
-
-## Examples
- The following code example converts the bit patterns of values to arrays with the `GetBytes` method.
-
+
+## Examples
+ The following code example converts the bit patterns of values to arrays with the `GetBytes` method.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.BitConverter.GetBytes.SInts/CPP/bytesint16.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System/BitConverter/GetBytes/bytesint16.cs" interactive="try-dotnet" id="Snippet3":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.GetBytes.SInts/FS/bytesint16.fs" id="Snippet3":::
@@ -607,14 +607,14 @@
Returns the specified 32-bit signed integer value as an array of bytes.
An array of bytes with length 4.
- method depends on whether the computer architecture is little-endian or big-endian.
-
-## Examples
- The following code example converts the bit patterns of values to arrays with the `GetBytes` method.
-
+
+## Examples
+ The following code example converts the bit patterns of values to arrays with the `GetBytes` method.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.BitConverter.GetBytes.SInts/CPP/bytesint32.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System/BitConverter/GetBytes/bytesint32.cs" interactive="try-dotnet" id="Snippet2":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.GetBytes.SInts/FS/bytesint32.fs" id="Snippet2":::
@@ -678,14 +678,14 @@
Returns the specified 64-bit signed integer value as an array of bytes.
An array of bytes with length 8.
- method depends on whether the computer architecture is little-endian or big-endian.
-
-## Examples
- The following example calls the method to convert each element in an array to a arrays.
-
+
+## Examples
+ The following example calls the method to convert each element in an array to a arrays.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.BitConverter.GetBytes.SInts/CPP/bytesint64.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/BitConverter/GetBytes/bytesint64.cs" interactive="try-dotnet" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.GetBytes.SInts/FS/bytesint64.fs" id="Snippet1":::
@@ -749,14 +749,14 @@
Returns the specified single-precision floating point value as an array of bytes.
An array of bytes with length 4.
- method depends on whether the computer architecture is little-endian or big-endian.
-
-## Examples
- The following code example converts the bit patterns of values to arrays with the `GetBytes` method.
-
+
+## Examples
+ The following code example converts the bit patterns of values to arrays with the `GetBytes` method.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.BitConverter.GetBytes.Others/CPP/bytessingle.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System/BitConverter/GetBytes/bytessingle.cs" interactive="try-dotnet" id="Snippet3":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.GetBytes.Others/FS/bytessingle.fs" id="Snippet3":::
@@ -820,14 +820,14 @@
Returns the specified 16-bit unsigned integer value as an array of bytes.
An array of bytes with length 2.
- method depends on whether the computer architecture is little-endian or big-endian.
-
-## Examples
- The following code example converts the bit patterns of values to arrays with the `GetBytes` method.
-
+
+## Examples
+ The following code example converts the bit patterns of values to arrays with the `GetBytes` method.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.BitConverter.GetBytes.UInts/CPP/bytesuint16.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System/BitConverter/GetBytes/bytesuint16.cs" interactive="try-dotnet" id="Snippet3":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.GetBytes.UInts/FS/bytesuint16.fs" id="Snippet3":::
@@ -891,14 +891,14 @@
Returns the specified 32-bit unsigned integer value as an array of bytes.
An array of bytes with length 4.
- method depends on whether the computer architecture is little-endian or big-endian.
-
-## Examples
- The following code example converts the bit patterns of values to arrays with the `GetBytes` method.
-
+
+## Examples
+ The following code example converts the bit patterns of values to arrays with the `GetBytes` method.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.BitConverter.GetBytes.UInts/CPP/bytesuint32.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System/BitConverter/GetBytes/bytesuint32.cs" interactive="try-dotnet" id="Snippet2":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.GetBytes.UInts/FS/bytesuint32.fs" id="Snippet2":::
@@ -962,14 +962,14 @@
Returns the specified 64-bit unsigned integer value as an array of bytes.
An array of bytes with length 8.
- method depends on whether the computer architecture is little-endian or big-endian.
-
-## Examples
- The following code example converts the bit patterns of values to arrays with the `GetBytes` method.
-
+
+## Examples
+ The following code example converts the bit patterns of values to arrays with the `GetBytes` method.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.BitConverter.GetBytes.UInts/CPP/bytesuint64.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/BitConverter/GetBytes/bytesuint64.cs" interactive="try-dotnet" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.GetBytes.UInts/FS/bytesuint64.fs" id="Snippet1":::
@@ -1188,19 +1188,19 @@
Reinterprets the specified 64-bit signed integer to a double-precision floating point number.
A double-precision floating point number whose value is equivalent to .
- method.
-
-## Examples
- The following code example converts the bit patterns of several values to values with the `Int64BitsToDouble` method.
-
+
+## Examples
+ The following code example converts the bit patterns of several values to values with the `Int64BitsToDouble` method.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.BitConverter.DoubleInt64/CPP/bitstodbl.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/BitConverter/DoubleToInt64Bits/bitstodbl.cs" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.DoubleInt64/FS/bitstodbl.fs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.BitConverter.DoubleInt64/VB/bitstodbl.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.BitConverter.DoubleInt64/VB/bitstodbl.vb" id="Snippet1":::
+
]]>
@@ -1248,17 +1248,17 @@
Indicates the byte order ("endianness") in which data is stored in this computer architecture.
- [!NOTE]
> You can convert from network byte order to the byte order of the host computer without retrieving the value of the field by passing a 16-bit, 32-bit, or 64 bit integer to the method.
-
-## Examples
- The following code example illustrates the use of the `IsLittleEndian` field.
-
+
+## Examples
+ The following code example illustrates the use of the `IsLittleEndian` field.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.BitConverter.Class/CPP/littleend.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System/BitConverter/Overview/littleend.cs" interactive="try-dotnet" id="Snippet2":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.Class/FS/littleend.fs" id="Snippet2":::
@@ -1448,19 +1448,19 @@
if the byte at in is nonzero; otherwise, .
- value to its byte representation, call the method.
-
-## Examples
- The following code example converts elements of arrays to values with the `ToBoolean` method.
-
+
+## Examples
+ The following code example converts elements of arrays to values with the `ToBoolean` method.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.BitConverter.ToXXX.Others/CPP/batobool.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToBoolean/batobool.cs" interactive="try-dotnet" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.ToXXX.Others/FS/batobool.fs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.BitConverter.ToXXX.Others/VB/batobool.vb" id="Snippet1":::
-
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.BitConverter.ToXXX.Others/VB/batobool.vb" id="Snippet1":::
+
]]>
@@ -1566,19 +1566,19 @@
Returns a Unicode character converted from two bytes at a specified position in a byte array.
The character formed by two bytes beginning at .
- method converts the bytes from index `startIndex` to `startIndex` + 1 to a value. The order of bytes in the array must reflect the endianness of the computer system's architecture. For more information, see the Remarks section of the class topic.
-
-## Examples
- The following code example converts elements of arrays to values (Unicode characters) with the `ToChar` method.
-
+
+## Examples
+ The following code example converts elements of arrays to values (Unicode characters) with the `ToChar` method.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.BitConverter.ToXXX.Others/CPP/batochar.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToBoolean/batochar.cs" interactive="try-dotnet" id="Snippet2":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.ToXXX.Others/FS/batochar.fs" id="Snippet2":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.BitConverter.ToXXX.Others/VB/batochar.vb" id="Snippet2":::
-
+
]]>
@@ -1692,19 +1692,19 @@
Returns a double-precision floating point number converted from eight bytes at a specified position in a byte array.
A double-precision floating point number formed by eight bytes beginning at .
- method converts the bytes from index `startIndex` to `startIndex` + 7 to a value. The order of bytes in the array must reflect the endianness of the computer system's architecture. For more information, see the Remarks section of the class topic.
-
-## Examples
- The following code example converts elements of arrays to values with the `ToDouble` method.
-
+
+## Examples
+ The following code example converts elements of arrays to values with the `ToDouble` method.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.BitConverter.ToXXX.Others/CPP/batodouble.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToBoolean/batodouble.cs" interactive="try-dotnet" id="Snippet3":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.ToXXX.Others/FS/batodouble.fs" id="Snippet3":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.BitConverter.ToXXX.Others/VB/batodouble.vb" id="Snippet3":::
-
+
]]>
@@ -1905,14 +1905,14 @@
Returns a 16-bit signed integer converted from two bytes at a specified position in a byte array.
A 16-bit signed integer formed by two bytes beginning at .
- method converts the bytes from index `startIndex` to `startIndex` + 1 to an value. The order of bytes in the array must reflect the endianness of the computer system's architecture. For more information, see the Remarks section of the class topic.
-
-## Examples
- The following code example converts elements of arrays to values with the `ToInt16` method.
-
+
+## Examples
+ The following code example converts elements of arrays to values with the `ToInt16` method.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.BitConverter.ToXXX.SInts/CPP/batoint16.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToInt16/batoint16.cs" interactive="try-dotnet" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.ToXXX.SInts/FS/batoint16.fs" id="Snippet1":::
@@ -2031,14 +2031,14 @@
Returns a 32-bit signed integer converted from four bytes at a specified position in a byte array.
A 32-bit signed integer formed by four bytes beginning at .
- method converts the bytes from index `startIndex` to `startIndex` + 3 to an value. The order of bytes in the array must reflect the endianness of the computer system's architecture. For more information, see the Remarks section of .
-
-## Examples
- The following example uses the method to create values from a four-byte array and from the upper four bytes of an eight-byte array. It also uses the and methods to round-trip an value.
-
+
+## Examples
+ The following example uses the method to create values from a four-byte array and from the upper four bytes of an eight-byte array. It also uses the and methods to round-trip an value.
+
:::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToInt32/toint32.cs" interactive="try-dotnet" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.bitconverter.toint32/fs/toint32.fs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.bitconverter.toint32/vb/toint32.vb" id="Snippet1":::
@@ -2156,14 +2156,14 @@
Returns a 64-bit signed integer converted from eight bytes at a specified position in a byte array.
A 64-bit signed integer formed by eight bytes beginning at .
- method converts the bytes from index `startIndex` to `startIndex` + 7 to a value. The order of bytes in the array must reflect the endianness of the computer system's architecture. For more information, see the Remarks section of the class topic.
-
-## Examples
- The following code example converts elements of arrays to values with the `ToInt64` method.
-
+
+## Examples
+ The following code example converts elements of arrays to values with the `ToInt64` method.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.BitConverter.ToXXX.SInts/CPP/batoint64.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToInt16/batoint64.cs" interactive="try-dotnet" id="Snippet3":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.ToXXX.SInts/FS/batoint64.fs" id="Snippet3":::
@@ -2282,14 +2282,14 @@
Returns a single-precision floating point number converted from four bytes at a specified position in a byte array.
A single-precision floating point number formed by four bytes beginning at .
- method converts the bytes from index `startIndex` to `startIndex` + 3 to a value. The order of bytes in the array must reflect the endianness of the computer system's architecture. For more information, see the Remarks section of .
-
-## Examples
- The following code example converts elements of arrays to values with the `ToSingle` method.
-
+
+## Examples
+ The following code example converts elements of arrays to values with the `ToSingle` method.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.BitConverter.ToXXX.Others/CPP/batosingle.cpp" id="Snippet4":::
:::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToBoolean/batosingle.cs" interactive="try-dotnet" id="Snippet4":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.ToXXX.Others/FS/batosingle.fs" id="Snippet4":::
@@ -2365,14 +2365,14 @@
Converts the numeric value of each element of a specified array of bytes to its equivalent hexadecimal string representation.
A string of hexadecimal pairs separated by hyphens, where each pair represents the corresponding element in ; for example, "7F-2C-4A-00".
- arrays to objects with the `ToString` method.
-
+
+## Examples
+ The following code example converts arrays to objects with the `ToString` method.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.BitConverter.ToString/CPP/batostring.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToString/batostring.cs" interactive="try-dotnet" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.ToString/FS/batostring.fs" id="Snippet1":::
@@ -2433,14 +2433,14 @@
Converts the numeric value of each element of a specified subarray of bytes to its equivalent hexadecimal string representation.
A string of hexadecimal pairs separated by hyphens, where each pair represents the corresponding element in a subarray of ; for example, "7F-2C-4A-00".
- array starting at the specified `startIndex` to a with the `ToString` method.
-
+
+## Examples
+ The following code example converts the part of a array starting at the specified `startIndex` to a with the `ToString` method.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.BitConverter.ToString/CPP/batostringii.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToString/batostringii.cs" interactive="try-dotnet" id="Snippet2":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.ToString/FS/batostringii.fs" id="Snippet2":::
@@ -2505,29 +2505,29 @@
Converts the numeric value of each element of a specified subarray of bytes to its equivalent hexadecimal string representation.
A string of hexadecimal pairs separated by hyphens, where each pair represents the corresponding element in a subarray of ; for example, "7F-2C-4A-00".
- .
-
-## Examples
- The following example uses the method to convert part of a byte array, starting at the specified `startIndex` and with the specified `length`, to a string.
-
+
+## Examples
+ The following example uses the method to convert part of a byte array, starting at the specified `startIndex` and with the specified `length`, to a string.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.BitConverter.ToString/CPP/batostringii.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToString/batostringii.cs" interactive="try-dotnet" id="Snippet2":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.ToString/FS/batostringii.fs" id="Snippet2":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.BitConverter.ToString/VB/batostringii.vb" id="Snippet2":::
+ :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.BitConverter.ToString/VB/batostringii.vb" id="Snippet2":::
]]>
is .
- or is less than zero.
-
- -or-
-
- is greater than zero and is greater than or equal to the length of .
+ or is less than zero.
+
+-or-
+
+ is greater than zero and is greater than or equal to the length of .
The combination of and does not specify a position within ; that is, the parameter is greater than the length of minus the parameter.
@@ -2637,14 +2637,14 @@
Returns a 16-bit unsigned integer converted from two bytes at a specified position in a byte array.
A 16-bit unsigned integer formed by two bytes beginning at .
- method converts the bytes from index `startIndex` to `startIndex` + 1 to a value. The order of bytes in the array must reflect the endianness of the computer system's architecture. For more information, see the Remarks section of the class topic.
-
-## Examples
- The following code example converts elements of arrays to values with the `ToUInt16` method.
-
+
+## Examples
+ The following code example converts elements of arrays to values with the `ToUInt16` method.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.BitConverter.ToXXX.UInts/CPP/batouint16.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToUInt16/batouint16.cs" interactive="try-dotnet" id="Snippet1":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.ToXXX.UInts/FS/batouint16.fs" id="Snippet1":::
@@ -2767,14 +2767,14 @@
Returns a 32-bit unsigned integer converted from four bytes at a specified position in a byte array.
A 32-bit unsigned integer formed by four bytes beginning at .
- method converts the bytes from index `startIndex` to `startIndex` + 3 to a value. The order of bytes in the array must reflect the endianness of the computer system's architecture. For more information, see the Remarks section of the class topic.
-
-## Examples
- The following code example converts elements of arrays to values with the `ToUInt32` method.
-
+
+## Examples
+ The following code example converts elements of arrays to values with the `ToUInt32` method.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.BitConverter.ToXXX.UInts/CPP/batouint32.cpp" id="Snippet2":::
:::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToUInt16/batouint32.cs" interactive="try-dotnet" id="Snippet2":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.ToXXX.UInts/FS/batouint32.fs" id="Snippet2":::
@@ -2897,14 +2897,14 @@
Returns a 64-bit unsigned integer converted from eight bytes at a specified position in a byte array.
A 64-bit unsigned integer formed by the eight bytes beginning at .
- method converts the bytes from index `startIndex` to `startIndex` + 7 to a value. The order of bytes in the array must reflect the endianness of the computer system's architecture. For more information, see the Remarks section of the class topic.
-
-## Examples
- The following code example converts elements of arrays to values with the `ToUInt64` method.
-
+
+## Examples
+ The following code example converts elements of arrays to values with the `ToUInt64` method.
+
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.BitConverter.ToXXX.UInts/CPP/batouint64.cpp" id="Snippet3":::
:::code language="csharp" source="~/snippets/csharp/System/BitConverter/ToUInt16/batouint64.cs" interactive="try-dotnet" id="Snippet3":::
:::code language="fsharp" source="~/snippets/fsharp/VS_Snippets_CLR_System/system.BitConverter.ToXXX.UInts/FS/batouint64.fs" id="Snippet3":::
diff --git a/xml/System/Boolean.xml b/xml/System/Boolean.xml
index 357cc9adc99..622716c5b50 100644
--- a/xml/System/Boolean.xml
+++ b/xml/System/Boolean.xml
@@ -97,165 +97,165 @@
Represents a Boolean ( or ) value.
- instance can have either of two values: `true` or `false`.
-
- The structure provides methods that support the following tasks:
-
-- Converting Boolean values to strings:
-
-- Parsing strings to convert them to Boolean values: and
-
-- Comparing values: and
-
- The following sections explain these tasks and other usage details:
-
-- [Format Boolean values](#Formatting)
-- [Convert to and from Boolean values](#Converting)
-- [Parse Boolean values](#Parsing)
-- [Compare Boolean values](#Comparing)
-- [Work with Booleans as binary values](#Binary)
-- [Perform operations with Boolean values](#Operations)
-- [Booleans and Interop](#Interop)
-
-
-## Format Boolean values
- The string representation of a is either "True" for a `true` value or "False" for a `false` value. The string representation of a value is defined by the read-only and fields.
-
- You use the method to convert Boolean values to strings. The Boolean structure includes two overloads: the parameterless method and the method, which includes a parameter that controls formatting. However, because this parameter is ignored, the two overloads produce identical strings. The method does not support culture-sensitive formatting.
-
- The following example illustrates formatting with the method. Note that the C# and VB examples use the [composite formatting](/dotnet/standard/base-types/composite-formatting) feature, while the F# example uses [string interpolation](/dotnet/fsharp/language-reference/interpolated-strings). In both cases the method is called implicitly.
- :::code language="csharp" source="~/snippets/csharp/System/Boolean/Overview/tostring1.cs" interactive="try-dotnet" id="Snippet3":::
- :::code language="fsharp" source="~/snippets/fsharp/System/Boolean/Overview/tostring1.fs" id="Snippet3":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.boolean.structure/vb/tostring1.vb" id="Snippet3":::
-
- Because the structure can have only two values, it is easy to add custom formatting. For simple custom formatting in which other string literals are substituted for "True" and "False", you can use any conditional evaluation feature supported by your language, such as the [conditional operator](/dotnet/csharp/language-reference/operators/conditional-operator) in C# or the [If operator](/dotnet/visual-basic/language-reference/operators/if-operator) in Visual Basic. The following example uses this technique to format values as "Yes" and "No" rather than "True" and "False".
-
- :::code language="csharp" source="~/snippets/csharp/System/Boolean/Overview/tostring2.cs" interactive="try-dotnet" id="Snippet4":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.boolean.structure/vb/tostring2.vb" id="Snippet4":::
- :::code language="fsharp" source="~/snippets/fsharp/System/Boolean/Overview/tostring2.fs" id="Snippet4":::
-
- For more complex custom formatting operations, including culture-sensitive formatting, you can call the method and provide an implementation. The following example implements the and interfaces to provide culture-sensitive Boolean strings for the English (United States), French (France), and Russian (Russia) cultures.
-
- :::code language="csharp" source="~/snippets/csharp/System/Boolean/Overview/format3.cs" interactive="try-dotnet" id="Snippet5":::
- :::code language="fsharp" source="~/snippets/fsharp/System/Boolean/Overview/format3.fs" id="Snippet5":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.boolean.structure/vb/format3.vb" id="Snippet5":::
-
- Optionally, you can use [resource files](/dotnet/framework/resources/) to define culture-specific Boolean strings.
-
-
-## Convert to and from Boolean values
- The structure implements the interface. As a result, you can use the class to perform conversions between a value and any other primitive type in .NET, or you can call the structure's explicit implementations. However, conversions between a and the following types are not supported, so the corresponding conversion methods throw an exception:
-
-- Conversion between and (the and methods)
-
-- Conversion between and (the and methods)
-
- All conversions from integral or floating-point numbers to Boolean values convert non-zero values to `true` and zero values to `false`. The following example illustrates this by calling selected overloads of the class.
-
- :::code language="csharp" source="~/snippets/csharp/System/Boolean/Overview/conversion1.cs" interactive="try-dotnet" id="Snippet6":::
- :::code language="fsharp" source="~/snippets/fsharp/System/Boolean/Overview/conversion1.fs" id="Snippet6":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.boolean.structure/vb/conversion1.vb" id="Snippet6":::
-
- When converting from Boolean to numeric values, the conversion methods of the class convert `true` to 1 and `false` to 0. However, Visual Basic conversion functions convert `true` to either 255 (for conversions to values) or -1 (for all other numeric conversions). The following example converts `true` to numeric values by using a method, and, in the case of the Visual Basic example, by using the Visual Basic language's own conversion operator.
-
- :::code language="csharp" source="~/snippets/csharp/System/Boolean/Overview/conversion3.cs" interactive="try-dotnet" id="Snippet8":::
- :::code language="fsharp" source="~/snippets/fsharp/System/Boolean/Overview/conversion3.fs" id="Snippet8":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.boolean.structure/vb/conversion3.vb" id="Snippet8":::
-
- For conversions from to string values, see the [Formatting Boolean Values](#Formatting) section. For conversions from strings to values, see the [Parsing Boolean Values](#Parsing) section.
-
-
-## Parse Boolean values
- The structure includes two static parsing methods, and , that convert a string to a Boolean value. The string representation of a Boolean value is defined by the case-insensitive equivalents of the values of the and fields, which are "True" and "False", respectively. In other words, the only strings that parse successfully are "True", "False", "true", "false", or some mixed-case equivalent. You cannot successfully parse numeric strings such as "0" or "1". Leading or trailing white-space characters are not considered when performing the string comparison.
-
- The following example uses the and methods to parse a number of strings. Note that only the case-insensitive equivalents of "True" and "False" can be successfully parsed.
-
- :::code language="csharp" source="~/snippets/csharp/System/Boolean/Overview/parse2.cs" interactive="try-dotnet" id="Snippet2":::
- :::code language="fsharp" source="~/snippets/fsharp/System/Boolean/Overview/parse2.fs" id="Snippet2":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.boolean.structure/vb/parse2.vb" id="Snippet2":::
-
- If you are programming in Visual Basic, you can use the `CBool` function to convert the string representation of a number to a Boolean value. "0" is converted to `false`, and the string representation of any non-zero value is converted to `true`. If you are not programming in Visual Basic, you must convert your numeric string to a number before converting it to a Boolean. The following example illustrates this by converting an array of integers to Boolean values.
-
- :::code language="csharp" source="~/snippets/csharp/System/Boolean/Overview/parse3.cs" interactive="try-dotnet" id="Snippet9":::
- :::code language="fsharp" source="~/snippets/fsharp/System/Boolean/Overview/parse3.fs" id="Snippet9":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.boolean.structure/vb/parse3.vb" id="Snippet9":::
-
-
-## Compare Boolean values
- Because Boolean values are either `true` or `false`, there is little reason to explicitly call the method, which indicates whether an instance is greater than, less than, or equal to a specified value. Typically, to compare two Boolean variables, you call the method or use your language's equality operator.
-
- However, when you want to compare a Boolean variable with the literal Boolean value `true` or `false`, it is not necessary to do an explicit comparison, because the result of evaluating a Boolean value is that Boolean value. For example, the expressions
-
- :::code language="csharp" source="~/snippets/csharp/System/Boolean/Overview/operations1.cs" id="Snippet11":::
- :::code language="fsharp" source="~/snippets/fsharp/System/Boolean/Overview/operations1.fs" id="Snippet11":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.boolean.structure/vb/operations1.vb" id="Snippet11":::
-
- and
-
- :::code language="csharp" source="~/snippets/csharp/System/Boolean/Overview/operations1.cs" id="Snippet12":::
- :::code language="fsharp" source="~/snippets/fsharp/System/Boolean/Overview/operations1.fs" id="Snippet12":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.boolean.structure/vb/operations1.vb" id="Snippet12":::
-
- are equivalent, but the second is more compact. However, both techniques offer comparable performance.
-
-
-## Work with Booleans as binary values
- A Boolean value occupies one byte of memory, as the following C# or F# example shows. The C# example must be compiled with the `/unsafe` switch.
-
- :::code language="csharp" source="~/snippets/csharp/System/Boolean/Overview/size1.cs" id="Snippet14":::
- :::code language="fsharp" source="~/snippets/fsharp/System/Boolean/Overview/size1.fs" id="Snippet14":::
-
- The byte's low-order bit is used to represent its value. A value of 1 represents `true`; a value of 0 represents `false`.
-
-> [!TIP]
-> You can use the structure to work with sets of Boolean values.
-
- You can convert a Boolean value to its binary representation by calling the method. The method returns a byte array with a single element. To restore a Boolean value from its binary representation, you can call the method.
-
- The following example calls the method to convert a Boolean value to its binary representation and displays the individual bits of the value, and then calls the method to restore the value from its binary representation.
-
- :::code language="csharp" source="~/snippets/csharp/System/Boolean/Overview/binary1.cs" interactive="try-dotnet" id="Snippet1":::
- :::code language="fsharp" source="~/snippets/fsharp/System/Boolean/Overview/binary1.fs" id="Snippet1":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.boolean.structure/vb/binary1.vb" id="Snippet1":::
-
-
-## Perform operations with Boolean values
- This section illustrates how Boolean values are used in apps. The first section discusses its use as a flag. The second illustrates its use for arithmetic operations.
-
-### Boolean values as flags
- Boolean variables are most commonly used as flags, to signal the presence or absence of some condition. For example, in the method, the final parameter, `ignoreCase`, is a flag that indicates whether the comparison of two strings is case-insensitive (`ignoreCase` is `true`) or case-sensitive (`ignoreCase` is `false`). The value of the flag can then be evaluated in a conditional statement.
-
- The following example uses a simple console app to illustrate the use of Boolean variables as flags. The app accepts command-line parameters that enable output to be redirected to a specified file (the `/f` switch), and that enable output to be sent both to a specified file and to the console (the `/b` switch). The app defines a flag named `isRedirected` to indicate whether output is to be sent to a file, and a flag named `isBoth` to indicate that output should be sent to the console. Note that the F# example uses a [recursive function](/dotnet/fsharp/language-reference/functions/recursive-functions-the-rec-keyword) to parse the arguments.
-
- :::code language="csharp" source="~/snippets/csharp/System/Boolean/Overview/operations1.cs" id="Snippet10":::
- :::code language="fsharp" source="~/snippets/fsharp/System/Boolean/Overview/operations1.fs" id="Snippet10":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.boolean.structure/vb/operations1.vb" id="Snippet10":::
-
-### Booleans and arithmetic operations
- A Boolean value is sometimes used to indicate the presence of a condition that triggers a mathematical calculation. For example, a `hasShippingCharge` variable might serve as a flag to indicate whether to add shipping charges to an invoice amount.
-
- Because an operation with a `false` value has no effect on the result of an operation, it is not necessary to convert the Boolean to an integral value to use in the mathematical operation. Instead, you can use conditional logic.
-
- The following example computes an amount that consists of a subtotal, a shipping charge, and an optional service charge. The `hasServiceCharge` variable determines whether the service charge is applied. Instead of converting `hasServiceCharge` to a numeric value and multiplying it by the amount of the service charge, the example uses conditional logic to add the service charge amount if it is applicable.
-
- :::code language="csharp" source="~/snippets/csharp/System/Boolean/Overview/operations2.cs" id="Snippet13":::
- :::code language="fsharp" source="~/snippets/fsharp/System/Boolean/Overview/operations2.fs" id="Snippet13":::
- :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.boolean.structure/vb/operations2.vb" id="Snippet13":::
-
-
-### Booleans and interop
- While marshaling base data types to COM is generally straightforward, the data type is an exception. You can apply the attribute to marshal the type to any of the following representations:
-
-|Enumeration type|Unmanaged format|
-|----------------------|----------------------|
-||A 4-byte integer value, where any nonzero value represents `true` and 0 represents `false`. This is the default format of a field in a structure and of a parameter in platform invoke calls.|
-||A 1-byte integer value, where the 1 represents `true` and 0 represents `false`.|
-||A 2-byte integer value, where -1 represents `true` and 0 represents `false`. This is the default format of a parameter in COM interop calls.|
-
+ instance can have either of two values: `true` or `false`.
+
+ The structure provides methods that support the following tasks:
+
+- Converting Boolean values to strings:
+
+- Parsing strings to convert them to Boolean values: and
+
+- Comparing values: and
+
+ The following sections explain these tasks and other usage details:
+
+- [Format Boolean values](#Formatting)
+- [Convert to and from Boolean values](#Converting)
+- [Parse Boolean values](#Parsing)
+- [Compare Boolean values](#Comparing)
+- [Work with Booleans as binary values](#Binary)
+- [Perform operations with Boolean values](#Operations)
+- [Booleans and Interop](#Interop)
+
+
+## Format Boolean values
+ The string representation of a is either "True" for a `true` value or "False" for a `false` value. The string representation of a value is defined by the read-only and fields.
+
+ You use the method to convert Boolean values to strings. The Boolean structure includes two overloads: the parameterless