diff --git a/xml/System.Linq.Expressions/BinaryExpression.xml b/xml/System.Linq.Expressions/BinaryExpression.xml index 165f93fdfc1..fce8589fb94 100644 --- a/xml/System.Linq.Expressions/BinaryExpression.xml +++ b/xml/System.Linq.Expressions/BinaryExpression.xml @@ -121,7 +121,7 @@ nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . + This default implementation for nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . ]]> @@ -331,7 +331,7 @@ is `true`, the operator returns a nullable type, and if a nullable operand evaluates to `null`, the operator returns `null`. + An operator call is lifted if the operator expects non-nullable operands but nullable operands are passed to it. If the value of is `true`, the operator returns a nullable type, and if a nullable operand evaluates to `null`, the operator returns `null`. ]]> diff --git a/xml/System.Linq.Expressions/BlockExpression.xml b/xml/System.Linq.Expressions/BlockExpression.xml index d3c6319b30c..20b4f7d964b 100644 --- a/xml/System.Linq.Expressions/BlockExpression.xml +++ b/xml/System.Linq.Expressions/BlockExpression.xml @@ -58,19 +58,19 @@ Represents a block that contains a sequence of expressions where variables can be defined. - methods can be used to create a . - - - -## Examples - The following code example shows how to create a block expression. The block expression consists of two objects and one object. - + methods can be used to create a . + + + +## Examples + The following code example shows how to create a block expression. The block expression consists of two objects and one object. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet13"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet13"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet13"::: + ]]> @@ -120,11 +120,11 @@ Dispatches to the specific visit method for this node type. For example, calls the . The result of visiting this node. - nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . - + nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . + ]]> diff --git a/xml/System.Linq.Expressions/CatchBlock.xml b/xml/System.Linq.Expressions/CatchBlock.xml index 8ccb9293597..a232cb62dac 100644 --- a/xml/System.Linq.Expressions/CatchBlock.xml +++ b/xml/System.Linq.Expressions/CatchBlock.xml @@ -58,11 +58,11 @@ Represents a catch statement in a try block. - methods can be used to create a . - + methods can be used to create a . + ]]> diff --git a/xml/System.Linq.Expressions/ConditionalExpression.xml b/xml/System.Linq.Expressions/ConditionalExpression.xml index 69c0d5f7ba9..ba9014afb12 100644 --- a/xml/System.Linq.Expressions/ConditionalExpression.xml +++ b/xml/System.Linq.Expressions/ConditionalExpression.xml @@ -63,21 +63,21 @@ Represents an expression that has a conditional operator. - factory method to create a . - - The of a is . - - - -## Examples - The following code example shows how to create an expression that represents a conditional statement. If the first argument evaluates to `true`, the second argument is executed; otherwise, the third argument is executed. - + factory method to create a . + + The of a is . + + + +## Examples + The following code example shows how to create an expression that represents a conditional statement. If the first argument evaluates to `true`, the second argument is executed; otherwise, the third argument is executed. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet3"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet3"::: + ]]> @@ -127,11 +127,11 @@ Dispatches to the specific visit method for this node type. For example, calls the . The result of visiting this node. - nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . - + nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . + ]]> diff --git a/xml/System.Linq.Expressions/ConstantExpression.xml b/xml/System.Linq.Expressions/ConstantExpression.xml index 4e3d6eed902..fe36a28b634 100644 --- a/xml/System.Linq.Expressions/ConstantExpression.xml +++ b/xml/System.Linq.Expressions/ConstantExpression.xml @@ -63,21 +63,21 @@ Represents an expression that has a constant value. - factory methods to create a . - - The of a is . - - - -## Examples - The following code example shows how to create an expression that represents a constant value by using the method. - + factory methods to create a . + + The of a is . + + + +## Examples + The following code example shows how to create an expression that represents a constant value by using the method. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet4"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet4"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet4"::: + ]]> @@ -127,11 +127,11 @@ Dispatches to the specific visit method for this node type. For example, calls the . The result of visiting this node. - nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . - + nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . + ]]> diff --git a/xml/System.Linq.Expressions/DebugInfoExpression.xml b/xml/System.Linq.Expressions/DebugInfoExpression.xml index 6ba8aef45ae..0d1f54e828c 100644 --- a/xml/System.Linq.Expressions/DebugInfoExpression.xml +++ b/xml/System.Linq.Expressions/DebugInfoExpression.xml @@ -105,11 +105,11 @@ Dispatches to the specific visit method for this node type. For example, calls the . The result of visiting this node. - nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . - + nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . + ]]> diff --git a/xml/System.Linq.Expressions/DefaultExpression.xml b/xml/System.Linq.Expressions/DefaultExpression.xml index 8d3cd9c4080..82c11d21c78 100644 --- a/xml/System.Linq.Expressions/DefaultExpression.xml +++ b/xml/System.Linq.Expressions/DefaultExpression.xml @@ -58,14 +58,14 @@ Represents the default value of a type or an empty expression. - method. - + method. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet6"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet6"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet6"::: + ]]> diff --git a/xml/System.Linq.Expressions/DynamicExpression.xml b/xml/System.Linq.Expressions/DynamicExpression.xml index 106f6267d91..944eb47b568 100644 --- a/xml/System.Linq.Expressions/DynamicExpression.xml +++ b/xml/System.Linq.Expressions/DynamicExpression.xml @@ -137,7 +137,7 @@ nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . + This default implementation for nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . ]]> diff --git a/xml/System.Linq.Expressions/Expression.xml b/xml/System.Linq.Expressions/Expression.xml index 473ff427daf..c6bea077ec0 100644 --- a/xml/System.Linq.Expressions/Expression.xml +++ b/xml/System.Linq.Expressions/Expression.xml @@ -232,7 +232,7 @@ nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . + This default implementation for nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . ]]> @@ -862,7 +862,7 @@ The following code example shows how to create an expression that adds two integ has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -958,7 +958,7 @@ The following code example shows how to create an expression that adds two integ has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -1067,7 +1067,7 @@ The following code example shows how to create an expression that adds two integ has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -1171,7 +1171,7 @@ The following code example shows how to create an expression that adds two integ has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -1280,7 +1280,7 @@ The following code example shows how to create an expression that adds two integ has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -1393,7 +1393,7 @@ The following code example shows how to create an expression that adds two integ has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -1712,7 +1712,7 @@ The following code example shows how to create an expression that adds two integ method, or through or . + The expression that represents the array can be obtained by using the method, or through or . @@ -1788,9 +1788,9 @@ The following code example shows how to create an expression that adds two integ method, or through or . + The expression that represents the array can be obtained by using the method, or through or . - For multidimensional arrays, use the method. + For multidimensional arrays, use the method. @@ -1867,7 +1867,7 @@ The following code example shows how to create an expression that adds two integ equal to . The property of `array` must represent an array type whose rank matches the number of elements in `indexes`. + Each element of `indexes` must have equal to . The property of `array` must represent an array type whose rank matches the number of elements in `indexes`. If the rank of `array`.Type is 1, this method returns a . The property is set to `array` and the property is set to the single element of `indexes`. The property of the represents the element type of `array`.Type. @@ -1876,7 +1876,7 @@ The following code example shows how to create an expression that adds two integ ## Examples - The following example demonstrates how to use the method to create a that represents indexing into a two-dimensional array. + The following example demonstrates how to use the method to create a that represents indexing into a two-dimensional array. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet3"::: @@ -1950,7 +1950,7 @@ The following code example shows how to create an expression that adds two integ ## Remarks `index` must represent an index of type . - The property of the resulting is `null`, and both and are set to `false`. The property is equal to the element type of `array`.Type. The property is `null`. + The property of the resulting is `null`, and both and are set to `false`. The property is equal to the element type of `array`.Type. The property is `null`. ]]> @@ -2026,7 +2026,7 @@ The following code example shows how to create an expression that adds two integ equal to . The property of `array` must represent an array type whose rank matches the number of elements in `indexes`. + Each element of `indexes` must have equal to . The property of `array` must represent an array type whose rank matches the number of elements in `indexes`. If the rank of `array`.Type is 1, this method returns a . The property is set to `array` and the property is set to the single element of `indexes`. The property of the represents the element type of `array`.Type. @@ -2035,7 +2035,7 @@ The following code example shows how to create an expression that adds two integ ## Examples - The following example demonstrates how to use the method to create a that represents indexing into a two-dimensional array. + The following example demonstrates how to use the method to create a that represents indexing into a two-dimensional array. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet3"::: @@ -2107,7 +2107,7 @@ The following code example shows how to create an expression that adds two integ ## Remarks The property of `array` must represent an array type. - The property of the resulting is equal to . The property is `null`, and both and are set to `false`. + The property of the resulting is equal to . The property is `null`, and both and are set to `false`. ]]> @@ -2244,7 +2244,7 @@ The following code example shows how to create an expression that adds two integ property of `expression` must be assignable to the type represented by the or property of `member`. + The property of `expression` must be assignable to the type represented by the or property of `member`. ]]> @@ -3141,7 +3141,7 @@ The following code example shows how to create an expression that adds two integ object that uses the method. + The following example demonstrates how to create an expression that contains a object that uses the method. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet44"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet44"::: @@ -3705,7 +3705,7 @@ The following code example shows how to create an expression that adds two integ instead. + To represent a call to a `static` (`Shared` in Visual Basic) method, pass in `null` for the `instance` parameter when you call this method, or call instead. If `method` represents an instance method, the property of `instance` must be assignable to the declaring type of the method represented by `method`. @@ -3810,7 +3810,7 @@ The following code example shows how to create an expression that adds two integ instead. + To represent a call to a `static` (`Shared` in Visual Basic) method, pass in `null` for the `instance` parameter when you call this method, or call instead. If `method` represents an instance method, the property of `instance` must be assignable to the declaring type of the method represented by `method`. @@ -4567,7 +4567,7 @@ The following code example shows how to create an expression that adds two integ of to be caught can be specified but no reference to the object will be available for use in the . + The of to be caught can be specified but no reference to the object will be available for use in the . ]]> @@ -4813,7 +4813,7 @@ The following code example shows how to create an expression that adds two integ property of the resulting is `null` and both and are set to `false`. The property is equal to the result type of the coalescing operation. The property is `null`. + The property of the resulting is `null` and both and are set to `false`. The property is equal to the result type of the coalescing operation. The property is `null`. #### Result Type The following rules determine the result type: @@ -4895,7 +4895,7 @@ The following code example shows how to create an expression that adds two integ property of the resulting is `null` and both and are set to `false`. + The property of the resulting is `null` and both and are set to `false`. The property of the resulting is equal to the result type of the coalescing operation. @@ -5146,9 +5146,9 @@ The following code example shows how to create an expression that adds two integ property of the resulting is equal to the type of `value`. If `value` is `null`, is equal to . + The property of the resulting is equal to the type of `value`. If `value` is `null`, is equal to . - To represent `null`, you can also use the method, with which you can explicitly specify the type. + To represent `null`, you can also use the method, with which you can explicitly specify the type. @@ -5299,7 +5299,7 @@ The following code example shows how to create an expression that adds two integ method. + The following example demonstrates how to create a loop expression that uses the method. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet46"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet46"::: @@ -5432,7 +5432,7 @@ The following code example shows how to create an expression that adds two integ property of the resulting is set to the implementing method. The property is `false`. If the node is lifted, is `true`. Otherwise, it is `false`. + The property of the resulting is set to the implementing method. The property is `false`. If the node is lifted, is `true`. Otherwise, it is `false`. #### Implementing Method The following rules determine the implementing method for the operation: @@ -5534,7 +5534,7 @@ The following code example shows how to create an expression that adds two integ property of the resulting is set to the implementing method. The property is `false`. If the node is lifted, is `true`. Otherwise, it is `false`. + The property of the resulting is set to the implementing method. The property is `false`. If the node is lifted, is `true`. Otherwise, it is `false`. #### Implementing Method The following rules determine the implementing method for the operation: @@ -5653,7 +5653,7 @@ The following code example shows how to create an expression that adds two integ property of the resulting is set to the implementing method. The property is `false`. If the node is lifted, is `true`. Otherwise, it is `false`. + The property of the resulting is set to the implementing method. The property is `false`. If the node is lifted, is `true`. Otherwise, it is `false`. #### Implementing Method The following rules determine the implementing method for the operation: @@ -5747,7 +5747,7 @@ The following code example shows how to create an expression that adds two integ property of the resulting is set to the implementing method. The property is `false`. If the node is lifted, is `true`. Otherwise, it is `false`. + The property of the resulting is set to the implementing method. The property is `false`. If the node is lifted, is `true`. Otherwise, it is `false`. #### Implementing Method The following rules determine the implementing method for the operation: @@ -6122,7 +6122,7 @@ The following code example shows how to create an expression that adds two integ has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -6226,7 +6226,7 @@ The following code example shows how to create an expression that adds two integ has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -6932,7 +6932,7 @@ The following code example shows how to create an expression that adds two integ ## Examples - The following example demonstrates how to use the method to create an that represents calling the method to initialize an element of a dictionary collection. + The following example demonstrates how to use the method to create an that represents calling the method to initialize an element of a dictionary collection. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet4"::: @@ -7028,7 +7028,7 @@ The following code example shows how to create an expression that adds two integ ## Examples - The following example demonstrates how to use the method to create an that represents calling the method to initialize an element of a dictionary collection. + The following example demonstrates how to use the method to create an that represents calling the method to initialize an element of a dictionary collection. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet4"::: @@ -7392,7 +7392,7 @@ The following code example shows how to create an expression that adds two integ has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -7496,7 +7496,7 @@ The following code example shows how to create an expression that adds two integ has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -7880,7 +7880,7 @@ The following code example shows how to create an expression that adds two integ ## Remarks The property of the resulting is equal to the property of the that represents the field denoted by `fieldName`. - This method searches `expression`.Type and its base types for a field that has the name `fieldName`. Public fields are given preference over non-public fields. If a matching field is found, this method passes `expression` and the that represents that field to . + This method searches `expression`.Type and its base types for a field that has the name `fieldName`. Public fields are given preference over non-public fields. If a matching field is found, this method passes `expression` and the that represents that field to . @@ -9213,7 +9213,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Examples - The following example demonstrates how to use the method to create an that represents the invocation of a lambda expression with specified arguments. + The following example demonstrates how to use the method to create an that represents the invocation of a lambda expression with specified arguments. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet6"::: @@ -9305,7 +9305,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Examples - The following example demonstrates how to use the method to create an that represents the invocation of a lambda expression with specified arguments. + The following example demonstrates how to use the method to create an that represents the invocation of a lambda expression with specified arguments. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet6"::: @@ -10366,7 +10366,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V . The type is used to represent the returned object because the concrete type of the lambda expression is not known at compile time. + The object that is returned from this function is of type . The type is used to represent the returned object because the concrete type of the lambda expression is not known at compile time. The number of parameters for the delegate type represented by`delegateType` must equal the length of `parameters`. @@ -10477,7 +10477,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V . The type is used to represent the returned object because the concrete type of the lambda expression is not known at compile time. + The object that is returned from this function is of type . The type is used to represent the returned object because the concrete type of the lambda expression is not known at compile time. The number of parameters for the delegate type represented by `delegateType` must equal the length of `parameters`. @@ -11450,7 +11450,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -11546,7 +11546,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -12574,7 +12574,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Examples - The following example demonstrates how to use the method to create a that represents the initialization of a new dictionary instance with two key-value pairs. + The following example demonstrates how to use the method to create a that represents the initialization of a new dictionary instance with two key-value pairs. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet7"::: @@ -12654,9 +12654,9 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Remarks The property of `newExpression` must represent a type that implements . - In order to use this overload of , `newExpression`.Type or its base type must declare a single method named "Add" (case insensitive) that takes exactly one argument. The type of the argument must be assignable from the type represented by the property of the first element of `initializers`. + In order to use this overload of , `newExpression`.Type or its base type must declare a single method named "Add" (case insensitive) that takes exactly one argument. The type of the argument must be assignable from the type represented by the property of the first element of `initializers`. - The property of the returned contains one element of type for each element of `initializers`. The property of each element of is a singleton collection that contains the corresponding element of `initializers`. The property of each element of represents the add method that was discovered on `newExpression`.Type or its base type. + The property of the returned contains one element of type for each element of `initializers`. The property of each element of is a singleton collection that contains the corresponding element of `initializers`. The property of each element of represents the add method that was discovered on `newExpression`.Type or its base type. The property of the resulting is equal to `newExpression`.Type. @@ -12750,7 +12750,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Examples - The following example demonstrates how to use the method to create a that represents the initialization of a new dictionary instance with two key-value pairs. + The following example demonstrates how to use the method to create a that represents the initialization of a new dictionary instance with two key-value pairs. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet7"::: @@ -12837,9 +12837,9 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Remarks The property of `newExpression` must represent a type that implements . - In order to use this overload of , `newExpression`.Type or its base type must declare a single method named "Add" (case insensitive) that takes exactly one argument. The type of the argument must be assignable from the type represented by the property of the first element of `initializers`. + In order to use this overload of , `newExpression`.Type or its base type must declare a single method named "Add" (case insensitive) that takes exactly one argument. The type of the argument must be assignable from the type represented by the property of the first element of `initializers`. - The property of the returned contains one element of type for each element of `initializers`. The property of each element of is a singleton collection that contains the corresponding element of `initializers`. The property of each element of represents the add method that was discovered on `newExpression`.Type or its base type. + The property of the returned contains one element of type for each element of `initializers`. The property of each element of is a singleton collection that contains the corresponding element of `initializers`. The property of each element of represents the add method that was discovered on `newExpression`.Type or its base type. The property of the resulting is equal to `newExpression`.Type. @@ -12943,7 +12943,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V If `addMethod` is `null`, `newExpression`.Type or its base type must declare a single method named "Add" (case insensitive) that takes exactly one argument. If `addMethod` is not `null`, it must represent an instance method named "Add" (case insensitive) that has exactly one parameter. The type represented by the property of each element of `initializers` must be assignable to the argument type of the add method. - The property of the returned contains one element of type for each element of `initializers`. The property of each element of is a singleton collection that contains the corresponding element of `initializers`. The property of each element of is equal to `addMethod`. + The property of the returned contains one element of type for each element of `initializers`. The property of each element of is a singleton collection that contains the corresponding element of `initializers`. The property of each element of is equal to `addMethod`. The property of the resulting is equal to `newExpression`.Type. @@ -13051,7 +13051,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V If `addMethod` is `null`, `newExpression`.Type or its base type must declare a single method named "Add" (case insensitive) that takes exactly one argument. If `addMethod` is not `null`, it must represent an instance method named "Add" (case insensitive) that has exactly one parameter. The type represented by the property of each element of `initializers` must be assignable to the argument type of the add method. - The property of the returned contains one element of type for each element of `initializers`. The property of each element of is a singleton collection that contains the corresponding element of `initializers`. The property of each element of is equal to `addMethod`. + The property of the returned contains one element of type for each element of `initializers`. The property of each element of is a singleton collection that contains the corresponding element of `initializers`. The property of each element of is equal to `addMethod`. The property of the resulting is equal to `newExpression`.Type. @@ -13352,12 +13352,12 @@ As with `Func`, the last argument is the return type. It can be set to `System.V factory method this method calls. For example, if `binaryType` is , this method invokes . + The `binaryType` parameter determines which factory method this method calls. For example, if `binaryType` is , this method invokes . ## Examples - The following example demonstrates how to use the method to create a that represents the subtraction of one number from another. + The following example demonstrates how to use the method to create a that represents the subtraction of one number from another. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet8"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet8"::: @@ -13442,7 +13442,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V factory method this method will call. For example, if `binaryType` is , this method invokes . The `liftToNull` and `method` parameters are ignored if the appropriate factory method does not have a corresponding parameter. + The `binaryType` parameter determines which factory method this method will call. For example, if `binaryType` is , this method invokes . The `liftToNull` and `method` parameters are ignored if the appropriate factory method does not have a corresponding parameter. ]]> @@ -13527,7 +13527,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V factory method this method will call. For example, if `binaryType` is , this method invokes . The `liftToNull`, `method` and `conversion` parameters are ignored if the appropriate factory method does not have a corresponding parameter. + The `binaryType` parameter determines which factory method this method will call. For example, if `binaryType` is , this method invokes . The `liftToNull`, `method` and `conversion` parameters are ignored if the appropriate factory method does not have a corresponding parameter. ]]> @@ -14164,7 +14164,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V that represents accessing either a field or a property, depending on the type of `member`. If `member` is of type , this method calls to create the . If `member` is of type , this method calls to create the . + This method can be used to create a that represents accessing either a field or a property, depending on the type of `member`. If `member` is of type , this method calls to create the . If `member` is of type , this method calls to create the . ]]> @@ -14315,7 +14315,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V factory method this method calls. For example, if `unaryType` is equal to , this method invokes . The `type`parameter is ignored if it does not apply to the factory method that is called. + The `unaryType` parameter determines which factory method this method calls. For example, if `unaryType` is equal to , this method invokes . The `type`parameter is ignored if it does not apply to the factory method that is called. ]]> @@ -14388,7 +14388,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V factory method this method calls. For example, if `unaryType` is equal to , this method invokes . The `type` and `method` parameters are ignored if they do not apply to the factory method that is called. + The `unaryType` parameter determines which factory method this method calls. For example, if `unaryType` is equal to , this method invokes . The `type` and `method` parameters are ignored if they do not apply to the factory method that is called. ]]> @@ -14825,7 +14825,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Examples - The following example demonstrates how to use the method to create a that represents the initialization of two members of a new object. + The following example demonstrates how to use the method to create a that represents the initialization of two members of a new object. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet9"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet9"::: @@ -14906,7 +14906,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -15002,7 +15002,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -15311,7 +15311,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -15415,7 +15415,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -15924,7 +15924,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -16020,7 +16020,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -16127,7 +16127,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are false. + The property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are false. #### Implementing Method The following rules determine the implementing method for the operation: @@ -16223,7 +16223,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are false. + The property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are false. #### Implementing Method The following rules determine the implementing method for the operation: @@ -16328,7 +16328,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are false. + The property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are false. #### Implementing Method The following rules determine the implementing method for the operation: @@ -16416,7 +16416,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are false. + The property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are false. #### Implementing Method The following rules determine the implementing method for the operation: @@ -16521,7 +16521,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V and properties of the resulting are empty collections. The property represents the declaring type of the constructor represented by `constructor`. + The and properties of the resulting are empty collections. The property represents the declaring type of the constructor represented by `constructor`. ]]> @@ -16588,12 +16588,12 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Remarks The `type` parameter must represent a type that has a constructor without parameters. - The and properties of the resulting are empty collections. The property is equal to `type`. + The and properties of the resulting are empty collections. The property is equal to `type`. ## Examples - The following example demonstrates how to use the method to create a that represents constructing a new instance of a dictionary object by calling the constructor without parameters. + The following example demonstrates how to use the method to create a that represents constructing a new instance of a dictionary object by calling the constructor without parameters. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet10"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet10"::: @@ -17059,7 +17059,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Examples - The following example demonstrates how to use the method to create an expression tree that represents creating a string array that has a rank of 2. + The following example demonstrates how to use the method to create an expression tree that represents creating a string array that has a rank of 2. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet2"::: @@ -17146,7 +17146,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Examples - The following example demonstrates how to use the method to create an expression tree that represents creating a string array that has a rank of 2. + The following example demonstrates how to use the method to create an expression tree that represents creating a string array that has a rank of 2. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet2"::: @@ -17241,7 +17241,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Examples - The following example demonstrates how to use the method to create an expression tree that represents creating a one-dimensional string array that is initialized with a list of string expressions. + The following example demonstrates how to use the method to create an expression tree that represents creating a one-dimensional string array that is initialized with a list of string expressions. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet1"::: @@ -17331,7 +17331,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Examples - The following example demonstrates how to use the method to create an expression tree that represents creating a one-dimensional string array that is initialized with a list of string expressions. + The following example demonstrates how to use the method to create an expression tree that represents creating a one-dimensional string array that is initialized with a list of string expressions. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet1"::: @@ -17470,7 +17470,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. + The property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. #### Implementing Method The following rules determine the implementing method for the operation: @@ -17566,7 +17566,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. + The property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. #### Implementing Method The following rules determine the implementing method for the operation: @@ -18003,7 +18003,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -18107,7 +18107,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -18416,7 +18416,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -18529,7 +18529,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -19038,7 +19038,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -19047,7 +19047,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V - If the property of either `left` or `right` represents a user-defined type that overloads the exponentiation operator, the that represents that method is the implementing method. -- Otherwise, if `left`.Type and `right`.Type are both , the implementing method is . +- Otherwise, if `left`.Type and `right`.Type are both , the implementing method is . #### Node Type and Lifted versus Non-Lifted @@ -19131,7 +19131,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -19142,7 +19142,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V - Otherwise, if the property of either `left` or `right` represents a user-defined type that overloads the exponentiation operator, the that represents that method is the implementing method. -- Otherwise, if `left`.Type and `right`.Type are both , the implementing method is . +- Otherwise, if `left`.Type and `right`.Type are both , the implementing method is . #### Node Type and Lifted versus Non-Lifted @@ -19701,7 +19701,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting is equal to the property of . + The property of the resulting is equal to the property of . If the method represented by `propertyAccessor` is `static` (`Shared` in Visual Basic), `expression` can be `null`. @@ -19780,7 +19780,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting is equal to the property of . + The property of the resulting is equal to the property of . If the property represented by `property` is `static` (`Shared` in Visual Basic), `expression` can be `null`. @@ -19855,7 +19855,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Remarks The property of the resulting is equal to the property of the that represents the property denoted by `propertyName`. - This method searches `expression`.Type and its base types for a property that has the name `propertyName`. Public properties are given preference over non-public properties. If a matching property is found, this method passes `expression` and the that represents that property to . + This method searches `expression`.Type and its base types for a property that has the name `propertyName`. Public properties are given preference over non-public properties. If a matching property is found, this method passes `expression` and the that represents that property to . @@ -20200,9 +20200,9 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting is equal to the or properties of the or , respectively, that represents the property or field denoted by `propertyOrFieldName`. + The property of the resulting is equal to the or properties of the or , respectively, that represents the property or field denoted by `propertyOrFieldName`. - This method searches `expression`.Type and its base types for an instance property or field that has the name `propertyOrFieldName`. Static properties or fields are not supported. Public properties and fields are given preference over non-public properties and fields. Also, properties are given preference over fields. If a matching property or field is found, this method passes `expression` and the or that represents that property or field to or , respectively. + This method searches `expression`.Type and its base types for an instance property or field that has the name `propertyOrFieldName`. Static properties or fields are not supported. Public properties and fields are given preference over non-public properties and fields. Also, properties are given preference over fields. If a matching property or field is found, this method passes `expression` and the or that represents that property or field to or , respectively. @@ -20268,7 +20268,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting represents the constructed type , where the type argument is the type represented by `expression`.Type. The property is `null`. Both and are `false`. + The property of the resulting represents the constructed type , where the type argument is the type represented by `expression`.Type. The property is `null`. Both and are `false`. ]]> @@ -20745,7 +20745,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V method. + The following example demonstrates how to create an expression that contains the method. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet43"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet43"::: @@ -20943,7 +20943,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -21039,7 +21039,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -21461,7 +21461,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -21565,7 +21565,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -22074,7 +22074,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -22170,7 +22170,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. + The resulting has the property set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are `false`. The property is `null`. The following information describes the implementing method, the node type, and whether a node is lifted. @@ -23109,7 +23109,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V object that uses the method. + The following example demonstrates how to create a object that uses the method. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet47"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet47"::: @@ -23693,7 +23693,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V is the type of the expression tree node, whereas the represents the static common language runtime (CLR) type of the expression that the node represents. For example, two nodes with different node types can have the same , as shown in the following code example. + The is the type of the expression tree node, whereas the represents the static common language runtime (CLR) type of the expression that the node represents. For example, two nodes with different node types can have the same , as shown in the following code example. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet36"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet36"::: @@ -23753,12 +23753,12 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting is `null`. The and properties are both `false`. + The property of the resulting is `null`. The and properties are both `false`. ## Examples - The following example demonstrates how to use the method to create a that represents the reference conversion of a non-nullable integer expression to the nullable integer type. + The following example demonstrates how to use the method to create a that represents the reference conversion of a non-nullable integer expression to the nullable integer type. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet11"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet11"::: @@ -23874,7 +23874,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V ## Examples - The following example demonstrates how to use the method to create a that represents a type test of a string value against the type. + The following example demonstrates how to use the method to create a that represents a type test of a string value against the type. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet12"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet12"::: @@ -23952,7 +23952,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are false. + The property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are false. #### Implementing Method The following rules determine the implementing method for the operation: @@ -24040,7 +24040,7 @@ As with `Func`, the last argument is the return type. It can be set to `System.V property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are false. + The property of the resulting is set to the implementing method. The property is set to the type of the node. If the node is lifted, the and properties are both `true`. Otherwise, they are false. #### Implementing Method The following rules determine the implementing method for the operation: diff --git a/xml/System.Linq.Expressions/ExpressionVisitor.xml b/xml/System.Linq.Expressions/ExpressionVisitor.xml index 48e9994c361..8b95c23b69d 100644 --- a/xml/System.Linq.Expressions/ExpressionVisitor.xml +++ b/xml/System.Linq.Expressions/ExpressionVisitor.xml @@ -894,7 +894,7 @@ ## Remarks This can be overridden to visit or rewrite specific extension nodes. - If it is not overridden, this method will call , which gives the node a chance to walk its children. By default, will try to reduce the node. + If it is not overridden, this method will call , which gives the node a chance to walk its children. By default, will try to reduce the node. ]]> diff --git a/xml/System.Linq.Expressions/Expression`1.xml b/xml/System.Linq.Expressions/Expression`1.xml index 800d96faf08..d916f056290 100644 --- a/xml/System.Linq.Expressions/Expression`1.xml +++ b/xml/System.Linq.Expressions/Expression`1.xml @@ -69,7 +69,7 @@ , the compiler emits instructions to build an expression tree. + When a lambda expression is assigned to a variable, field, or parameter whose type is , the compiler emits instructions to build an expression tree. > [!NOTE] > A conversion from a lambda expression to type `Expression` (`Expression(Of D)` in Visual Basic) exists if a conversion from the lambda expression to a delegate of type `D` exists. However, the conversion may fail, for example, if the body of the lambda expression is a block. This means that delegates and expression trees behave similarly with regard to overload resolution. @@ -78,16 +78,16 @@ The ability to treat expressions as data structures enables APIs to receive user code in a format that can be inspected, transformed, and processed in a custom manner. For example, the LINQ to SQL data access implementation uses this facility to translate expression trees to Transact-SQL statements that can be evaluated by the database. - Many standard query operators defined in the class have one or more parameters of type . + Many standard query operators defined in the class have one or more parameters of type . - The of an is . + The of an is . - Use the or method to create an object. + Use the or method to create an object. ## Examples - The following code example demonstrates how to represent a lambda expression both as executable code in the form of a delegate and as data in the form of an expression tree. It also demonstrates how to turn the expression tree back into executable code by using the method. + The following code example demonstrates how to represent a lambda expression both as executable code in the form of a delegate and as data in the form of an expression tree. It also demonstrates how to turn the expression tree back into executable code by using the method. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/ExpressionTDelegate/Overview/ExpressionT.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/ExpressionTDelegate/Overview/ExpressionT.vb" id="Snippet1"::: @@ -191,14 +191,14 @@ method produces a delegate of type `TDelegate` at runtime. When that delegate is executed, it has the behavior described by the semantics of the . + The method produces a delegate of type `TDelegate` at runtime. When that delegate is executed, it has the behavior described by the semantics of the . - The method can be used to obtain the value of any expression tree. First, create a lambda expression that has the expression as its body by using the method. Then call to obtain a delegate, and execute the delegate to obtain the value of the expression. + The method can be used to obtain the value of any expression tree. First, create a lambda expression that has the expression as its body by using the method. Then call to obtain a delegate, and execute the delegate to obtain the value of the expression. ## Examples - The following code example demonstrates how is used to execute an expression tree. + The following code example demonstrates how is used to execute an expression tree. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/ExpressionTDelegate/Overview/ExpressionT.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/ExpressionTDelegate/Overview/ExpressionT.vb" id="Snippet2"::: diff --git a/xml/System.Linq.Expressions/GotoExpression.xml b/xml/System.Linq.Expressions/GotoExpression.xml index 97173335b71..0c94445eae1 100644 --- a/xml/System.Linq.Expressions/GotoExpression.xml +++ b/xml/System.Linq.Expressions/GotoExpression.xml @@ -58,14 +58,14 @@ Represents an unconditional jump. This includes return statements, break and continue statements, and other jumps. - object by using the method. - + object by using the method. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet45"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet45"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet45"::: + ]]> diff --git a/xml/System.Linq.Expressions/IArgumentProvider.xml b/xml/System.Linq.Expressions/IArgumentProvider.xml index 6cbf175a1f5..864fe72c5ea 100644 --- a/xml/System.Linq.Expressions/IArgumentProvider.xml +++ b/xml/System.Linq.Expressions/IArgumentProvider.xml @@ -45,22 +45,22 @@ Provides an internal interface for accessing the arguments of multiple tree nodes (DynamicExpression, ElementInit, MethodCallExpression, InvocationExpression, NewExpression, and IndexExpression). This API is for internal use only. instead of a . This saves the cost of allocating the read-only collection for each node. - -2. It enables specialized subclasses to be created that hold on to a specific number of arguments (for example, `Block2`, `Block2`, `Block4`). Therefore, these nodes avoid allocating both a and an array for storing their elements, thus saving 32 bytes per node. This technique is used by various nodes, including , , and . - -The expression tree nodes continue to expose the original LINQ properties of objects. They do this by reusing a field for storing both the array or an element that would normally be stored in the array. - -For the array case, the collection is typed to instead of . When the node is initially constructed, it is an array. The compiler or utilities in this library access the elements through this interface. Accessing array elements promotes the array to a . - -For the object case, the first argument is stored in a field typed to . When the node is initially constructed, this field holds the of the first argument. When the compiler and utilities in this library access the arguments, they again use this interface, and the accessor for the first argument uses the internal `Expression.ReturnObject(System.Object)` helper method to return the object that handles the or case. When the user accesses the , the object field is updated to hold directly onto the . - -It is important that properties consistently return the same . Otherwise, the rewriter tree walker used by expression visitors will break. It is a breaking change from LINQ v1 to return different from the same node. Currently, users can rely on object identity to tell if the node has changed. Storing the in an overloaded field both reduces memory usage and maintains compatibility for the public API. + +1. It enables the nodes to hold onto an instead of a . This saves the cost of allocating the read-only collection for each node. + +2. It enables specialized subclasses to be created that hold on to a specific number of arguments (for example, `Block2`, `Block2`, `Block4`). Therefore, these nodes avoid allocating both a and an array for storing their elements, thus saving 32 bytes per node. This technique is used by various nodes, including , , and . + +The expression tree nodes continue to expose the original LINQ properties of objects. They do this by reusing a field for storing both the array or an element that would normally be stored in the array. + +For the array case, the collection is typed to instead of . When the node is initially constructed, it is an array. The compiler or utilities in this library access the elements through this interface. Accessing array elements promotes the array to a . + +For the object case, the first argument is stored in a field typed to . When the node is initially constructed, this field holds the of the first argument. When the compiler and utilities in this library access the arguments, they again use this interface, and the accessor for the first argument uses the internal `Expression.ReturnObject(System.Object)` helper method to return the object that handles the or case. When the user accesses the , the object field is updated to hold directly onto the . + +It is important that properties consistently return the same . Otherwise, the rewriter tree walker used by expression visitors will break. It is a breaking change from LINQ v1 to return different from the same node. Currently, users can rely on object identity to tell if the node has changed. Storing the in an overloaded field both reduces memory usage and maintains compatibility for the public API. ]]> diff --git a/xml/System.Linq.Expressions/IndexExpression.xml b/xml/System.Linq.Expressions/IndexExpression.xml index 475fc671ba7..3c7b2b2b650 100644 --- a/xml/System.Linq.Expressions/IndexExpression.xml +++ b/xml/System.Linq.Expressions/IndexExpression.xml @@ -67,14 +67,14 @@ Represents indexing a property or array. - type and use it to change a value of an array element by using the method. - + type and use it to change a value of an array element by using the method. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet20"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet20"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet20"::: + ]]> diff --git a/xml/System.Linq.Expressions/InvocationExpression.xml b/xml/System.Linq.Expressions/InvocationExpression.xml index f4293c40706..d527c2e07c4 100644 --- a/xml/System.Linq.Expressions/InvocationExpression.xml +++ b/xml/System.Linq.Expressions/InvocationExpression.xml @@ -68,21 +68,21 @@ Represents an expression that applies a delegate or lambda expression to a list of argument expressions. - factory methods to create an . - - The of an is . - - - -## Examples - The following example creates an that represents invoking a lambda expression with specified arguments. - + factory methods to create an . + + The of an is . + + + +## Examples + The following example creates an that represents invoking a lambda expression with specified arguments. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet6"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet6"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet6"::: + ]]> diff --git a/xml/System.Linq.Expressions/LabelTarget.xml b/xml/System.Linq.Expressions/LabelTarget.xml index b7e10583510..5bfa5b181d2 100644 --- a/xml/System.Linq.Expressions/LabelTarget.xml +++ b/xml/System.Linq.Expressions/LabelTarget.xml @@ -54,14 +54,14 @@ Used to represent the target of a . - object by using the method. - + object by using the method. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet43"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet43"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet43"::: + ]]> @@ -118,11 +118,11 @@ Gets the name of the label. The name of the label. - diff --git a/xml/System.Linq.Expressions/LambdaExpression.xml b/xml/System.Linq.Expressions/LambdaExpression.xml index d3994a47eba..1bb4320fae9 100644 --- a/xml/System.Linq.Expressions/LambdaExpression.xml +++ b/xml/System.Linq.Expressions/LambdaExpression.xml @@ -66,16 +66,16 @@ type represents a lambda expression in the form of an expression tree. The type, which derives from and captures the type of the lambda expression more explicitly, can also be used to represent a lambda expression. At runtime, an expression tree node that represents a lambda expression is always of type . + The type represents a lambda expression in the form of an expression tree. The type, which derives from and captures the type of the lambda expression more explicitly, can also be used to represent a lambda expression. At runtime, an expression tree node that represents a lambda expression is always of type . The value of the property of a is . - Use the factory methods to create a object. + Use the factory methods to create a object. ## Examples - The following example demonstrates how to create an expression that represents a lambda expression that adds 1 to the passed argument by using the method. + The following example demonstrates how to create an expression that represents a lambda expression that adds 1 to the passed argument by using the method. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet42"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet42"::: @@ -192,7 +192,7 @@ method can be used to convert a expression tree into the delegate that it represents. + The method can be used to convert a expression tree into the delegate that it represents. ]]> diff --git a/xml/System.Linq.Expressions/ListInitExpression.xml b/xml/System.Linq.Expressions/ListInitExpression.xml index 6db829e98d2..e5aa058537d 100644 --- a/xml/System.Linq.Expressions/ListInitExpression.xml +++ b/xml/System.Linq.Expressions/ListInitExpression.xml @@ -62,7 +62,7 @@ factory methods to create a . + Use the factory methods to create a . The value of the property of a is . diff --git a/xml/System.Linq.Expressions/LoopExpression.xml b/xml/System.Linq.Expressions/LoopExpression.xml index 6e781f561b2..2949742248e 100644 --- a/xml/System.Linq.Expressions/LoopExpression.xml +++ b/xml/System.Linq.Expressions/LoopExpression.xml @@ -58,14 +58,14 @@ Represents an infinite loop. It can be exited with "break". - object by using the method. - + object by using the method. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet44"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet44"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet44"::: + ]]> diff --git a/xml/System.Linq.Expressions/MemberAssignment.xml b/xml/System.Linq.Expressions/MemberAssignment.xml index b805ca93122..f3fdf9b788e 100644 --- a/xml/System.Linq.Expressions/MemberAssignment.xml +++ b/xml/System.Linq.Expressions/MemberAssignment.xml @@ -58,7 +58,7 @@ factory methods to create a . + Use the factory methods to create a . A has the property equal to . diff --git a/xml/System.Linq.Expressions/MemberExpression.xml b/xml/System.Linq.Expressions/MemberExpression.xml index e9a27ff1846..fae68214a81 100644 --- a/xml/System.Linq.Expressions/MemberExpression.xml +++ b/xml/System.Linq.Expressions/MemberExpression.xml @@ -66,7 +66,7 @@ , or factory methods to create a . + Use the , or factory methods to create a . The value of the property of a is . @@ -130,7 +130,7 @@ nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . + This default implementation for nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . ]]> diff --git a/xml/System.Linq.Expressions/MemberInitExpression.xml b/xml/System.Linq.Expressions/MemberInitExpression.xml index be52dce92de..363274f6a6f 100644 --- a/xml/System.Linq.Expressions/MemberInitExpression.xml +++ b/xml/System.Linq.Expressions/MemberInitExpression.xml @@ -62,7 +62,7 @@ factory methods to create a . + Use the factory methods to create a . The value of the property of a is . diff --git a/xml/System.Linq.Expressions/MemberListBinding.xml b/xml/System.Linq.Expressions/MemberListBinding.xml index 35b36bdceb4..f0f8dbcead0 100644 --- a/xml/System.Linq.Expressions/MemberListBinding.xml +++ b/xml/System.Linq.Expressions/MemberListBinding.xml @@ -58,7 +58,7 @@ factory methods to create a . + Use the factory methods to create a . A has the property equal to . diff --git a/xml/System.Linq.Expressions/MemberMemberBinding.xml b/xml/System.Linq.Expressions/MemberMemberBinding.xml index bf25533b4c1..ec650c32432 100644 --- a/xml/System.Linq.Expressions/MemberMemberBinding.xml +++ b/xml/System.Linq.Expressions/MemberMemberBinding.xml @@ -58,7 +58,7 @@ factory methods to create a . + Use the factory methods to create a . The value of the property of a object is . diff --git a/xml/System.Linq.Expressions/MethodCallExpression.xml b/xml/System.Linq.Expressions/MethodCallExpression.xml index 1ff0340775b..48c895ded79 100644 --- a/xml/System.Linq.Expressions/MethodCallExpression.xml +++ b/xml/System.Linq.Expressions/MethodCallExpression.xml @@ -75,7 +75,7 @@ , , or factory method to create a . + Use the , , or factory method to create a . The value of the property of a object is . @@ -139,7 +139,7 @@ nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . + This default implementation for nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . ]]> diff --git a/xml/System.Linq.Expressions/NewArrayExpression.xml b/xml/System.Linq.Expressions/NewArrayExpression.xml index ded5efd7733..861e5cbfcaf 100644 --- a/xml/System.Linq.Expressions/NewArrayExpression.xml +++ b/xml/System.Linq.Expressions/NewArrayExpression.xml @@ -67,29 +67,29 @@ Represents creating a new array and possibly initializing the elements of the new array. - depending on the you require. - -||Factory Methods| -|----------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------| -||| -||| - - - -## Examples - The following example creates a object that represents creating and initializing a one-dimensional array of strings. - + depending on the you require. + +||Factory Methods| +|----------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------| +||| +||| + + + +## Examples + The following example creates a object that represents creating and initializing a one-dimensional array of strings. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet1"::: - - The next example creates a object that represents creating a two-dimensional array of strings. - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet1"::: + + The next example creates a object that represents creating a two-dimensional array of strings. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BinaryExpression/Overview/Expression.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BinaryExpression/Overview/Expression.vb" id="Snippet2"::: + ]]> @@ -139,11 +139,11 @@ Dispatches to the specific visit method for this node type. For example, calls the . The result of visiting this node. - nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . - + nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . + ]]> diff --git a/xml/System.Linq.Expressions/NewExpression.xml b/xml/System.Linq.Expressions/NewExpression.xml index a32e7246aa5..cec20d2d74d 100644 --- a/xml/System.Linq.Expressions/NewExpression.xml +++ b/xml/System.Linq.Expressions/NewExpression.xml @@ -75,7 +75,7 @@ factory methods to create a . + Use the factory methods to create a . The value of the property of a object is . @@ -139,7 +139,7 @@ nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . + This default implementation for nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . ]]> @@ -307,7 +307,7 @@ property provides a mapping between the constructor arguments and the type members that correspond to those values. In the case of the construction of an anonymous type, this property maps the constructor arguments to the properties that are exposed by the anonymous type. This mapping information is important because the fields that are initialized by the construction of an anonymous type, or the properties that access those fields, are not discoverable through the or properties of a node. + The property provides a mapping between the constructor arguments and the type members that correspond to those values. In the case of the construction of an anonymous type, this property maps the constructor arguments to the properties that are exposed by the anonymous type. This mapping information is important because the fields that are initialized by the construction of an anonymous type, or the properties that access those fields, are not discoverable through the or properties of a node. ]]> diff --git a/xml/System.Linq.Expressions/ParameterExpression.xml b/xml/System.Linq.Expressions/ParameterExpression.xml index 568ef97d2ce..f3ad1b3054a 100644 --- a/xml/System.Linq.Expressions/ParameterExpression.xml +++ b/xml/System.Linq.Expressions/ParameterExpression.xml @@ -66,14 +66,14 @@ factory method to create a . + Use the factory method to create a . The value of the property of a object is . ## Examples - The following example demonstrates how to create a object that prints the value of a object by using the method. + The following example demonstrates how to create a object that prints the value of a object by using the method. :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet49"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet49"::: @@ -130,7 +130,7 @@ nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . + This default implementation for nodes calls . Override this method to call into a more specific method on a derived visitor class of the class. However, it should still support unknown visitors by calling . ]]> diff --git a/xml/System.Linq.Expressions/RuntimeVariablesExpression.xml b/xml/System.Linq.Expressions/RuntimeVariablesExpression.xml index c4b72136b8b..3da9a641412 100644 --- a/xml/System.Linq.Expressions/RuntimeVariablesExpression.xml +++ b/xml/System.Linq.Expressions/RuntimeVariablesExpression.xml @@ -58,11 +58,11 @@ An expression that provides runtime read/write permission for variables. - at run time. - + at run time. + ]]> diff --git a/xml/System.Linq.Expressions/SwitchCase.xml b/xml/System.Linq.Expressions/SwitchCase.xml index 9154800a054..d771bc2bacb 100644 --- a/xml/System.Linq.Expressions/SwitchCase.xml +++ b/xml/System.Linq.Expressions/SwitchCase.xml @@ -58,14 +58,14 @@ Represents one case of a . - method. - + method. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet34"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet34"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet34"::: + ]]> diff --git a/xml/System.Linq.Expressions/SwitchExpression.xml b/xml/System.Linq.Expressions/SwitchExpression.xml index 15211bbd604..a1571f87dfe 100644 --- a/xml/System.Linq.Expressions/SwitchExpression.xml +++ b/xml/System.Linq.Expressions/SwitchExpression.xml @@ -58,14 +58,14 @@ Represents a control expression that handles multiple selections by passing control to . - method. - + method. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet35"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet35"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet35"::: + ]]> diff --git a/xml/System.Linq.Expressions/TryExpression.xml b/xml/System.Linq.Expressions/TryExpression.xml index d97451389b8..4ea43e96742 100644 --- a/xml/System.Linq.Expressions/TryExpression.xml +++ b/xml/System.Linq.Expressions/TryExpression.xml @@ -58,29 +58,29 @@ Represents a try/catch/finally/fault block. - expressions that can be either catch statements or filters. - - The fault block runs if an exception is thrown. - - The finally block runs regardless of how control exits the body. - - Only one of fault or finally blocks can be supplied. - - The return type of the try block must match the return type of any associated catch statements. - - - -## Examples - The following example demonstrates how to create a object that contains a catch statement by using the method. - + expressions that can be either catch statements or filters. + + The fault block runs if an exception is thrown. + + The finally block runs regardless of how control exits the body. + + Only one of fault or finally blocks can be supplied. + + The return type of the try block must match the return type of any associated catch statements. + + + +## Examples + The following example demonstrates how to create a object that contains a catch statement by using the method. + :::code language="csharp" source="~/snippets/csharp/System.Linq.Expressions/BlockExpression/Overview/program.cs" id="Snippet47"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet47"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq.Expressions/BlockExpression/Overview/module1.vb" id="Snippet47"::: + ]]> diff --git a/xml/System.Linq.Expressions/TypeBinaryExpression.xml b/xml/System.Linq.Expressions/TypeBinaryExpression.xml index 0bb4a36b9f5..f277cf739ae 100644 --- a/xml/System.Linq.Expressions/TypeBinaryExpression.xml +++ b/xml/System.Linq.Expressions/TypeBinaryExpression.xml @@ -64,7 +64,7 @@ ## Remarks A type test is an example of an operation between an expression and a type. - Use the factory method to create a . + Use the factory method to create a . The value of the property of a object is . diff --git a/xml/System.Linq.Expressions/UnaryExpression.xml b/xml/System.Linq.Expressions/UnaryExpression.xml index eaa38422001..cacc9b1997f 100644 --- a/xml/System.Linq.Expressions/UnaryExpression.xml +++ b/xml/System.Linq.Expressions/UnaryExpression.xml @@ -64,19 +64,19 @@ ## Remarks The following table summarizes the factory methods that can be used to create a that has a specific node type. -||Factory Method| +||Factory Method| |----------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------| -||| -||| -||| -||| -||| -||| -||| -||| -||| +||| +||| +||| +||| +||| +||| +||| +||| +||| - In addition, the methods can also be used to create a . These factory methods can be used to create a of any node type that represents a unary operation. The parameter of these methods that is of type specifies the desired node type. + In addition, the methods can also be used to create a . These factory methods can be used to create a of any node type that represents a unary operation. The parameter of these methods that is of type specifies the desired node type. @@ -279,7 +279,7 @@ is `true`, the operator returns a nullable type and if the nullable operand evaluates to `null`, the operator returns `null`. + An operator call is *lifted* if the operator expects a non-nullable operand but a nullable operand is passed to it. If the value of is `true`, the operator returns a nullable type and if the nullable operand evaluates to `null`, the operator returns `null`. ]]> diff --git a/xml/System.Linq/Enumerable.xml b/xml/System.Linq/Enumerable.xml index 724effb2ced..c9a8ab923b4 100644 --- a/xml/System.Linq/Enumerable.xml +++ b/xml/System.Linq/Enumerable.xml @@ -57,9 +57,9 @@ . The standard query operators are general purpose methods that follow the LINQ pattern and enable you to express traversal, filter, and projection operations over data in any .NET-based programming language. + The methods in this class provide an implementation of the standard query operators for querying data sources that implement . The standard query operators are general purpose methods that follow the LINQ pattern and enable you to express traversal, filter, and projection operations over data in any .NET-based programming language. - The majority of the methods in this class are defined as extension methods that extend . This means they can be called like an instance method on any object that implements . + The majority of the methods in this class are defined as extension methods that extend . This means they can be called like an instance method on any object that implements . Methods that are used in a query that returns a sequence of values do not consume the target data until the query object is enumerated. This is known as deferred execution. Methods that are used in a query that returns a singleton value execute and consume the target data immediately. @@ -132,14 +132,14 @@ method makes it simple to perform a calculation over a sequence of values. This method works by calling `func` one time for each element in `source` except the first one. Each time `func` is called, passes both the element from the sequence and an aggregated value (as the first argument to `func`). The first element of `source` is used as the initial aggregate value. The result of `func` replaces the previous aggregated value. returns the final result of `func`. + The method makes it simple to perform a calculation over a sequence of values. This method works by calling `func` one time for each element in `source` except the first one. Each time `func` is called, passes both the element from the sequence and an aggregated value (as the first argument to `func`). The first element of `source` is used as the initial aggregate value. The result of `func` replaces the previous aggregated value. returns the final result of `func`. - This overload of the method isn't suitable for all cases because it uses the first element of `source` as the initial aggregate value. You should choose another overload if the return value should include only the elements of `source` that meet a certain condition. For example, this overload isn't reliable if you want to calculate the sum of the even numbers in `source`. The result will be incorrect if the first element is odd instead of even. + This overload of the method isn't suitable for all cases because it uses the first element of `source` as the initial aggregate value. You should choose another overload if the return value should include only the elements of `source` that meet a certain condition. For example, this overload isn't reliable if you want to calculate the sum of the even numbers in `source`. The result will be incorrect if the first element is odd instead of even. - To simplify common aggregation operations, the standard query operators also include a general purpose count method, , and four numeric aggregation methods, namely , , , and . + To simplify common aggregation operations, the standard query operators also include a general purpose count method, , and four numeric aggregation methods, namely , , , and . ## Examples - The following code example demonstrates how to reverse the order of words in a string by using . + The following code example demonstrates how to reverse the order of words in a string by using . :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet1"::: @@ -224,12 +224,12 @@ method makes it simple to perform a calculation over a sequence of values. This method works by calling `func` one time for each element in `source`. Each time `func` is called, passes both the element from the sequence and an aggregated value (as the first argument to `func`). The value of the `seed` parameter is used as the initial aggregate value. The result of `func` replaces the previous aggregated value. returns the final result of `func`. + The method makes it simple to perform a calculation over a sequence of values. This method works by calling `func` one time for each element in `source`. Each time `func` is called, passes both the element from the sequence and an aggregated value (as the first argument to `func`). The value of the `seed` parameter is used as the initial aggregate value. The result of `func` replaces the previous aggregated value. returns the final result of `func`. - To simplify common aggregation operations, the standard query operators also include a general purpose count method, , and four numeric aggregation methods, namely , , , and . + To simplify common aggregation operations, the standard query operators also include a general purpose count method, , and four numeric aggregation methods, namely , , , and . ## Examples - The following code example demonstrates how to use to apply an accumulator function and use a seed value. + The following code example demonstrates how to use to apply an accumulator function and use a seed value. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet2"::: @@ -323,12 +323,12 @@ method makes it simple to perform a calculation over a sequence of values. This method works by calling `func` one time for each element in `source`. Each time `func` is called, passes both the element from the sequence and an aggregated value (as the first argument to `func`). The value of the `seed` parameter is used as the initial aggregate value. The result of `func` replaces the previous aggregated value. The final result of `func` is passed to `resultSelector` to obtain the final result of . + The method makes it simple to perform a calculation over a sequence of values. This method works by calling `func` one time for each element in `source`. Each time `func` is called, passes both the element from the sequence and an aggregated value (as the first argument to `func`). The value of the `seed` parameter is used as the initial aggregate value. The result of `func` replaces the previous aggregated value. The final result of `func` is passed to `resultSelector` to obtain the final result of . - To simplify common aggregation operations, the standard query operators also include a general purpose count method, , and four numeric aggregation methods, namely , , , and . + To simplify common aggregation operations, the standard query operators also include a general purpose count method, , and four numeric aggregation methods, namely , , , and . ## Examples - The following code example demonstrates how to use to apply an accumulator function and a result selector. + The following code example demonstrates how to use to apply an accumulator function and a result selector. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet3"::: @@ -561,15 +561,15 @@ The enumeration of `source` is stopped as soon as the result can be determined. - In Visual Basic query expression syntax, an `Aggregate Into All()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into All()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine whether all the elements in a sequence satisfy a condition. Variable `allStartWithB` is true if all the pet names start with "B" or if the `pets` array is empty. + The following code example demonstrates how to use to determine whether all the elements in a sequence satisfy a condition. Variable `allStartWithB` is true if all the pet names start with "B" or if the `pets` array is empty. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet4"::: - The Boolean value that the method returns is typically used in the predicate of a `where` clause (`Where` clause in Visual Basic) or a direct call to the method. The following example demonstrates this use of the `All` method. + The Boolean value that the method returns is typically used in the predicate of a `where` clause (`Where` clause in Visual Basic) or a direct call to the method. The following example demonstrates this use of the `All` method. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet129"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet129"::: @@ -658,15 +658,15 @@ The enumeration of `source` is stopped as soon as the result can be determined. - In Visual Basic query expression syntax, an `Aggregate Into Any()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Any()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine whether a sequence contains any elements. + The following code example demonstrates how to use to determine whether a sequence contains any elements. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet5"::: - The Boolean value that the method returns is typically used in the predicate of a `where` clause (`Where` clause in Visual Basic) or a direct call to the method. The following example demonstrates this use of the `Any` method. + The Boolean value that the method returns is typically used in the predicate of a `where` clause (`Where` clause in Visual Basic) or a direct call to the method. The following example demonstrates this use of the `Any` method. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet130"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet130"::: @@ -747,10 +747,10 @@ The enumeration of `source` is stopped as soon as the result can be determined. - In Visual Basic query expression syntax, an `Aggregate Into Any()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Any()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine whether any element in a sequence satisfies a condition. + The following code example demonstrates how to use to determine whether any element in a sequence satisfies a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet6"::: @@ -832,7 +832,7 @@ > This method does not modify the elements of the collection. Instead, it creates a copy of the collection with the new element. ## Examples - The following code example demonstrates how to use to append a value to the end of the sequence. + The following code example demonstrates how to use to append a value to the end of the sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet201"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet201"::: @@ -902,12 +902,12 @@ method has no effect other than to change the compile-time type of `source` from a type that implements to itself. + The method has no effect other than to change the compile-time type of `source` from a type that implements to itself. - can be used to choose between query implementations when a sequence implements but also has a different set of public query methods available. For example, given a generic class `Table` that implements and has its own methods such as `Where`, `Select`, and `SelectMany`, a call to `Where` would invoke the public `Where` method of `Table`. A `Table` type that represents a database table could have a `Where` method that takes the predicate argument as an expression tree and converts the tree to SQL for remote execution. If remote execution is not desired, for example because the predicate invokes a local method, the method can be used to hide the custom methods and instead make the standard query operators available. + can be used to choose between query implementations when a sequence implements but also has a different set of public query methods available. For example, given a generic class `Table` that implements and has its own methods such as `Where`, `Select`, and `SelectMany`, a call to `Where` would invoke the public `Where` method of `Table`. A `Table` type that represents a database table could have a `Where` method that takes the predicate argument as an expression tree and converts the tree to SQL for remote execution. If remote execution is not desired, for example because the predicate invokes a local method, the method can be used to hide the custom methods and instead make the standard query operators available. ## Examples - The following code example demonstrates how to use to hide a type's custom `Where` method when the standard query operator implementation is desired. + The following code example demonstrates how to use to hide a type's custom `Where` method when the standard query operator implementation is desired. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet108"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet108"::: @@ -975,7 +975,7 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ]]> @@ -1036,7 +1036,7 @@ ## Remarks If the sum of the elements is too large to represent as a , this method returns positive or negative infinity. - In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ]]> @@ -1094,10 +1094,10 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to calculate an average. + The following code example demonstrates how to use to calculate an average. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet8"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet8"::: @@ -1159,7 +1159,7 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ]]> @@ -1218,7 +1218,7 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ]]> @@ -1278,7 +1278,7 @@ ## Remarks If the sum of the elements is too large to represent as a , this method returns positive or negative infinity. - In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ]]> @@ -1335,7 +1335,7 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ]]> @@ -1393,10 +1393,10 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to calculate an average. + The following code example demonstrates how to use to calculate an average. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet12"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet12"::: @@ -1457,7 +1457,7 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ]]> @@ -1514,7 +1514,7 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ]]> @@ -1586,10 +1586,10 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to calculate an average. + The following code example demonstrates how to use to calculate an average. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -1667,10 +1667,10 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to calculate an average. + The following code example demonstrates how to use to calculate an average. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -1747,10 +1747,10 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to calculate an average. + The following code example demonstrates how to use to calculate an average. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet18"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet18"::: @@ -1826,10 +1826,10 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to calculate an average. + The following code example demonstrates how to use to calculate an average. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet16"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet16"::: @@ -1905,10 +1905,10 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to calculate an average. + The following code example demonstrates how to use to calculate an average. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -1984,10 +1984,10 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to calculate an average. + The following code example demonstrates how to use to calculate an average. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -2062,10 +2062,10 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to calculate an average. + The following code example demonstrates how to use to calculate an average. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -2141,10 +2141,10 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to calculate an average. + The following code example demonstrates how to use to calculate an average. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -2217,10 +2217,10 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to calculate an average. + The following code example demonstrates how to use to calculate an average. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -2295,10 +2295,10 @@ . + In Visual Basic query expression syntax, an `Aggregate Into Average()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to calculate an average. + The following code example demonstrates how to use to calculate an average. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -2375,15 +2375,15 @@ ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - The method enables the standard query operators to be invoked on non-generic collections by supplying the necessary type information. For example, does not implement , but by calling on the object, the standard query operators can then be used to query the sequence. + The method enables the standard query operators to be invoked on non-generic collections by supplying the necessary type information. For example, does not implement , but by calling on the object, the standard query operators can then be used to query the sequence. If an element cannot be converted to type `TResult`, this method throws a . The source sequence for this method is , which means the elements have the compile-time static type of `object`. The only type conversions that are performed by this method are reference conversions and unboxing conversions. The runtime type of the elements in the collection must match the target type, or in the case of value types, the runtime type of elements must be the result of a boxing conversion of the target type. Other conversion types, such as those between different numeric types, are not allowed. - To obtain only those elements that can be converted to type `TResult`, use the method instead of . + To obtain only those elements that can be converted to type `TResult`, use the method instead of . - In a query expression, an explicitly typed iteration variable translates to an invocation of . This example shows the syntax for an explicitly typed range variable. + In a query expression, an explicitly typed iteration variable translates to an invocation of . This example shows the syntax for an explicitly typed range variable. ```csharp from int i in objects @@ -2408,7 +2408,7 @@ Dim doubles = From item As Integer In sequence ``` ## Examples - The following code example demonstrates how to use to enable the use of the standard query operators on an . + The following code example demonstrates how to use to enable the use of the standard query operators on an . :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet19"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet19"::: @@ -2547,15 +2547,15 @@ Each chunk except the last one will be of size `size`. The last chunk will conta ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - The method differs from the method because the method returns all the original elements in the input sequences. The method returns only unique elements. + The method differs from the method because the method returns all the original elements in the input sequences. The method returns only unique elements. ## Examples - The following code example demonstrates how to use to concatenate two sequences. + The following code example demonstrates how to use to concatenate two sequences. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet20"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet20"::: - An alternative way of concatenating two sequences is to construct a collection, for example an array, of sequences and then apply the method, passing it the identity selector function. The following example demonstrates this use of . + An alternative way of concatenating two sequences is to construct a collection, for example an array, of sequences and then apply the method, passing it the identity selector function. The following example demonstrates this use of . :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet112"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet112"::: @@ -2639,14 +2639,14 @@ Each chunk except the last one will be of size `size`. The last chunk will conta , the `Contains` method in that implementation is invoked to obtain the result. Otherwise, this method determines whether `source` contains the specified element. + If the type of `source` implements , the `Contains` method in that implementation is invoked to obtain the result. Otherwise, this method determines whether `source` contains the specified element. Enumeration is terminated as soon as a matching element is found. - Elements are compared to the specified value by using the default equality comparer, . + Elements are compared to the specified value by using the default equality comparer, . ## Examples - The following code example demonstrates how to use to determine whether an array contains a specific element. + The following code example demonstrates how to use to determine whether an array contains a specific element. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet21"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet21"::: @@ -2731,15 +2731,15 @@ Each chunk except the last one will be of size `size`. The last chunk will conta ## Remarks Enumeration is terminated as soon as a matching element is found. - If `comparer` is `null`, the default equality comparer, , is used to compare elements to the specified value. + If `comparer` is `null`, the default equality comparer, , is used to compare elements to the specified value. ## Examples - The following example shows how to implement an equality comparer that can be used in the method. + The following example shows how to implement an equality comparer that can be used in the method. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/CustomComparer.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/ContainsTSource/CustomComparer.vb" id="Snippet1"::: - After you implement this comparer, you can use a sequence of `Product` objects in the method, as shown in the following example: + After you implement this comparer, you can use a sequence of `Product` objects in the method, as shown in the following example: :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/CustomComparer.cs" id="Contains"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/ContainsTSource/CustomComparer.vb" id="Snippet6"::: @@ -2820,14 +2820,14 @@ Each chunk except the last one will be of size `size`. The last chunk will conta , that implementation is used to obtain the count of elements. Otherwise, this method determines the count. + If the type of `source` implements , that implementation is used to obtain the count of elements. Otherwise, this method determines the count. - Use the method when you expect and want to allow the result to be greater than . + Use the method when you expect and want to allow the result to be greater than . - In Visual Basic query expression syntax, an `Aggregate Into Count()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Count()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to count the elements in an array. + The following code example demonstrates how to use to count the elements in an array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet22"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet22"::: @@ -2901,14 +2901,14 @@ Each chunk except the last one will be of size `size`. The last chunk will conta , that implementation is used to obtain the count of elements. Otherwise, this method determines the count. + If the type of `source` implements , that implementation is used to obtain the count of elements. Otherwise, this method determines the count. - You should use the method when you expect and want to allow the result to be greater than . + You should use the method when you expect and want to allow the result to be greater than . - In Visual Basic query expression syntax, an `Aggregate Into Count()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Count()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to count the elements in an array that satisfy a condition. + The following code example demonstrates how to use to count the elements in an array that satisfy a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet23"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet23"::: @@ -3058,10 +3058,10 @@ Each chunk except the last one will be of size `size`. The last chunk will conta The default value for reference and nullable types is `null`. - This method can be used to produce a left outer join when it is combined with the method. + This method can be used to produce a left outer join when it is combined with the method. ## Examples - The following code examples demonstrate how to use to provide a default value in case the source sequence is empty. + The following code examples demonstrate how to use to provide a default value in case the source sequence is empty. This example uses a non-empty sequence. @@ -3144,10 +3144,10 @@ Each chunk except the last one will be of size `size`. The last chunk will conta ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - This method can be used to produce a left outer join when it is combined with the method. + This method can be used to produce a left outer join when it is combined with the method. ## Examples - The following code example demonstrates how to use the method and specify a default value. The first sequence is not empty and the second sequence is empty. + The following code example demonstrates how to use the method and specify a default value. The first sequence is not empty and the second sequence is empty. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet26"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet26"::: @@ -3238,26 +3238,26 @@ Each chunk except the last one will be of size `size`. The last chunk will conta ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - The method returns an unordered sequence that contains no duplicate values. It uses the default equality comparer, , to compare values. + The method returns an unordered sequence that contains no duplicate values. It uses the default equality comparer, , to compare values. - In Visual Basic query expression syntax, a `Distinct` clause translates to an invocation of . + In Visual Basic query expression syntax, a `Distinct` clause translates to an invocation of . - The default equality comparer, , is used to compare values of the types that implement the generic interface. To compare a custom data type, you need to implement this interface and provide your own and methods for the type. + The default equality comparer, , is used to compare values of the types that implement the generic interface. To compare a custom data type, you need to implement this interface and provide your own and methods for the type. - For an example that uses to define a custom comparer, see . + For an example that uses to define a custom comparer, see . ## Examples - The following code example demonstrates how to use to return distinct elements from a sequence of integers. + The following code example demonstrates how to use to return distinct elements from a sequence of integers. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet27"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet27"::: - If you want to return distinct elements from sequences of objects of some custom data type, you have to implement the generic interface in the class. The following code example shows how to implement this interface in a custom data type and provide and methods. + If you want to return distinct elements from sequences of objects of some custom data type, you have to implement the generic interface in the class. The following code example shows how to implement this interface in a custom data type and provide and methods. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/EncapsulatedComparer.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/DistinctTSource/EncapsulatedComparer.vb" id="Snippet1"::: - After you implement this interface, you can use a sequence of `Product` objects in the method, as shown in the following example: + After you implement this interface, you can use a sequence of `Product` objects in the method, as shown in the following example: :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/EncapsulatedComparer.cs" id="Distinct"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/DistinctTSource/EncapsulatedComparer.vb" id="Snippet5"::: @@ -3341,15 +3341,15 @@ Each chunk except the last one will be of size `size`. The last chunk will conta ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - The method returns an unordered sequence that contains no duplicate values. If `comparer` is `null`, the default equality comparer, , is used to compare values. + The method returns an unordered sequence that contains no duplicate values. If `comparer` is `null`, the default equality comparer, , is used to compare values. ## Examples - The following example shows how to implement an equality comparer that can be used in the method. + The following example shows how to implement an equality comparer that can be used in the method. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/CustomComparer.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/ContainsTSource/CustomComparer.vb" id="Snippet1"::: - After you implement this comparer, you can use a sequence of `Product` objects in the method, as shown in the following example: + After you implement this comparer, you can use a sequence of `Product` objects in the method, as shown in the following example: :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/CustomComparer.cs" id="Distinct"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/ContainsTSource/CustomComparer.vb" id="Snippet5"::: @@ -3564,7 +3564,7 @@ The , that implementation is used to obtain the element at the specified index. Otherwise, this method obtains the specified element. -This method throws an exception if `index` is out of range. To instead return a default value when the specified index is out of range, use the method. +This method throws an exception if `index` is out of range. To instead return a default value when the specified index is out of range, use the method. ]]> @@ -3635,12 +3635,12 @@ This method throws an exception if `index` is out of range. To instead return a , that implementation is used to obtain the element at the specified index. Otherwise, this method obtains the specified element. + If the type of `source` implements , that implementation is used to obtain the element at the specified index. Otherwise, this method obtains the specified element. - This method throws an exception if `index` is out of range. To instead return a default value when the specified index is out of range, use the method. + This method throws an exception if `index` is out of range. To instead return a default value when the specified index is out of range, use the method. ## Examples - The following code example demonstrates how to use to return an element at a specific position. + The following code example demonstrates how to use to return an element at a specific position. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet28"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet28"::: @@ -3778,12 +3778,12 @@ The default value for reference and nullable types is `null`. , that implementation is used to obtain the element at the specified index. Otherwise, this method obtains the specified element. + If the type of `source` implements , that implementation is used to obtain the element at the specified index. Otherwise, this method obtains the specified element. The default value for reference and nullable types is `null`. ## Examples - The following code example demonstrates how to use . This example uses an index that is outside the bounds of the array. + The following code example demonstrates how to use . This example uses an index that is outside the bounds of the array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet29"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet29"::: @@ -3850,17 +3850,17 @@ The default value for reference and nullable types is `null`. method caches an empty sequence of type `TResult`. When the object it returns is enumerated, it yields no elements. + The method caches an empty sequence of type `TResult`. When the object it returns is enumerated, it yields no elements. - In some cases, this method is useful for passing an empty sequence to a user-defined method that takes an . It can also be used to generate a neutral element for methods such as . See the Example section for an example of this use of . + In some cases, this method is useful for passing an empty sequence to a user-defined method that takes an . It can also be used to generate a neutral element for methods such as . See the Example section for an example of this use of . ## Examples - The following code example demonstrates how to use to generate an empty . + The following code example demonstrates how to use to generate an empty . :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet30"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet30"::: - The following code example demonstrates a possible application of the method. The method is applied to a collection of string arrays. The elements of each array in the collection are added to the resulting only if that array contains four or more elements. is used to generate the seed value for because if no array in the collection has four or more elements, only the empty sequence is returned. + The following code example demonstrates a possible application of the method. The method is applied to a collection of string arrays. The elements of each array in the collection are added to the resulting only if that array contains four or more elements. is used to generate the seed value for because if no array in the collection has four or more elements, only the empty sequence is returned. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet31"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet31"::: @@ -3954,8 +3954,8 @@ Only unique elements are returned. ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - The default equality comparer, , is used to compare values of the types. - To compare a custom data type, you need to override the and the methods, and optionally implement the generic interface in the custom type. For more information, see the property. + The default equality comparer, , is used to compare values of the types. + To compare a custom data type, you need to override the and the methods, and optionally implement the generic interface in the custom type. For more information, see the property. ## Examples The following code example demonstrates how to use the `Except(IEnumerable, IEnumerable)` method to compare two sequences of numbers and return elements that appear only in the first sequence. @@ -3963,7 +3963,7 @@ Only unique elements are returned. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet34"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet34"::: - If you want to compare sequences of objects of some custom data type, you have to implement the generic interface in a helper class. The following code example shows how to implement this interface in a custom data type and override the and methods. + If you want to compare sequences of objects of some custom data type, you have to implement the generic interface in a helper class. The following code example shows how to implement this interface in a custom data type and override the and methods. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/EncapsulatedComparer.cs" id="Snippet9"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/DistinctTSource/EncapsulatedComparer.vb" id="Snippet9"::: @@ -4049,16 +4049,16 @@ Only unique elements are returned. , is used to compare values. + If `comparer` is `null`, the default equality comparer, , is used to compare values. ## Examples - If you want to compare sequences of objects of some custom data type, you have to implement the generic interface in a helper class. The following code example shows how to implement this interface in a custom data type and provide and methods. - The following example shows how to implement an equality comparer that can be used in the method. + If you want to compare sequences of objects of some custom data type, you have to implement the generic interface in a helper class. The following code example shows how to implement this interface in a custom data type and provide and methods. + The following example shows how to implement an equality comparer that can be used in the method. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/CustomComparer.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/ContainsTSource/CustomComparer.vb" id="Snippet1"::: - After you implement this comparer, you can use sequences of `Product` objects in the method, as shown in the following example: + After you implement this comparer, you can use sequences of `Product` objects in the method, as shown in the following example: :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/CustomComparer.cs" id="Except"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/ContainsTSource/CustomComparer.vb" id="Snippet7"::: @@ -4271,10 +4271,10 @@ Only unique elements are returned. method throws an exception if `source` contains no elements. To instead return a default value when the source sequence is empty, use the method. + The method throws an exception if `source` contains no elements. To instead return a default value when the source sequence is empty, use the method. ## Examples - The following code example demonstrates how to use to return the first element of an array. + The following code example demonstrates how to use to return the first element of an array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet35"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet35"::: @@ -4347,10 +4347,10 @@ Only unique elements are returned. method throws an exception if no matching element is found in `source`. To instead return a default value when no matching element is found, use the method. + The method throws an exception if no matching element is found in `source`. To instead return a default value when no matching element is found, use the method. ## Examples - The following code example demonstrates how to use to return the first element of an array that satisfies a condition. + The following code example demonstrates how to use to return the first element of an array that satisfies a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet36"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet36"::: @@ -4440,15 +4440,15 @@ Only unique elements are returned. ## Remarks The default value for reference and nullable types is `null`. - The method does not provide a way to specify a default value. If you want to specify a default value other than `default(TSource)`, use the method as described in the Example section. + The method does not provide a way to specify a default value. If you want to specify a default value other than `default(TSource)`, use the method as described in the Example section. ## Examples - The following code example demonstrates how to use on an empty array. + The following code example demonstrates how to use on an empty array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet37"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet37"::: - Sometimes the value of `default(TSource)` is not the default value that you want to use if the collection contains no elements. Instead of checking the result for the unwanted default value and then changing it if necessary, you can use the method to specify the default value that you want to use if the collection is empty. Then, call to obtain the first element. The following code example uses both techniques to obtain a default value of 1 if a collection of numeric months is empty. Because the default value for an integer is 0, which does not correspond to any month, the default value must be specified as 1 instead. The first result variable is checked for the unwanted default value after the query has finished executing. The second result variable is obtained by using to specify a default value of 1. + Sometimes the value of `default(TSource)` is not the default value that you want to use if the collection contains no elements. Instead of checking the result for the unwanted default value and then changing it if necessary, you can use the method to specify the default value that you want to use if the collection is empty. Then, call to obtain the first element. The following code example uses both techniques to obtain a default value of 1 if a collection of numeric months is empty. Because the default value for an integer is 0, which does not correspond to any month, the default value must be specified as 1 instead. The first result variable is checked for the unwanted default value after the query has finished executing. The second result variable is obtained by using to specify a default value of 1. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet126"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet126"::: @@ -4525,7 +4525,7 @@ Only unique elements are returned. The default value for reference and nullable types is `null`. ## Examples - The following code example demonstrates how to use by passing in a predicate. In the second call to the method, there is no element in the array that satisfies the condition. + The following code example demonstrates how to use by passing in a predicate. In the second call to the method, there is no element in the array that satisfies the condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet38"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet38"::: @@ -4728,17 +4728,17 @@ Only unique elements are returned. > [!NOTE] > For examples of `GroupBy`, see the following articles: > -> - -> - -> - +> - +> - +> - - The method returns a collection of objects, one for each distinct key that was encountered. An is an that also has a key associated with its elements. + The method returns a collection of objects, one for each distinct key that was encountered. An is an that also has a key associated with its elements. - The objects are yielded in an order based on the order of the elements in `source` that produced the first key of each . Elements in a grouping are yielded in the order they appear in `source`. + The objects are yielded in an order based on the order of the elements in `source` that produced the first key of each . Elements in a grouping are yielded in the order they appear in `source`. - The default equality comparer is used to compare keys. + The default equality comparer is used to compare keys. - In query expression syntax, a `group by` (C#) or `Group By Into` (Visual Basic) clause translates to an invocation of . For more information and usage examples, see [group clause](/dotnet/csharp/language-reference/keywords/group-clause) and [Group By Clause](/dotnet/visual-basic/language-reference/queries/group-by-clause). + In query expression syntax, a `group by` (C#) or `Group By Into` (Visual Basic) clause translates to an invocation of . For more information and usage examples, see [group clause](/dotnet/csharp/language-reference/keywords/group-clause) and [Group By Clause](/dotnet/visual-basic/language-reference/queries/group-by-clause). ]]> @@ -4833,19 +4833,19 @@ Only unique elements are returned. > [!NOTE] > For examples of `GroupBy`, see the following articles: > -> - -> - -> - +> - +> - +> - - The method returns a collection of objects, one for each distinct key that was encountered. An is an that also has a key associated with its elements. + The method returns a collection of objects, one for each distinct key that was encountered. An is an that also has a key associated with its elements. - The objects are yielded in an order based on the order of the elements in `source` that produced the first key of each . Elements in a grouping are yielded in the order they appear in `source`. + The objects are yielded in an order based on the order of the elements in `source` that produced the first key of each . Elements in a grouping are yielded in the order they appear in `source`. - If `comparer` is `null`, the default equality comparer is used to compare keys. + If `comparer` is `null`, the default equality comparer is used to compare keys. If two keys are considered equal according to `comparer`, the first key is chosen as the key for that grouping. - In query expression syntax, a `group by` (C#) or `Group By Into` (Visual Basic) clause translates to an invocation of . For more information and usage examples, see [group clause](/dotnet/csharp/language-reference/keywords/group-clause) and [Group By Clause](/dotnet/visual-basic/language-reference/queries/group-by-clause). + In query expression syntax, a `group by` (C#) or `Group By Into` (Visual Basic) clause translates to an invocation of . For more information and usage examples, see [group clause](/dotnet/csharp/language-reference/keywords/group-clause) and [Group By Clause](/dotnet/visual-basic/language-reference/queries/group-by-clause). ]]> @@ -4938,25 +4938,25 @@ Only unique elements are returned. ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - The method returns a collection of objects, one for each distinct key that was encountered. An is an that also has a key associated with its elements. + The method returns a collection of objects, one for each distinct key that was encountered. An is an that also has a key associated with its elements. - The objects are yielded in an order based on the order of the elements in `source` that produced the first key of each . Elements in a grouping are yielded in the order that the elements that produced them appear in `source`. + The objects are yielded in an order based on the order of the elements in `source` that produced the first key of each . Elements in a grouping are yielded in the order that the elements that produced them appear in `source`. - The default equality comparer is used to compare keys. + The default equality comparer is used to compare keys. ## Examples - The following code example demonstrates how to use to group the elements of a sequence. + The following code example demonstrates how to use to group the elements of a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet39"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet39"::: - In query expression syntax, a `group by` (C#) or `Group By Into` (Visual Basic) clause translates to an invocation of . The translation of the query expression in the following example is equivalent to the query in the example above. + In query expression syntax, a `group by` (C#) or `Group By Into` (Visual Basic) clause translates to an invocation of . The translation of the query expression in the following example is equivalent to the query in the example above. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet122"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet122"::: > [!NOTE] -> In a C# or Visual Basic query expression, the element and key selection expressions occur in the reverse order from their argument positions in a call to the method. +> In a C# or Visual Basic query expression, the element and key selection expressions occur in the reverse order from their argument positions in a call to the method. ]]> @@ -5062,19 +5062,19 @@ Only unique elements are returned. > [!NOTE] > For examples of `GroupBy`, see the following articles: > -> - -> - -> - +> - +> - +> - - The method returns a collection of objects, one for each distinct key that was encountered. An is an that also has a key associated with its elements. + The method returns a collection of objects, one for each distinct key that was encountered. An is an that also has a key associated with its elements. - The objects are yielded in an order based on the order of the elements in `source` that produced the first key of each . Elements in a grouping are yielded in the order that the elements that produced them appear in `source`. + The objects are yielded in an order based on the order of the elements in `source` that produced the first key of each . Elements in a grouping are yielded in the order that the elements that produced them appear in `source`. - If `comparer` is `null`, the default equality comparer is used to compare keys. + If `comparer` is `null`, the default equality comparer is used to compare keys. If two keys are considered equal according to `comparer`, the first key is chosen as the key for that grouping. - In query expression syntax, a `group by` (C#) or `Group By Into` (Visual Basic) clause translates to an invocation of . For more information and usage examples, see [group clause](/dotnet/csharp/language-reference/keywords/group-clause) and [Group By Clause](/dotnet/visual-basic/language-reference/queries/group-by-clause). + In query expression syntax, a `group by` (C#) or `Group By Into` (Visual Basic) clause translates to an invocation of . For more information and usage examples, see [group clause](/dotnet/csharp/language-reference/keywords/group-clause) and [Group By Clause](/dotnet/visual-basic/language-reference/queries/group-by-clause). ]]> @@ -5165,10 +5165,10 @@ Only unique elements are returned. . + In query expression syntax, a `group by` (C#) or `Group By Into` (Visual Basic) clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to group the elements of a sequence and project a sequence of results of type `TResult`. + The following code example demonstrates how to use to group the elements of a sequence and project a sequence of results of type `TResult`. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet15"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet15"::: @@ -5367,10 +5367,10 @@ Only unique elements are returned. . + In query expression syntax, a `group by` (C#) or `Group By Into` (Visual Basic) clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to group the projected elements of a sequence and then project a sequence of results of type `TResult`. + The following code example demonstrates how to use to group the projected elements of a sequence and then project a sequence of results of type `TResult`. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet125"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet125"::: @@ -5595,23 +5595,23 @@ Only unique elements are returned. ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - The default equality comparer, , is used to hash and compare keys. + The default equality comparer, , is used to hash and compare keys. - produces hierarchical results, which means that elements from `outer` are paired with collections of matching elements from `inner`. `GroupJoin` enables you to base your results on a whole set of matches for each element of `outer`. + produces hierarchical results, which means that elements from `outer` are paired with collections of matching elements from `inner`. `GroupJoin` enables you to base your results on a whole set of matches for each element of `outer`. > [!NOTE] > If there are no correlated elements in `inner` for a given element of `outer`, the sequence of matches for that element will be empty but will still appear in the results. - The `resultSelector` function is called only one time for each `outer` element together with a collection of all the `inner` elements that match the `outer` element. This differs from the method, in which the result selector function is invoked on pairs that contain one element from `outer` and one element from `inner`. + The `resultSelector` function is called only one time for each `outer` element together with a collection of all the `inner` elements that match the `outer` element. This differs from the method, in which the result selector function is invoked on pairs that contain one element from `outer` and one element from `inner`. `GroupJoin` preserves the order of the elements of `outer`, and for each element of `outer`, the order of the matching elements from `inner`. - has no direct equivalent in traditional relational database terms. However, this method does implement a superset of inner joins and left outer joins. Both of these operations can be written in terms of a grouped join. For more information, see [Join operations](/dotnet/csharp/programming-guide/concepts/linq/join-operations). + has no direct equivalent in traditional relational database terms. However, this method does implement a superset of inner joins and left outer joins. Both of these operations can be written in terms of a grouped join. For more information, see [Join operations](/dotnet/csharp/programming-guide/concepts/linq/join-operations). - In query expression syntax, a `join ... into` (C#) or `Group Join` (Visual Basic) clause translates to an invocation of . + In query expression syntax, a `join ... into` (C#) or `Group Join` (Visual Basic) clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to perform a grouped join on two sequences. + The following code example demonstrates how to use to perform a grouped join on two sequences. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet40"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet40"::: @@ -5732,18 +5732,18 @@ Only unique elements are returned. ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - If `comparer` is `null`, the default equality comparer, , is used to hash and compare keys. + If `comparer` is `null`, the default equality comparer, , is used to hash and compare keys. - produces hierarchical results, which means that elements from `outer` are paired with collections of matching elements from `inner`. `GroupJoin` enables you to base your results on a whole set of matches for each element of `outer`. + produces hierarchical results, which means that elements from `outer` are paired with collections of matching elements from `inner`. `GroupJoin` enables you to base your results on a whole set of matches for each element of `outer`. > [!NOTE] > If there are no correlated elements in `inner` for a given element of `outer`, the sequence of matches for that element will be empty but will still appear in the results. - The `resultSelector` function is called only one time for each `outer` element together with a collection of all the `inner` elements that match the `outer` element. This differs from the method in which the result selector function is invoked on pairs that contain one element from `outer` and one element from `inner`. + The `resultSelector` function is called only one time for each `outer` element together with a collection of all the `inner` elements that match the `outer` element. This differs from the method in which the result selector function is invoked on pairs that contain one element from `outer` and one element from `inner`. `GroupJoin` preserves the order of the elements of `outer`, and for each element of `outer`, the order of the matching elements from `inner`. - has no direct equivalent in traditional relational database terms. However, this method does implement a superset of inner joins and left outer joins. Both of these operations can be written in terms of a grouped join. For more information, see [Join operations](/dotnet/csharp/programming-guide/concepts/linq/join-operations). + has no direct equivalent in traditional relational database terms. However, this method does implement a superset of inner joins and left outer joins. Both of these operations can be written in terms of a grouped join. For more information, see [Join operations](/dotnet/csharp/programming-guide/concepts/linq/join-operations). ]]> @@ -5937,8 +5937,8 @@ Only unique elements are returned. When the object returned by this method is enumerated, `Intersect` yields distinct elements occurring in both sequences in the order in which they appear in `first`. - The default equality comparer, , is used to compare values of the types. - To compare a custom data type, you need to override the and the methods, and optionally implement the generic interface in the custom type. For more information, see the property. + The default equality comparer, , is used to compare values of the types. + To compare a custom data type, you need to override the and the methods, and optionally implement the generic interface in the custom type. For more information, see the property. ## Examples The following code example demonstrates how to use `Intersect(IEnumerable, IEnumerable)` to return the elements that appear in each of two sequences of integers. @@ -5946,7 +5946,7 @@ Only unique elements are returned. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet41"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet41"::: - If you want to compare sequences of objects of some custom data type, you have to implement the generic interface in a helper class. The following code example shows how to implement this interface in a custom data type and override and methods. + If you want to compare sequences of objects of some custom data type, you have to implement the generic interface in a helper class. The following code example shows how to implement this interface in a custom data type and override and methods. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/EncapsulatedComparer.cs" id="Snippet9"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/DistinctTSource/EncapsulatedComparer.vb" id="Snippet9"::: @@ -6042,7 +6042,7 @@ Only unique elements are returned. When the object returned by this method is enumerated, `Intersect` yields distinct elements occurring in both sequences in the order in which they appear in `first`. - If `comparer` is `null`, the default equality comparer, , is used to compare values. + If `comparer` is `null`, the default equality comparer, , is used to compare values. ## Examples The following example shows how to implement an equality comparer that can be used in the `Intersect` method. @@ -6333,18 +6333,18 @@ If `comparer` is `null`, the default equality comparer, , is used to hash and compare keys. + The default equality comparer, , is used to hash and compare keys. - A join refers to the operation of correlating the elements of two sources of information based on a common key. brings the two information sources and the keys by which they are matched together in one method call. This differs from the use of `SelectMany`, which requires more than one method call to perform the same operation. + A join refers to the operation of correlating the elements of two sources of information based on a common key. brings the two information sources and the keys by which they are matched together in one method call. This differs from the use of `SelectMany`, which requires more than one method call to perform the same operation. - preserves the order of the elements of `outer`, and for each of these elements, the order of the matching elements of `inner`. + preserves the order of the elements of `outer`, and for each of these elements, the order of the matching elements of `inner`. - In query expression syntax, a `join` (C#) or `Join` (Visual Basic) clause translates to an invocation of . + In query expression syntax, a `join` (C#) or `Join` (Visual Basic) clause translates to an invocation of . - In relational database terms, the method implements an inner equijoin. 'Inner' means that only elements that have a match in the other sequence are included in the results. An 'equijoin' is a join in which the keys are compared for equality. A left outer join operation has no dedicated standard query operator, but can be performed by using the method. For more information, see [Join operations](/dotnet/csharp/programming-guide/concepts/linq/join-operations). + In relational database terms, the method implements an inner equijoin. 'Inner' means that only elements that have a match in the other sequence are included in the results. An 'equijoin' is a join in which the keys are compared for equality. A left outer join operation has no dedicated standard query operator, but can be performed by using the method. For more information, see [Join operations](/dotnet/csharp/programming-guide/concepts/linq/join-operations). ## Examples - The following code example demonstrates how to use to perform an inner join of two sequences based on a common key. + The following code example demonstrates how to use to perform an inner join of two sequences based on a common key. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet42"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet42"::: @@ -6465,13 +6465,13 @@ If `comparer` is `null`, the default equality comparer, , is used to hash and compare keys. + If `comparer` is `null`, the default equality comparer, , is used to hash and compare keys. - A join refers to the operation of correlating the elements of two sources of information based on a common key. brings the two information sources and the keys by which they are matched together in one method call. This differs from the use of `SelectMany`, which requires more than one method call to perform the same operation. + A join refers to the operation of correlating the elements of two sources of information based on a common key. brings the two information sources and the keys by which they are matched together in one method call. This differs from the use of `SelectMany`, which requires more than one method call to perform the same operation. - preserves the order of the elements of `outer`, and for each of these elements, the order of the matching elements of `inner`. + preserves the order of the elements of `outer`, and for each of these elements, the order of the matching elements of `inner`. - In relational database terms, the method implements an inner equijoin. 'Inner' means that only elements that have a match in the other sequence are included in the results. An 'equijoin' is a join in which the keys are compared for equality. A left outer join operation has no dedicated standard query operator, but can be performed by using the method. For more information, see [Join operations](/dotnet/csharp/programming-guide/concepts/linq/join-operations). + In relational database terms, the method implements an inner equijoin. 'Inner' means that only elements that have a match in the other sequence are included in the results. An 'equijoin' is a join in which the keys are compared for equality. A left outer join operation has no dedicated standard query operator, but can be performed by using the method. For more information, see [Join operations](/dotnet/csharp/programming-guide/concepts/linq/join-operations). ]]> @@ -6551,10 +6551,10 @@ If `comparer` is `null`, the default equality comparer, method throws an exception if `source` contains no elements. To instead return a default value when the source sequence is empty, use the method. + The method throws an exception if `source` contains no elements. To instead return a default value when the source sequence is empty, use the method. ## Examples - The following code example demonstrates how to use to return the last element of an array. + The following code example demonstrates how to use to return the last element of an array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet43"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet43"::: @@ -6627,10 +6627,10 @@ If `comparer` is `null`, the default equality comparer, method throws an exception if no matching element is found in `source`. To instead return a default value when no matching element is found, use the method. + The method throws an exception if no matching element is found in `source`. To instead return a default value when no matching element is found, use the method. ## Examples - The following code example demonstrates how to use to return the last element of an array that satisfies a condition. + The following code example demonstrates how to use to return the last element of an array that satisfies a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet44"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet44"::: @@ -6720,15 +6720,15 @@ If `comparer` is `null`, the default equality comparer, method does not provide a way to specify a default value. If you want to specify a default value other than `default(TSource)`, use the method as described in the Example section. + The method does not provide a way to specify a default value. If you want to specify a default value other than `default(TSource)`, use the method as described in the Example section. ## Examples - The following code example demonstrates how to use on an empty array. + The following code example demonstrates how to use on an empty array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet45"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet45"::: - Sometimes the value of `default(TSource)` is not the default value that you want to use if the collection contains no elements. Instead of checking the result for the unwanted default value and then changing it if necessary, you can use the method to specify the default value that you want to use if the collection is empty. Then, call to obtain the last element. The following code example uses both techniques to obtain a default value of 1 if a collection of numeric days of the month is empty. Because the default value for an integer is 0, which does not correspond to any day of the month, the default value must be specified as 1 instead. The first result variable is checked for the unwanted default value after the query has finished executing. The second result variable is obtained by using to specify a default value of 1. + Sometimes the value of `default(TSource)` is not the default value that you want to use if the collection contains no elements. Instead of checking the result for the unwanted default value and then changing it if necessary, you can use the method to specify the default value that you want to use if the collection is empty. Then, call to obtain the last element. The following code example uses both techniques to obtain a default value of 1 if a collection of numeric days of the month is empty. Because the default value for an integer is 0, which does not correspond to any day of the month, the default value must be specified as 1 instead. The first result variable is checked for the unwanted default value after the query has finished executing. The second result variable is obtained by using to specify a default value of 1. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet127"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet127"::: @@ -6805,7 +6805,7 @@ If `comparer` is `null`, the default equality comparer, by passing in a predicate. In the second call to the method, there is no element in the sequence that satisfies the condition. + The following code example demonstrates how to use by passing in a predicate. In the second call to the method, there is no element in the sequence that satisfies the condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet46"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet46"::: @@ -7197,12 +7197,12 @@ If `comparer` is `null`, the default equality comparer, when you expect the result to be greater than . + Use this method rather than when you expect the result to be greater than . - In Visual Basic query expression syntax, an `Aggregate Into LongCount()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into LongCount()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to count the elements in an array. + The following code example demonstrates how to use to count the elements in an array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet47"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet47"::: @@ -7276,12 +7276,12 @@ If `comparer` is `null`, the default equality comparer, when you expect the result to be greater than . + Use this method rather than when you expect the result to be greater than . - In Visual Basic query expression syntax, an `Aggregate Into LongCount()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into LongCount()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to count the elements in an array that satisfy a condition. + The following code example demonstrates how to use to count the elements in an array that satisfy a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet48"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet48"::: @@ -7353,9 +7353,9 @@ If `comparer` is `null`, the default equality comparer, method uses the implementation of to compare values. + The method uses the implementation of to compare values. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ]]> @@ -7414,9 +7414,9 @@ If `comparer` is `null`, the default equality comparer, method uses the implementation of to compare values. + The method uses the implementation of to compare values. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ]]> @@ -7475,9 +7475,9 @@ If `comparer` is `null`, the default equality comparer, method uses the implementation of to compare values. + The method uses the implementation of to compare values. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ]]> @@ -7536,12 +7536,12 @@ If `comparer` is `null`, the default equality comparer, method uses the implementation of to compare values. + The method uses the implementation of to compare values. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine the maximum value in a sequence. + The following code example demonstrates how to use to determine the maximum value in a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet52"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet52"::: @@ -7603,11 +7603,11 @@ If `comparer` is `null`, the default equality comparer, method uses the implementation of to compare values. + The method uses the implementation of to compare values. If the source sequence is empty or contains only values that are `null`, this function returns `null`. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ]]> @@ -7664,14 +7664,14 @@ If `comparer` is `null`, the default equality comparer, method uses the implementation of to compare values. + The method uses the implementation of to compare values. If the source sequence is empty or contains only values that are `null`, this function returns `null`. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine the maximum value in a sequence. + The following code example demonstrates how to use to determine the maximum value in a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet54"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet54"::: @@ -7731,11 +7731,11 @@ If `comparer` is `null`, the default equality comparer, method uses the implementation of to compare values. + The method uses the implementation of to compare values. If the source sequence is empty or contains only values that are `null`, this function returns `null`. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ]]> @@ -7792,11 +7792,11 @@ If `comparer` is `null`, the default equality comparer, method uses the implementation of to compare values. + The method uses the implementation of to compare values. If the source sequence is empty or contains only values that are `null`, this function returns `null`. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ]]> @@ -7853,11 +7853,11 @@ If `comparer` is `null`, the default equality comparer, method uses the implementation of to compare values. + The method uses the implementation of to compare values. If the source sequence is empty or contains only values that are `null`, this function returns `null`. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ]]> @@ -7914,9 +7914,9 @@ If `comparer` is `null`, the default equality comparer, method uses the implementation of to compare values. + The method uses the implementation of to compare values. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ]]> @@ -7987,14 +7987,14 @@ If `comparer` is `null`, the default equality comparer, , the method uses that implementation to compare values. Otherwise, if type `TSource` implements , that implementation is used to compare values. + If type `TSource` implements , the method uses that implementation to compare values. Otherwise, if type `TSource` implements , that implementation is used to compare values. If `TSource` is a reference type and the source sequence is empty or contains only values that are `null`, this method returns `null`. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine the maximum value in a sequence of objects. + The following code example demonstrates how to use to determine the maximum value in a sequence of objects. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet57"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet57"::: @@ -8069,7 +8069,7 @@ If type `TSource` implements , the . +In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ]]> @@ -8139,14 +8139,14 @@ In Visual Basic query expression syntax, an `Aggregate Into Max()` clause transl method uses the implementation of to compare values. + The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. + The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -8223,14 +8223,14 @@ In Visual Basic query expression syntax, an `Aggregate Into Max()` clause transl method uses the implementation of to compare values. + The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. + The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -8307,14 +8307,14 @@ In Visual Basic query expression syntax, an `Aggregate Into Max()` clause transl method uses the implementation of to compare values. + The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. + The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet58"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet58"::: @@ -8389,14 +8389,14 @@ In Visual Basic query expression syntax, an `Aggregate Into Max()` clause transl method uses the implementation of to compare values. + The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. + The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -8473,14 +8473,14 @@ In Visual Basic query expression syntax, an `Aggregate Into Max()` clause transl method uses the implementation of to compare values. + The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Decimal)` in Visual Basic. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. + The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -8555,14 +8555,14 @@ In Visual Basic query expression syntax, an `Aggregate Into Max()` clause transl method uses the implementation of to compare values. + The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Double)` in Visual Basic. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. + The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -8637,14 +8637,14 @@ In Visual Basic query expression syntax, an `Aggregate Into Max()` clause transl method uses the implementation of to compare values. + The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Int32)` in Visual Basic. - In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. + The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -8720,15 +8720,15 @@ In Visual Basic query expression syntax, an `Aggregate Into Max()` clause transl ## Remarks -The method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Int64)` in Visual Basic. -In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. +The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -8804,15 +8804,15 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Single)` in Visual Basic. -In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. +The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -8888,15 +8888,15 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . -In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. +The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -8984,13 +8984,13 @@ The following code example demonstrates how to use , this method uses that implementation to compare values. Otherwise, if type `TResult` implements , that implementation is used to compare values. +If type `TResult` implements , this method uses that implementation to compare values. Otherwise, if type `TResult` implements , that implementation is used to compare values. -In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Max()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. +The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -9206,9 +9206,9 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ]]> @@ -9268,13 +9268,13 @@ In Visual Basic query expression syntax, an `Aggregate Into Min()` clause transl ## Remarks -The method uses the implementation of to compare values. +The method uses the implementation of to compare values. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence. +The following code example demonstrates how to use to determine the minimum value in a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet60"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet60"::: @@ -9337,9 +9337,9 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ]]> @@ -9399,9 +9399,9 @@ In Visual Basic query expression syntax, an `Aggregate Into Min()` clause transl ## Remarks -The method uses the implementation of to compare values. +The method uses the implementation of to compare values. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ]]> @@ -9461,11 +9461,11 @@ In Visual Basic query expression syntax, an `Aggregate Into Min()` clause transl ## Remarks -The method uses the implementation of to compare values. +The method uses the implementation of to compare values. If the source sequence is empty or contains only values that are `null`, this function returns `null`. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ]]> @@ -9523,11 +9523,11 @@ In Visual Basic query expression syntax, an `Aggregate Into Min()` clause transl ## Remarks -The method uses the implementation of to compare values. +The method uses the implementation of to compare values. If the source sequence is empty or contains only values that are `null`, this function returns `null`. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ]]> @@ -9585,15 +9585,15 @@ In Visual Basic query expression syntax, an `Aggregate Into Min()` clause transl ## Remarks -The method uses the implementation of to compare values. +The method uses the implementation of to compare values. If the source sequence is empty or contains only values that are `null`, this function returns `null`. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence. +The following code example demonstrates how to use to determine the minimum value in a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet63"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet63"::: @@ -9654,11 +9654,11 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. If the source sequence is empty or contains only values that are `null`, this function returns `null`. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ]]> @@ -9716,11 +9716,11 @@ In Visual Basic query expression syntax, an `Aggregate Into Min()` clause transl ## Remarks -The method uses the implementation of to compare values. +The method uses the implementation of to compare values. If the source sequence is empty or contains only values that are `null`, this function returns `null`. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ]]> @@ -9778,9 +9778,9 @@ In Visual Basic query expression syntax, an `Aggregate Into Min()` clause transl ## Remarks -The method uses the implementation of to compare values. +The method uses the implementation of to compare values. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ]]> @@ -9852,15 +9852,15 @@ In Visual Basic query expression syntax, an `Aggregate Into Min()` clause transl ## Remarks -If type `TSource` implements , this method uses that implementation to compare values. Otherwise, if type `TSource` implements , that implementation is used to compare values. +If type `TSource` implements , this method uses that implementation to compare values. Otherwise, if type `TSource` implements , that implementation is used to compare values. If `TSource` is a reference type and the source sequence is empty or contains only values that are `null`, this function returns `null`. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence of objects. +The following code example demonstrates how to use to determine the minimum value in a sequence of objects. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet67"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet67"::: @@ -9935,7 +9935,7 @@ If type `TSource` implements , the . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ]]> @@ -10006,15 +10006,15 @@ In Visual Basic query expression syntax, an `Aggregate Into Min()` clause transl ## Remarks -The method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. +The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -10092,15 +10092,15 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. +The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -10178,15 +10178,15 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. +The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet68"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet68"::: @@ -10262,15 +10262,15 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. +The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -10348,15 +10348,15 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Decimal)` in Visual Basic. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. +The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -10432,15 +10432,15 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Double)` in Visual Basic. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. +The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -10516,15 +10516,15 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of source into a numeric type, specifically `Nullable` in C# or `Nullable(Of Int32)` in Visual Basic. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. +The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -10600,15 +10600,15 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Int64)` in Visual Basic. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. +The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -10684,15 +10684,15 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Single)` in Visual Basic. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. +The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -10768,15 +10768,15 @@ The following code example demonstrates how to use method uses the implementation of to compare values. +The method uses the implementation of to compare values. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. +The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -10864,13 +10864,13 @@ The following code example demonstrates how to use , this method uses that implementation to compare values. Otherwise, if type `TResult` implements , that implementation is used to compare values. +If type `TResult` implements , this method uses that implementation to compare values. Otherwise, if type `TResult` implements , that implementation is used to compare values. -In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Min()` clause translates to an invocation of . ## Examples -The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. +The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -11087,14 +11087,14 @@ The following code example demonstrates how to use method returns only those elements in `source` that are non-null and compatible with type `TResult`. To receive an exception if an element cannot be cast to type `TResult`, use . + The method returns only those elements in `source` that are non-null and compatible with type `TResult`. To receive an exception if an element cannot be cast to type `TResult`, use . - This method is one of the few standard query operator methods that can be applied to a collection that has a non-parameterized type, such as an . This is because extends the type . cannot only be applied to collections that are based on the parameterized type, but collections that are based on the non-parameterized type also. + This method is one of the few standard query operator methods that can be applied to a collection that has a non-parameterized type, such as an . This is because extends the type . cannot only be applied to collections that are based on the parameterized type, but collections that are based on the non-parameterized type also. - By applying to a collection that implements , you gain the ability to query the collection by using the standard query operators. For example, specifying a type argument of to would return an object of type `IEnumerable` in C# or `IEnumerable(Of Object)` in Visual Basic, to which the standard query operators can be applied. + By applying to a collection that implements , you gain the ability to query the collection by using the standard query operators. For example, specifying a type argument of to would return an object of type `IEnumerable` in C# or `IEnumerable(Of Object)` in Visual Basic, to which the standard query operators can be applied. ## Examples - The following code example demonstrates how to use to filter the elements of an . + The following code example demonstrates how to use to filter the elements of an . :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet69"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet69"::: @@ -11322,19 +11322,19 @@ If comparer is `null`, the default comparer x` in C# or `Function(x) x` in Visual Basic) for `keySelector`. - For an example of this method, see . + For an example of this method, see . - Two methods are defined to extend the type , which is the return type of this method. These two methods, namely `ThenBy` and `ThenByDescending`, enable you to specify additional sort criteria to sort a sequence. `ThenBy` and `ThenByDescending` also return an , which means any number of consecutive calls to `ThenBy` or `ThenByDescending` can be made. + Two methods are defined to extend the type , which is the return type of this method. These two methods, namely `ThenBy` and `ThenByDescending`, enable you to specify additional sort criteria to sort a sequence. `ThenBy` and `ThenByDescending` also return an , which means any number of consecutive calls to `ThenBy` or `ThenByDescending` can be made. > [!NOTE] -> Because inherits from , you can call or on the results of a call to , , or . Doing this introduces a new primary ordering that ignores the previously established ordering. +> Because inherits from , you can call or on the results of a call to , , or . Doing this introduces a new primary ordering that ignores the previously established ordering. - This method compares keys by using the default comparer . + This method compares keys by using the default comparer . This method performs a stable sort; that is, if the keys of two elements are equal, the order of the elements is preserved. In contrast, an unstable sort does not preserve the order of elements that have the same key. - In query expression syntax, an `orderby descending` (C#) or `Order By Descending` (Visual Basic) clause translates to an invocation of . + In query expression syntax, an `orderby descending` (C#) or `Order By Descending` (Visual Basic) clause translates to an invocation of . ]]> @@ -11642,17 +11642,17 @@ If comparer is `null`, the default comparer (IEnumerable, IEnumerable)` method enumerates the two source sequences in parallel and compares corresponding elements by using the default equality comparer for `TSource`, . + The `SequenceEqual(IEnumerable, IEnumerable)` method enumerates the two source sequences in parallel and compares corresponding elements by using the default equality comparer for `TSource`, . - The default equality comparer, , is used to compare values of the types. - To compare a custom data type, you need to override the and the methods, and optionally implement the generic interface in the custom type. For more information, see the property. + The default equality comparer, , is used to compare values of the types. + To compare a custom data type, you need to override the and the methods, and optionally implement the generic interface in the custom type. For more information, see the property. ## Examples The following code examples demonstrate how to use `SequenceEqual(IEnumerable, IEnumerable)` to determine whether two sequences are equal. In the first two examples, the method determines whether the compared sequences contain references to the same objects. In the third and fourth examples, the method compares the actual data of the objects within the sequences. @@ -13080,7 +13080,7 @@ If comparer is `null`, the default comparer generic interface in your class. The following code example shows how to implement this interface in a helper class and provide and methods. + If you want to compare the actual data of the objects in the sequences instead of just comparing their references, you have to implement the generic interface in your class. The following code example shows how to implement this interface in a helper class and provide and methods. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/EncapsulatedComparer.cs" id="Snippet9"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/DistinctTSource/EncapsulatedComparer.vb" id="Snippet9"::: @@ -13168,15 +13168,15 @@ If comparer is `null`, the default comparer method enumerates the two source sequences in parallel and compares corresponding elements by using the specified . If `comparer` is `null`, the default equality comparer, , is used to compare elements. + The method enumerates the two source sequences in parallel and compares corresponding elements by using the specified . If `comparer` is `null`, the default equality comparer, , is used to compare elements. ## Examples - The following example shows how to implement an equality comparer that can be used in the method. + The following example shows how to implement an equality comparer that can be used in the method. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/CustomComparer.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/ContainsTSource/CustomComparer.vb" id="Snippet1"::: - After you implement this comparer, you can use sequences of `Product` objects in the method, as shown in the following example: + After you implement this comparer, you can use sequences of `Product` objects in the method, as shown in the following example: :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/CustomComparer.cs" id="SequenceEqual"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/ContainsTSource/CustomComparer.vb" id="Snippet8"::: @@ -13300,15 +13300,15 @@ If comparer is `null`, the default comparer method throws an exception if the input sequence is empty. To instead return `null` when the input sequence is empty, use . + The method throws an exception if the input sequence is empty. To instead return `null` when the input sequence is empty, use . ## Examples - The following code example demonstrates how to use to select the only element of an array. + The following code example demonstrates how to use to select the only element of an array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet79"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet79"::: - The following code example demonstrates that throws an exception when the sequence does not contain exactly one element. + The following code example demonstrates that throws an exception when the sequence does not contain exactly one element. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet80"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet80"::: @@ -13385,15 +13385,15 @@ If comparer is `null`, the default comparer method throws an exception if the input sequence contains no matching element. To instead return `null` when no matching element is found, use . + The method throws an exception if the input sequence contains no matching element. To instead return `null` when no matching element is found, use . ## Examples - The following code example demonstrates how to use to select the only element of an array that satisfies a condition. + The following code example demonstrates how to use to select the only element of an array that satisfies a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet81"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet81"::: - The following code example demonstrates that throws an exception when the sequence does not contain exactly one element that satisfies the condition. + The following code example demonstrates that throws an exception when the sequence does not contain exactly one element that satisfies the condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet82"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet82"::: @@ -13485,20 +13485,20 @@ If comparer is `null`, the default comparer returns a default value when the sequence is empty. + The following code example demonstrates that returns a default value when the sequence is empty. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet84"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet84"::: - Sometimes the value of `default(TSource)` is not the default value that you want to use if the collection contains no elements. Instead of checking the result for the unwanted default value and then changing it if necessary, you can use the method to specify the default value that you want to use if the collection is empty. Then, call to obtain the element. The following code example uses both techniques to obtain a default value of 1 if a collection of page numbers is empty. Because the default value for an integer is 0, which is not usually a valid page number, the default value must be specified as 1 instead. The first result variable is checked for the unwanted default value after the query has finished executing. The second result variable is obtained by using to specify a default value of 1. + Sometimes the value of `default(TSource)` is not the default value that you want to use if the collection contains no elements. Instead of checking the result for the unwanted default value and then changing it if necessary, you can use the method to specify the default value that you want to use if the collection is empty. Then, call to obtain the element. The following code example uses both techniques to obtain a default value of 1 if a collection of page numbers is empty. Because the default value for an integer is 0, which is not usually a valid page number, the default value must be specified as 1 instead. The first result variable is checked for the unwanted default value after the query has finished executing. The second result variable is obtained by using to specify a default value of 1. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet128"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet128"::: @@ -13575,12 +13575,12 @@ If comparer is `null`, the default comparer returns a default value when the sequence contains no elements that satisfy the condition. + The following code example demonstrates that returns a default value when the sequence contains no elements that satisfy the condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet86"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet86"::: @@ -13761,14 +13761,14 @@ If comparer is `null`, the default comparer method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. + The method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. This method tests each element of `source` by using `predicate` and skips the element if the result is `true`. After the predicate function returns `false` for an element, that element and the remaining elements in `source` are yielded and there are no more invocations of `predicate`. - If `predicate` returns `true` for all elements in the sequence, an empty is returned. + If `predicate` returns `true` for all elements in the sequence, an empty is returned. - The and methods are functional complements. Given a collection sequence `coll` and a pure function `p`, concatenating the results of `coll.TakeWhile(p)` and `coll.SkipWhile(p)` yields the same sequence as `coll`. + The and methods are functional complements. Given a collection sequence `coll` and a pure function `p`, concatenating the results of `coll.TakeWhile(p)` and `coll.SkipWhile(p)` yields the same sequence as `coll`. - In Visual Basic query expression syntax, a `Skip While` clause translates to an invocation of . + In Visual Basic query expression syntax, a `Skip While` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to skip elements of an array as long as a condition is true. + The following code example demonstrates how to use to skip elements of an array as long as a condition is true. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet88"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet88"::: @@ -14002,18 +14002,18 @@ If `count` is not a positive number, this method returns an identical copy of th ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - The method tests each element of `source` by using `predicate` and skips the element if the result is `true`. After the predicate function returns `false` for an element, that element and the remaining elements in `source` are yielded and there are no more invocations of `predicate`. + The method tests each element of `source` by using `predicate` and skips the element if the result is `true`. After the predicate function returns `false` for an element, that element and the remaining elements in `source` are yielded and there are no more invocations of `predicate`. - If `predicate` returns `true` for all elements in the sequence, an empty is returned. + If `predicate` returns `true` for all elements in the sequence, an empty is returned. The first argument of `predicate` represents the element to test. The second argument represents the zero-based index of the element within `source`. - The and methods are functional complements. Given a collection sequence `coll` and a pure function `p`, concatenating the results of `coll.TakeWhile(p)` and `coll.SkipWhile(p)` yields the same sequence as `coll`. + The and methods are functional complements. Given a collection sequence `coll` and a pure function `p`, concatenating the results of `coll.TakeWhile(p)` and `coll.SkipWhile(p)` yields the same sequence as `coll`. - In Visual Basic query expression syntax, a `Skip While` clause translates to an invocation of . + In Visual Basic query expression syntax, a `Skip While` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to skip elements of an array as long as a condition that depends on the element's index is true. + The following code example demonstrates how to use to skip elements of an array as long as a condition that depends on the element's index is true. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet89"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet89"::: @@ -14085,9 +14085,9 @@ If `count` is not a positive number, this method returns an identical copy of th ## Remarks -The method returns zero if `source` contains no elements. +The method returns zero if `source` contains no elements. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ]]> @@ -14148,7 +14148,7 @@ In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause transl This method returns zero if `source` contains no elements. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ]]> @@ -14209,7 +14209,7 @@ In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause transl This method returns zero if `source` contains no elements. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ]]> @@ -14270,7 +14270,7 @@ In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause transl This method returns zero if `source` contains no elements. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ]]> @@ -14331,7 +14331,7 @@ In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause transl Items in `source` that are `null` are excluded from the computation of the sum. This method returns zero if `source` contains no elements or all elements are `null`. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ]]> @@ -14392,7 +14392,7 @@ In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause transl Items in `source` that are `null` are excluded from the computation of the sum. This method returns zero if `source` contains no elements or all elements are `null`. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ]]> @@ -14453,7 +14453,7 @@ In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause transl Items in `source` that are `null` are excluded from the computation of the sum. This method returns zero if `source` contains no elements or all elements are `null`. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ]]> @@ -14514,7 +14514,7 @@ In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause transl Items in `source` that are `null` are excluded from the computation of the sum. This method returns zero if `source` contains no elements or all elements are `null`. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ]]> @@ -14575,10 +14575,10 @@ In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause transl Items in `source` that are `null` are excluded from the computation of the sum. This method returns zero if `source` contains no elements or all elements are `null`. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to sum the values of a sequence. + The following code example demonstrates how to use to sum the values of a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet121"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet121"::: @@ -14641,10 +14641,10 @@ In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause transl This method returns zero if `source` contains no elements. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to sum the values of a sequence. + The following code example demonstrates how to use to sum the values of a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet120"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet120"::: @@ -14722,10 +14722,10 @@ This method returns zero if `source` contains no elements. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -14806,10 +14806,10 @@ This method returns zero if `source` contains no elements. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet98"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet98"::: @@ -14888,10 +14888,10 @@ This method returns zero if `source` contains no elements. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -14972,10 +14972,10 @@ This method returns zero if `source` contains no elements. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -15056,10 +15056,10 @@ Items in `source` that are `null` are excluded from the computation of the sum. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Decimal)` in Visual Basic. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -15140,10 +15140,10 @@ Items in `source` that are `null` are excluded from the computation of the sum. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Double)` in Visual Basic. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -15224,10 +15224,10 @@ Items in `source` that are `null` are excluded from the computation of the sum. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Int32)` in Visual Basic. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -15308,10 +15308,10 @@ Items in `source` that are `null` are excluded from the computation of the sum. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Int64)` in Visual Basic -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -15392,10 +15392,10 @@ Items in `source` that are `null` are excluded from the computation of the sum. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically `Nullable` in C# or `Nullable(Of Single)` in Visual Basic. -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -15471,14 +15471,14 @@ In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause transl ## Remarks -The method returns zero if `source` contains no elements. +The method returns zero if `source` contains no elements. You can apply this method to a sequence of arbitrary values if you provide a function, `selector`, that projects the members of `source` into a numeric type, specifically . -In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . +In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -15555,16 +15555,16 @@ In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause transl ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - enumerates `source` and yields elements until `count` elements have been yielded or `source` contains no more elements. If `count` exceeds the number of elements in `source`, all elements of `source` are returned. + enumerates `source` and yields elements until `count` elements have been yielded or `source` contains no more elements. If `count` exceeds the number of elements in `source`, all elements of `source` are returned. - If `count` is less than or equal to zero, `source` is not enumerated and an empty is returned. + If `count` is less than or equal to zero, `source` is not enumerated and an empty is returned. - The and methods are functional complements. Given a collection sequence `coll` and an integer `n`, concatenating the results of `coll.Take(n)` and `coll.Skip(n)` yields the same sequence as `coll`. + The and methods are functional complements. Given a collection sequence `coll` and an integer `n`, concatenating the results of `coll.Take(n)` and `coll.Skip(n)` yields the same sequence as `coll`. - In Visual Basic query expression syntax, a `Take` clause translates to an invocation of . + In Visual Basic query expression syntax, a `Take` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to return elements from the start of a sequence (after it's sorted). + The following code example demonstrates how to use to return elements from the start of a sequence (after it's sorted). :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet99"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet99"::: @@ -15629,7 +15629,7 @@ In Visual Basic query expression syntax, an `Aggregate Into Sum()` clause transl This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - enumerates `source` and yields elements whose indices belong to the specified `range`. + enumerates `source` and yields elements whose indices belong to the specified `range`. ]]> @@ -15775,14 +15775,14 @@ If `count` is not a positive number, this method returns an empty enumerable col ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - The method tests each element of `source` by using `predicate` and yields the element if the result is `true`. Enumeration stops when the predicate function returns `false` for an element or when `source` contains no more elements. + The method tests each element of `source` by using `predicate` and yields the element if the result is `true`. Enumeration stops when the predicate function returns `false` for an element or when `source` contains no more elements. - The and methods are functional complements. Given a collection sequence `coll` and a pure function `p`, concatenating the results of `coll.TakeWhile(p)` and `coll.SkipWhile(p)` yields the same sequence as `coll`. + The and methods are functional complements. Given a collection sequence `coll` and a pure function `p`, concatenating the results of `coll.TakeWhile(p)` and `coll.SkipWhile(p)` yields the same sequence as `coll`. - In Visual Basic query expression syntax, a `Take While` clause translates to an invocation of . + In Visual Basic query expression syntax, a `Take While` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to return elements from the start of a sequence as long as a condition is true. + The following code example demonstrates how to use to return elements from the start of a sequence as long as a condition is true. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet100"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet100"::: @@ -15857,16 +15857,16 @@ If `count` is not a positive number, this method returns an empty enumerable col ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - The method tests each element of `source` by using `predicate` and yields the element if the result is `true`. Enumeration stops when the predicate function returns `false` for an element or when `source` contains no more elements. + The method tests each element of `source` by using `predicate` and yields the element if the result is `true`. Enumeration stops when the predicate function returns `false` for an element or when `source` contains no more elements. The first argument of `predicate` represents the element to test. The second argument represents the zero-based index of the element within `source`. - The and methods are functional complements. Given a collection sequence `coll` and a pure function `p`, concatenating the results of `coll.TakeWhile(p)` and `coll.SkipWhile(p)` yields the same sequence as `coll`. + The and methods are functional complements. Given a collection sequence `coll` and a pure function `p`, concatenating the results of `coll.TakeWhile(p)` and `coll.SkipWhile(p)` yields the same sequence as `coll`. - In Visual Basic query expression syntax, a `Take While` clause translates to an invocation of . + In Visual Basic query expression syntax, a `Take While` clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to return elements from the start of a sequence as long as a condition that uses the element's index is true. + The following code example demonstrates how to use to return elements from the start of a sequence as long as a condition that uses the element's index is true. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet101"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet101"::: @@ -15963,19 +15963,19 @@ If `count` is not a positive number, this method returns an empty enumerable col To order a sequence by the values of the elements themselves, specify the identity function (`x => x` in C# or `Function(x) x` in Visual Basic) for `keySelector`. - and are defined to extend the type , which is also the return type of these methods. This design enables you to specify multiple sort criteria by applying any number of or methods. + and are defined to extend the type , which is also the return type of these methods. This design enables you to specify multiple sort criteria by applying any number of or methods. > [!NOTE] -> Because inherits from , you can call or on the results of a call to , , or . Doing this introduces a new primary ordering that ignores the previously established ordering. +> Because inherits from , you can call or on the results of a call to , , or . Doing this introduces a new primary ordering that ignores the previously established ordering. - This method compares keys by using the default comparer . + This method compares keys by using the default comparer . This method performs a stable sort; that is, if the keys of two elements are equal, the order of the elements is preserved. In contrast, an unstable sort does not preserve the order of elements that have the same key. - In query expression syntax, an `orderby [first criterion], [second criterion]` (C#) or `Order By [first criterion], [second criterion]` (Visual Basic) clause translates to an invocation of . + In query expression syntax, an `orderby [first criterion], [second criterion]` (C#) or `Order By [first criterion], [second criterion]` (Visual Basic) clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to perform a secondary ordering of the elements in a sequence. + The following code example demonstrates how to use to perform a secondary ordering of the elements in a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet102"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet102"::: @@ -16072,12 +16072,12 @@ If `count` is not a positive number, this method returns an empty enumerable col To order a sequence by the values of the elements themselves, specify the identity function (`x => x` in C# or `Function(x) x` in Visual Basic) for `keySelector`. - and are defined to extend the type , which is also the return type of these methods. This design enables you to specify multiple sort criteria by applying any number of or methods. + and are defined to extend the type , which is also the return type of these methods. This design enables you to specify multiple sort criteria by applying any number of or methods. > [!NOTE] -> Because inherits from , you can call or on the results of a call to , , or . Doing this introduces a new primary ordering that ignores the previously established ordering. +> Because inherits from , you can call or on the results of a call to , , or . Doing this introduces a new primary ordering that ignores the previously established ordering. - If `comparer` is `null`, the default comparer is used to compare keys. + If `comparer` is `null`, the default comparer is used to compare keys. This method performs a stable sort; that is, if the keys of two elements are equal, the order of the elements is preserved. In contrast, an unstable sort does not preserve the order of elements that have the same key. @@ -16172,18 +16172,18 @@ If `count` is not a positive number, this method returns an empty enumerable col To order a sequence by the values of the elements themselves, specify the identity function (`x => x` in C# or `Function(x) x` in Visual Basic) for `keySelector`. - and are defined to extend the type , which is also the return type of these methods. This design enables you to specify multiple sort criteria by applying any number of or methods. + and are defined to extend the type , which is also the return type of these methods. This design enables you to specify multiple sort criteria by applying any number of or methods. > [!NOTE] -> Because inherits from , you can call or on the results of a call to , , or . Doing this introduces a new primary ordering that ignores the previously established ordering. +> Because inherits from , you can call or on the results of a call to , , or . Doing this introduces a new primary ordering that ignores the previously established ordering. - This sorting method compares keys by using the default comparer . + This sorting method compares keys by using the default comparer . This method performs a stable sort; that is, if the keys of two elements are equal, the order of the elements is preserved. In contrast, an unstable sort does not preserve the order of elements that have the same key. - In C# query expression syntax, an `orderby [first criterion], [second criterion] descending` clause translates to an invocation of . + In C# query expression syntax, an `orderby [first criterion], [second criterion] descending` clause translates to an invocation of . - In Visual Basic query expression syntax, an `Order By [first criterion], [second criterion] Descending` clause translates to an invocation of . + In Visual Basic query expression syntax, an `Order By [first criterion], [second criterion] Descending` clause translates to an invocation of . ]]> @@ -16277,17 +16277,17 @@ If `count` is not a positive number, this method returns an empty enumerable col To order a sequence by the values of the elements themselves, specify the identity function (`x => x` in C# or `Function(x) x` in Visual Basic) for `keySelector`. - and are defined to extend the type , which is also the return type of these methods. This design enables you to specify multiple sort criteria by applying any number of or methods. + and are defined to extend the type , which is also the return type of these methods. This design enables you to specify multiple sort criteria by applying any number of or methods. > [!NOTE] -> Because inherits from , you can call or on the results of a call to , , or . Doing this introduces a new primary ordering that ignores the previously established ordering. +> Because inherits from , you can call or on the results of a call to , , or . Doing this introduces a new primary ordering that ignores the previously established ordering. - If `comparer` is `null`, the default comparer is used to compare keys. + If `comparer` is `null`, the default comparer is used to compare keys. This method performs a stable sort; that is, if the keys of two elements are equal, the order of the elements is preserved. In contrast, an unstable sort does not preserve the order of elements that have the same key. ## Examples - The following code example demonstrates how to use to perform a secondary ordering of the elements in a sequence in descending order by using a custom comparer. + The following code example demonstrates how to use to perform a secondary ordering of the elements in a sequence in descending order by using a custom comparer. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet103"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet103"::: @@ -16357,12 +16357,12 @@ If `count` is not a positive number, this method returns an empty enumerable col method forces immediate query evaluation and returns an array that contains the query results. You can append this method to your query in order to obtain a cached copy of the query results. + The method forces immediate query evaluation and returns an array that contains the query results. You can append this method to your query in order to obtain a cached copy of the query results. - has similar behavior but returns a instead of an array. + has similar behavior but returns a instead of an array. ## Examples - The following code example demonstrates how to use to force immediate query evaluation and return an array of results. + The following code example demonstrates how to use to force immediate query evaluation and return an array of results. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet104"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet104"::: @@ -16705,10 +16705,10 @@ If `count` is not a positive number, this method returns an empty enumerable col method uses the default equality comparer to compare keys. + The method uses the default equality comparer to compare keys. ## Examples - The following code example demonstrates how to use to create a by using a key selector. + The following code example demonstrates how to use to create a by using a key selector. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet105"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet105"::: @@ -16798,7 +16798,7 @@ If `count` is not a positive number, this method returns an empty enumerable col is used to compare keys. + If `comparer` is `null`, the default equality comparer is used to compare keys. ]]> @@ -16892,7 +16892,7 @@ If `count` is not a positive number, this method returns an empty enumerable col method uses the default equality comparer to compare keys. + The method uses the default equality comparer to compare keys. ]]> @@ -16990,7 +16990,7 @@ If `count` is not a positive number, this method returns an empty enumerable col is used to compare keys. + If `comparer` is `null`, the default equality comparer is used to compare keys. ]]> @@ -17185,12 +17185,12 @@ If `count` is not a positive number, this method returns an empty enumerable col method forces immediate query evaluation and returns a that contains the query results. You can append this method to your query in order to obtain a cached copy of the query results. + The method forces immediate query evaluation and returns a that contains the query results. You can append this method to your query in order to obtain a cached copy of the query results. - has similar behavior but returns an array instead of a . + has similar behavior but returns an array instead of a . ## Examples - The following code example demonstrates how to use to force immediate query evaluation and return a that contains the query results. + The following code example demonstrates how to use to force immediate query evaluation and return a that contains the query results. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet106"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet106"::: @@ -17282,9 +17282,9 @@ If `count` is not a positive number, this method returns an empty enumerable col method returns a , a one-to-many dictionary that maps keys to collections of values. A differs from a , which performs a one-to-one mapping of keys to single values. + The method returns a , a one-to-many dictionary that maps keys to collections of values. A differs from a , which performs a one-to-one mapping of keys to single values. - The default equality comparer is used to compare keys. + The default equality comparer is used to compare keys. ]]> @@ -17372,9 +17372,9 @@ If `count` is not a positive number, this method returns an empty enumerable col method returns a , a one-to-many dictionary that maps keys to collections of values. A is different to a , which performs a one-to-one mapping of keys to single values. + The method returns a , a one-to-many dictionary that maps keys to collections of values. A is different to a , which performs a one-to-one mapping of keys to single values. - If `comparer` is `null`, the default equality comparer is used to compare keys. + If `comparer` is `null`, the default equality comparer is used to compare keys. ]]> @@ -17463,12 +17463,12 @@ If `count` is not a positive number, this method returns an empty enumerable col method returns a , a one-to-many dictionary that maps keys to collections of values. A differs from a , which performs a one-to-one mapping of keys to single values. + The method returns a , a one-to-many dictionary that maps keys to collections of values. A differs from a , which performs a one-to-one mapping of keys to single values. - The default equality comparer is used to compare keys. + The default equality comparer is used to compare keys. ## Examples - The following code example demonstrates how to use to create a by using a key selector function and an element selector function. + The following code example demonstrates how to use to create a by using a key selector function and an element selector function. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" id="Snippet107"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet107"::: @@ -17570,9 +17570,9 @@ If `count` is not a positive number, this method returns an empty enumerable col method returns a , a one-to-many dictionary that maps keys to collections of values. A differs from a , which performs a one-to-one mapping of keys to single values. + The method returns a , a one-to-many dictionary that maps keys to collections of values. A differs from a , which performs a one-to-one mapping of keys to single values. - If `comparer` is `null`, the default equality comparer is used to compare keys. + If `comparer` is `null`, the default equality comparer is used to compare keys. ]]> @@ -17715,9 +17715,9 @@ The method is typically a constant-time operation, but ultimately this depends o ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - This method excludes duplicates from the return set. This is different behavior to the method, which returns all the elements in the input sequences including duplicates. + This method excludes duplicates from the return set. This is different behavior to the method, which returns all the elements in the input sequences including duplicates. - The default equality comparer, , is used to compare values of the types that implement the generic interface. To compare a custom data type, you need to implement this interface and provide your own and methods for the type. + The default equality comparer, , is used to compare values of the types that implement the generic interface. To compare a custom data type, you need to implement this interface and provide your own and methods for the type. When the object returned by this method is enumerated, `Union` enumerates `first` and `second` in that order and yields each element that has not already been yielded. @@ -17727,7 +17727,7 @@ The method is typically a constant-time operation, but ultimately this depends o :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet109"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet109"::: - If you want to compare sequences of objects of some custom data type, you have to implement the generic interface in a helper class. The following code example shows how to implement this interface in a custom data type and override and methods. + If you want to compare sequences of objects of some custom data type, you have to implement the generic interface in a helper class. The following code example shows how to implement this interface in a custom data type and override and methods. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/EncapsulatedComparer.cs" id="Snippet9"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/DistinctTSource/EncapsulatedComparer.vb" id="Snippet9"::: @@ -17819,19 +17819,19 @@ The method is typically a constant-time operation, but ultimately this depends o ## Remarks This method is implemented by using deferred execution. The immediate return value is an object that stores all the information that is required to perform the action. The query represented by this method is not executed until the object is enumerated either by calling its `GetEnumerator` method directly or by using `foreach` in C# or `For Each` in Visual Basic. - If `comparer` is `null`, the default equality comparer, , is used to compare values. + If `comparer` is `null`, the default equality comparer, , is used to compare values. - When the object returned by this method is enumerated, enumerates `first` and `second` in that order and yields each element that has not already been yielded. + When the object returned by this method is enumerated, enumerates `first` and `second` in that order and yields each element that has not already been yielded. - The method differs from the method because the method returns all the elements in the input sequences including duplicates, whereas returns only unique values. + The method differs from the method because the method returns all the elements in the input sequences including duplicates, whereas returns only unique values. ## Examples - The following example shows how to implement an equality comparer that can be used in the method. + The following example shows how to implement an equality comparer that can be used in the method. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/CustomComparer.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/ContainsTSource/CustomComparer.vb" id="Snippet1"::: - After you implement this comparer, you can use sequences of `Product` objects in the method, as shown in the following example: + After you implement this comparer, you can use sequences of `Product` objects in the method, as shown in the following example: :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/Comparers/CustomComparer.cs" id="Union"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/ContainsTSource/CustomComparer.vb" id="Snippet2"::: @@ -17910,7 +17910,7 @@ This method is implemented by using deferred execution. The immediate return val The default equality comparer, , is used to compare values. -When the object returned by this method is enumerated, enumerates `first` and `second` in that order and yields each element that has not already been yielded. +When the object returned by this method is enumerated, enumerates `first` and `second` in that order and yields each element that has not already been yielded. ]]> @@ -17994,7 +17994,7 @@ This method is implemented by using deferred execution. The immediate return val If `comparer` is `null`, the default equality comparer, , is used to compare values. -When the object returned by this method is enumerated, enumerates `first` and `second` in that order and yields each element that has not already been yielded. +When the object returned by this method is enumerated, enumerates `first` and `second` in that order and yields each element that has not already been yielded. ]]> @@ -18077,10 +18077,10 @@ When the object returned by this method is enumerated, . + In query expression syntax, a `where` (C#) or `Where` (Visual Basic) clause translates to an invocation of . ## Examples - The following code example demonstrates how to use to filter a sequence. + The following code example demonstrates how to use to filter a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet110"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet110"::: @@ -18159,7 +18159,7 @@ When the object returned by this method is enumerated, to filter a sequence based on a predicate that involves the index of each element. + The following code example demonstrates how to use to filter a sequence based on a predicate that involves the index of each element. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet111"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet111"::: @@ -18327,7 +18327,7 @@ When the object returned by this method is enumerated, method to merge two sequences. + The following code example demonstrates how to use the method to merge two sequences. :::code language="csharp" source="~/snippets/csharp/System.Linq/Enumerable/AggregateTSource/enumerable.cs" interactive="try-dotnet-method" id="Snippet200"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Enumerable/AggregateTSource/Enumerable.vb" id="Snippet200"::: diff --git a/xml/System.Linq/IGrouping`2.xml b/xml/System.Linq/IGrouping`2.xml index 93a0ee441e1..c60ab440df2 100644 --- a/xml/System.Linq/IGrouping`2.xml +++ b/xml/System.Linq/IGrouping`2.xml @@ -85,22 +85,22 @@ is an that additionally has a key. The key represents the attribute that is common to each value in the . + An is an that additionally has a key. The key represents the attribute that is common to each value in the . - The values of an are accessed much as the elements of an are accessed. For example, you can access the values by using a `foreach` in Visual C# or `For Each` in Visual Basic loop to iterate through the object. The Example section contains a code example that shows you how to access both the key and the values of an object. + The values of an are accessed much as the elements of an are accessed. For example, you can access the values by using a `foreach` in Visual C# or `For Each` in Visual Basic loop to iterate through the object. The Example section contains a code example that shows you how to access both the key and the values of an object. - The type is used by the standard query operator methods, which return a sequence of elements of type . + The type is used by the standard query operator methods, which return a sequence of elements of type . ## Examples - The following example demonstrates how to work with an object. + The following example demonstrates how to work with an object. - In this example, is called on the array of objects returned by . groups the objects based on the value of their property. Each unique value for in the array of objects becomes a key for a new object, and the objects that have that key form the object's sequence of values. + In this example, is called on the array of objects returned by . groups the objects based on the value of their property. Each unique value for in the array of objects becomes a key for a new object, and the objects that have that key form the object's sequence of values. - Finally, the method is called on the sequence of objects to obtain just the first object. + Finally, the method is called on the sequence of objects to obtain just the first object. - The example then outputs the key of the object and the property of each value in the object's sequence of values. Notice that to access an object's sequence of values, you simply use the variable itself. + The example then outputs the key of the object and the property of each value in the object's sequence of values. Notice that to access an object's sequence of values, you simply use the variable itself. :::code language="csharp" source="~/snippets/csharp/System.Linq/IGroupingTKey,TElement/Overview/igrouping.cs" interactive="try-dotnet-method" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/IGroupingTKey,TElement/Overview/IGrouping.vb" id="Snippet1"::: @@ -153,12 +153,12 @@ represents the attribute that is common to each value in the . + The key of an represents the attribute that is common to each value in the . ## Examples - The following example demonstrates how to use the property to label each object in a sequence of objects. The method is used to obtain a sequence of objects. The `foreach` in Visual C# or `For Each` in Visual Basic loop then iterates through each object, outputting its key and the number of values it contains. + The following example demonstrates how to use the property to label each object in a sequence of objects. The method is used to obtain a sequence of objects. The `foreach` in Visual C# or `For Each` in Visual Basic loop then iterates through each object, outputting its key and the number of values it contains. :::code language="csharp" source="~/snippets/csharp/System.Linq/IGroupingTKey,TElement/Overview/igrouping.cs" interactive="try-dotnet-method" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/IGroupingTKey,TElement/Overview/IGrouping.vb" id="Snippet2"::: diff --git a/xml/System.Linq/ILookup`2.xml b/xml/System.Linq/ILookup`2.xml index f39b4755f79..b4e34f47b39 100644 --- a/xml/System.Linq/ILookup`2.xml +++ b/xml/System.Linq/ILookup`2.xml @@ -73,21 +73,21 @@ The type of the elements in the sequences that make up the values in the . Defines an indexer, size property, and Boolean search method for data structures that map keys to sequences of values. - implements the interface. - - The extension method , which can be appended to the end of a LINQ query, returns an object of type . - - - -## Examples - The following code example creates an object and iterates through its contents. - + implements the interface. + + The extension method , which can be appended to the end of a LINQ query, returns an object of type . + + + +## Examples + The following code example creates an object and iterates through its contents. + :::code language="csharp" source="~/snippets/csharp/System.Linq/ILookupTKey,TElement/Overview/ILookup.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Linq/ILookupTKey,TElement/Overview/ILookup.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Linq/ILookupTKey,TElement/Overview/ILookup.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Linq/IOrderedEnumerable`1.xml b/xml/System.Linq/IOrderedEnumerable`1.xml index f71899bdcdb..a7f017d2566 100644 --- a/xml/System.Linq/IOrderedEnumerable`1.xml +++ b/xml/System.Linq/IOrderedEnumerable`1.xml @@ -67,22 +67,22 @@ The type of the elements of the sequence. Represents a sorted sequence. - . - - The extension methods and operate on objects of type . An object of type can be obtained by calling one of the primary sort methods, or , which return an . and , the subordinate sort methods, in turn also return an object of type . This design allows for any number of consecutive calls to or , where each call performs a subordinate ordering on the sorted data returned from the previous call. - - - -## Examples - The following example demonstrates how to perform a primary and secondary ordering on an array of strings. It also demonstrates that the resulting is enumerable. - + . + + The extension methods and operate on objects of type . An object of type can be obtained by calling one of the primary sort methods, or , which return an . and , the subordinate sort methods, in turn also return an object of type . This design allows for any number of consecutive calls to or , where each call performs a subordinate ordering on the sorted data returned from the previous call. + + + +## Examples + The following example demonstrates how to perform a primary and secondary ordering on an array of strings. It also demonstrates that the resulting is enumerable. + :::code language="csharp" source="~/snippets/csharp/System.Linq/IOrderedEnumerableTElement/Overview/IOrderedEnumerable.cs" interactive="try-dotnet-method" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/IOrderedEnumerableTElement/Overview/IOrderedEnumerable.vb" id="Snippet1"::: - + ]]> @@ -158,16 +158,16 @@ Performs a subsequent ordering on the elements of an according to a key. An whose elements are sorted according to a key. - or , depending on whether `descending` is `true` or `false`. They both perform a subordinate ordering of an already sorted sequence of type . - - - -## Examples - The following code example demonstrates how to use to perform a secondary ordering on an . - + or , depending on whether `descending` is `true` or `false`. They both perform a subordinate ordering of an already sorted sequence of type . + + + +## Examples + The following code example demonstrates how to use to perform a secondary ordering on an . + :::code language="csharp" source="~/snippets/csharp/System.Linq/IOrderedEnumerableTElement/Overview/IOrderedEnumerable.cs" interactive="try-dotnet-method" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/IOrderedEnumerableTElement/Overview/IOrderedEnumerable.vb" id="Snippet2"::: diff --git a/xml/System.Linq/IOrderedQueryable.xml b/xml/System.Linq/IOrderedQueryable.xml index 51f2b94f5a8..3e0a8eb5118 100644 --- a/xml/System.Linq/IOrderedQueryable.xml +++ b/xml/System.Linq/IOrderedQueryable.xml @@ -58,15 +58,15 @@ Represents the result of a sorting operation. - interface is intended for implementation by query providers. - - This interface represents the result of a sorting query that calls the method(s) , , or . When is called and passed an expression tree that represents a sorting query, the resulting object must be of a type that implements . - - For more information about how to create your own LINQ provider, see [LINQ: Building an IQueryable Provider](https://learn.microsoft.com/archive/blogs/mattwar/linq-building-an-iqueryable-provider-part-i). - + interface is intended for implementation by query providers. + + This interface represents the result of a sorting query that calls the method(s) , , or . When is called and passed an expression tree that represents a sorting query, the resulting object must be of a type that implements . + + For more information about how to create your own LINQ provider, see [LINQ: Building an IQueryable Provider](https://learn.microsoft.com/archive/blogs/mattwar/linq-building-an-iqueryable-provider-part-i). + ]]> diff --git a/xml/System.Linq/IOrderedQueryable`1.xml b/xml/System.Linq/IOrderedQueryable`1.xml index fd78b42386b..d2e322efc36 100644 --- a/xml/System.Linq/IOrderedQueryable`1.xml +++ b/xml/System.Linq/IOrderedQueryable`1.xml @@ -83,15 +83,15 @@ The type of the content of the data source. Represents the result of a sorting operation. - interface is intended for implementation by query providers. - - This interface represents the result of a sorting query that calls the method(s) , , or . When is called and passed an expression tree that represents a sorting query, the resulting object must be of a type that implements . - - For more information about how to create your own LINQ provider, see [LINQ: Building an IQueryable Provider](https://learn.microsoft.com/archive/blogs/mattwar/linq-building-an-iqueryable-provider-part-i). - + interface is intended for implementation by query providers. + + This interface represents the result of a sorting query that calls the method(s) , , or . When is called and passed an expression tree that represents a sorting query, the resulting object must be of a type that implements . + + For more information about how to create your own LINQ provider, see [LINQ: Building an IQueryable Provider](https://learn.microsoft.com/archive/blogs/mattwar/linq-building-an-iqueryable-provider-part-i). + ]]> diff --git a/xml/System.Linq/IQueryProvider.xml b/xml/System.Linq/IQueryProvider.xml index c0b44cf1223..e8929c3a75a 100644 --- a/xml/System.Linq/IQueryProvider.xml +++ b/xml/System.Linq/IQueryProvider.xml @@ -113,9 +113,9 @@ > [!NOTE] > The property of the returned object is equal to `expression`. - The method is used to create new objects, given an expression tree. The query that is represented by the returned object is associated with a specific LINQ provider. + The method is used to create new objects, given an expression tree. The query that is represented by the returned object is associated with a specific LINQ provider. - Several of the standard query operator methods defined in , such as and , call this method. They pass it a that represents a LINQ query. + Several of the standard query operator methods defined in , such as and , call this method. They pass it a that represents a LINQ query. ]]> @@ -183,9 +183,9 @@ ## Remarks > [!NOTE] -> The property of the returned object is equal to `expression`. +> The property of the returned object is equal to `expression`. - The method is used to create new objects, given an expression tree. The query that is represented by the returned object is associated with a specific LINQ provider. + The method is used to create new objects, given an expression tree. The query that is represented by the returned object is associated with a specific LINQ provider. Most of the standard query operator methods that return enumerable results call this method. They pass it a that represents a LINQ query. @@ -243,7 +243,7 @@ method executes queries that return a single value (instead of an enumerable sequence of values). Expression trees that represent queries that return enumerable results are executed when their associated object is enumerated. + The method executes queries that return a single value (instead of an enumerable sequence of values). Expression trees that represent queries that return enumerable results are executed when their associated object is enumerated. ]]> @@ -309,9 +309,9 @@ method executes queries that return a single value (instead of an enumerable sequence of values). Expression trees that represent queries that return enumerable results are executed when the object that contains the expression tree is enumerated. + The method executes queries that return a single value (instead of an enumerable sequence of values). Expression trees that represent queries that return enumerable results are executed when the object that contains the expression tree is enumerated. - The standard query operator methods that return singleton results call . They pass it a that represents a LINQ query. + The standard query operator methods that return singleton results call . They pass it a that represents a LINQ query. ]]> diff --git a/xml/System.Linq/IQueryable.xml b/xml/System.Linq/IQueryable.xml index 7bccc13a41e..edd777babe4 100644 --- a/xml/System.Linq/IQueryable.xml +++ b/xml/System.Linq/IQueryable.xml @@ -54,9 +54,9 @@ interface is intended for implementation by query providers. It is only supposed to be implemented by providers that also implement . If the provider does not also implement , the standard query operators cannot be used on the provider's data source. + The interface is intended for implementation by query providers. It is only supposed to be implemented by providers that also implement . If the provider does not also implement , the standard query operators cannot be used on the provider's data source. - The interface inherits the interface so that if it represents a query, the results of that query can be enumerated. Enumeration causes the expression tree associated with an object to be executed. The definition of "executing an expression tree" is specific to a query provider. For example, it may involve translating the expression tree to an appropriate query language for the underlying data source. Queries that do not return enumerable results are executed when the method is called. + The interface inherits the interface so that if it represents a query, the results of that query can be enumerated. Enumeration causes the expression tree associated with an object to be executed. The definition of "executing an expression tree" is specific to a query provider. For example, it may involve translating the expression tree to an appropriate query language for the underlying data source. Queries that do not return enumerable results are executed when the method is called. For more information about how to create your own LINQ provider, see [LINQ: Building an IQueryable Provider](https://learn.microsoft.com/archive/blogs/mattwar/linq-building-an-iqueryable-provider-part-i). diff --git a/xml/System.Linq/IQueryable`1.xml b/xml/System.Linq/IQueryable`1.xml index e89636147a2..0e98d11f97d 100644 --- a/xml/System.Linq/IQueryable`1.xml +++ b/xml/System.Linq/IQueryable`1.xml @@ -75,21 +75,21 @@ The type of the data in the data source. Provides functionality to evaluate queries against a specific data source wherein the type of the data is known. - interface is intended for implementation by query providers. - - This interface inherits the interface so that if it represents a query, the results of that query can be enumerated. Enumeration forces the expression tree associated with an object to be executed. Queries that do not return enumerable results are executed when the method is called. - - The definition of "executing an expression tree" is specific to a query provider. For example, it may involve translating the expression tree to a query language appropriate for an underlying data source. - - The interface enables queries to be polymorphic. That is, because a query against an `IQueryable` data source is represented as an expression tree, it can be executed against different types of data sources. - - The `static` (`Shared` in Visual Basic) methods defined in the class (except for , , and ) extend objects of types that implement the interface. - + interface is intended for implementation by query providers. + + This interface inherits the interface so that if it represents a query, the results of that query can be enumerated. Enumeration forces the expression tree associated with an object to be executed. Queries that do not return enumerable results are executed when the method is called. + + The definition of "executing an expression tree" is specific to a query provider. For example, it may involve translating the expression tree to a query language appropriate for an underlying data source. + + The interface enables queries to be polymorphic. That is, because a query against an `IQueryable` data source is represented as an expression tree, it can be executed against different types of data sources. + + The `static` (`Shared` in Visual Basic) methods defined in the class (except for , , and ) extend objects of types that implement the interface. + For more information about how to create your own LINQ provider, see [LINQ: Building an IQueryable Provider](https://learn.microsoft.com/archive/blogs/mattwar/linq-building-an-iqueryable-provider-part-i). - + ]]> diff --git a/xml/System.Linq/ImmutableArrayExtensions.xml b/xml/System.Linq/ImmutableArrayExtensions.xml index a8996ba829c..d19266d2a94 100644 --- a/xml/System.Linq/ImmutableArrayExtensions.xml +++ b/xml/System.Linq/ImmutableArrayExtensions.xml @@ -99,7 +99,7 @@ method makes it simple to perform a calculation over a sequence of values. This method works by calling `func` one time for each element in source. Each time `func` is called, passes both the element from the sequence and an aggregated value (as the first argument to func). The value of the `seed` parameter is used as the initial aggregate value. The result of `func` replaces the previous aggregated value. returns the final result of `func`. + method makes it simple to perform a calculation over a sequence of values. This method works by calling `func` one time for each element in source. Each time `func` is called, passes both the element from the sequence and an aggregated value (as the first argument to func). The value of the `seed` parameter is used as the initial aggregate value. The result of `func` replaces the previous aggregated value. returns the final result of `func`. ]]> @@ -175,7 +175,7 @@ method makes it simple to perform a calculation over a sequence of values. This method works by calling `func` one time for each element in source. Each time `func` is called, passes both the element from the sequence and an aggregated value (as the first argument to func). The value of the `seed` parameter is used as the initial aggregate value. The result of `func` replaces the previous aggregated value. returns the final result of `func`. + method makes it simple to perform a calculation over a sequence of values. This method works by calling `func` one time for each element in source. Each time `func` is called, passes both the element from the sequence and an aggregated value (as the first argument to func). The value of the `seed` parameter is used as the initial aggregate value. The result of `func` replaces the previous aggregated value. returns the final result of `func`. ]]> @@ -262,7 +262,7 @@ method makes it simple to perform a calculation over a sequence of values. This method works by calling `func` one time for each element in source. Each time `func` is called, passes both the element from the sequence and an aggregated value (as the first argument to func). The value of the `seed` parameter is used as the initial aggregate value. The result of `func` replaces the previous aggregated value. returns the final result of `func`. + method makes it simple to perform a calculation over a sequence of values. This method works by calling `func` one time for each element in source. Each time `func` is called, passes both the element from the sequence and an aggregated value (as the first argument to func). The value of the `seed` parameter is used as the initial aggregate value. The result of `func` replaces the previous aggregated value. returns the final result of `func`. ]]> diff --git a/xml/System.Linq/Lookup`2.xml b/xml/System.Linq/Lookup`2.xml index 0b03098a5f6..83915fcbc50 100644 --- a/xml/System.Linq/Lookup`2.xml +++ b/xml/System.Linq/Lookup`2.xml @@ -88,17 +88,17 @@ resembles a . The difference is that a maps keys to single values, whereas a maps keys to collections of values. + A resembles a . The difference is that a maps keys to single values, whereas a maps keys to collections of values. - You can create an instance of a by calling on an object that implements . + You can create an instance of a by calling on an object that implements . > [!NOTE] -> There is no public constructor to create a new instance of a . Additionally, objects are immutable, that is, you cannot add or remove elements or keys from a object after it has been created. +> There is no public constructor to create a new instance of a . Additionally, objects are immutable, that is, you cannot add or remove elements or keys from a object after it has been created. ## Examples - The following example creates a from a collection of objects. It then enumerates the and outputs each key and each value in the key's associated collection of values. It also demonstrates how to use the properties and and the methods and . + The following example creates a from a collection of objects. It then enumerates the and outputs each key and each value in the key's associated collection of values. It also demonstrates how to use the properties and and the methods and . :::code language="csharp" source="~/snippets/csharp/System.Linq/LookupTKey,TElement/Overview/lookup.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/LookupTKey,TElement/Overview/Lookup.vb" id="Snippet1"::: @@ -228,7 +228,7 @@ to determine whether a contains a specified key. This code example is part of a larger example provided for the class. + The following example demonstrates how to use to determine whether a contains a specified key. This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Linq/LookupTKey,TElement/Overview/lookup.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/LookupTKey,TElement/Overview/Lookup.vb" id="Snippet4"::: @@ -290,12 +290,12 @@ property does not change because items cannot be added to or removed from a object after it has been created. + The value of the property does not change because items cannot be added to or removed from a object after it has been created. ## Examples - The following example demonstrates how to use to determine the number of key/value collection pairs in a . This code example is part of a larger example provided for the class. + The following example demonstrates how to use to determine the number of key/value collection pairs in a . This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Linq/LookupTKey,TElement/Overview/lookup.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/LookupTKey,TElement/Overview/Lookup.vb" id="Snippet2"::: @@ -363,7 +363,7 @@ to iterate through the keys and values of a . This code example is part of a larger example provided for the class. + The following example demonstrates how to use to iterate through the keys and values of a . This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Linq/LookupTKey,TElement/Overview/lookup.cs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/LookupTKey,TElement/Overview/Lookup.vb" id="Snippet5"::: @@ -423,12 +423,12 @@ by using the following syntax: `myLookup[key]` in Visual C# or `myLookup(key)` in Visual Basic. If the `key` is not found in the collection, an empty sequence is returned. + This indexed property provides the ability to index a specific collection of values in the by using the following syntax: `myLookup[key]` in Visual C# or `myLookup(key)` in Visual Basic. If the `key` is not found in the collection, an empty sequence is returned. ## Examples - The following example demonstrates how to use to index directly into a . This code example is part of a larger example provided for the class. + The following example demonstrates how to use to index directly into a . This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Linq/LookupTKey,TElement/Overview/lookup.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/LookupTKey,TElement/Overview/Lookup.vb" id="Snippet3"::: diff --git a/xml/System.Linq/ParallelEnumerable.xml b/xml/System.Linq/ParallelEnumerable.xml index 233165fccea..32fe8686b2e 100644 --- a/xml/System.Linq/ParallelEnumerable.xml +++ b/xml/System.Linq/ParallelEnumerable.xml @@ -955,7 +955,7 @@ operator can be used to convert a ParallelQuery to a ParallelQuery(T). + The operator can be used to convert a ParallelQuery to a ParallelQuery(T). ]]> @@ -2521,7 +2521,7 @@ and a right data source of type . Otherwise, the Concat operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. + This overload exists to disallow usage of Concat with a left data source of type and a right data source of type . Otherwise, the Concat operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. ]]> @@ -3404,7 +3404,7 @@ and a right data source of type . Otherwise, the Except operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. + This overload exists to disallow usage of Except with a left data source of type and a right data source of type . Otherwise, the Except operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. ]]> @@ -3554,7 +3554,7 @@ and a right data source of type . Otherwise, the Except operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. + This overload exists to disallow usage of Except with a left data source of type and a right data source of type . Otherwise, the Except operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. ]]> @@ -4825,7 +4825,7 @@ and a right data source of type . Otherwise, the GroupJoin operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. + This overload exists to disallow usage of GroupJoin with a left data source of type and a right data source of type . Otherwise, the GroupJoin operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. ]]> @@ -5041,7 +5041,7 @@ and a right data source of type . Otherwise, the GroupJoin operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. + This overload exists to disallow usage of GroupJoin with a left data source of type and a right data source of type . Otherwise, the GroupJoin operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. ]]> @@ -5228,7 +5228,7 @@ and a right data source of type . Otherwise, the Intersect operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. + This overload exists to disallow usage of Intersect with a left data source of type and a right data source of type . Otherwise, the Intersect operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. ]]> @@ -5378,7 +5378,7 @@ and a right data source of type . Otherwise, the Intersect operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. + This overload exists to disallow usage of Intersect with a left data source of type and a right data source of type . Otherwise, the Intersect operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. ]]> @@ -5565,7 +5565,7 @@ and a right data source of type . Otherwise, the Join operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. + This overload exists to disallow usage Join with a left data source of type and a right data source of type . Otherwise, the Join operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. ]]> @@ -5781,7 +5781,7 @@ and a right data source of type . Otherwise, the Join operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. + This overload exists to disallow usage of Join with a left data source of type and a right data source of type . Otherwise, the Join operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. ]]> @@ -9144,7 +9144,7 @@ for an approach to implementing a stable sort. + In contrast to the sequential implementation, this is not a stable sort. See the remarks for for an approach to implementing a stable sort. ]]> @@ -9232,7 +9232,7 @@ for an approach to implementing a stable sort. + In contrast to the sequential implementation, this is not a stable sort. See the remarks for for an approach to implementing a stable sort. ]]> @@ -9320,7 +9320,7 @@ for an approach to implementing a stable sort. + In contrast to the sequential implementation, this is not a stable sort. See the remarks for for an approach to implementing a stable sort. ]]> @@ -10046,7 +10046,7 @@ and a right data source of type . Otherwise, the SequenceEqual operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. + This overload exists to disallow usage of SequenceEqual with a left data source of type and a right data source of type . Otherwise, the SequenceEqual operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. ]]> @@ -10191,7 +10191,7 @@ and a right data source of type . Otherwise, the SequenceEqual operator would appear to be binding to the parallel implementation, but would in reality bind to sequential implementation. + This overload exists to disallow usage of SequenceEqual with a left data source of type and a right data source of type . Otherwise, the SequenceEqual operator would appear to be binding to the parallel implementation, but would in reality bind to sequential implementation. ]]> @@ -12143,7 +12143,7 @@ for an approach to implementing a stable sort. + In contrast to the sequential implementation, this is not a stable sort. See the remarks for for an approach to implementing a stable sort. ]]> @@ -12231,7 +12231,7 @@ for an approach to implementing a stable sort. + In contrast to the sequential implementation, this is not a stable sort. See the remarks for for an approach to implementing a stable sort. ]]> @@ -12319,7 +12319,7 @@ for an approach to implementing a stable sort. + In contrast to the sequential implementation, this is not a stable sort. See the remarks for for an approach to implementing a stable sort. ]]> @@ -12407,7 +12407,7 @@ for an approach to implementing a stable sort. + In contrast to the sequential implementation, this is not a stable sort. See the remarks for for an approach to implementing a stable sort. ]]> @@ -13232,7 +13232,7 @@ and a right data source of type . Otherwise, the Union operator would appear to be binding to the parallel implementation, but would in reality bind to sequential implementation. + This overload exists to disallow usage of Union with a left data source of type and a right data source of type . Otherwise, the Union operator would appear to be binding to the parallel implementation, but would in reality bind to sequential implementation. ]]> @@ -13384,7 +13384,7 @@ and a right data source of type . Otherwise, the Union operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. + This overload exists to disallow usage of Union with a left data source of type and a right data source of type . Otherwise, the Union operator would appear to be binding to the parallel implementation, but would in reality bind to the sequential implementation. ]]> @@ -13959,7 +13959,7 @@ and a right data source of type . Otherwise, the Zip operator would appear to be bind to the parallel implementation, but would in reality bind to the sequential implementation. + This overload exists to disallow usage of Zip with a left data source of type and a right data source of type . Otherwise, the Zip operator would appear to be bind to the parallel implementation, but would in reality bind to the sequential implementation. ]]> diff --git a/xml/System.Linq/Queryable.xml b/xml/System.Linq/Queryable.xml index 976c3b7e326..8de1cce8cbf 100644 --- a/xml/System.Linq/Queryable.xml +++ b/xml/System.Linq/Queryable.xml @@ -55,13 +55,13 @@ class provides an implementation of the standard query operators for querying data sources that implement . The standard query operators are general purpose methods that follow the LINQ pattern and enable you to express traversal, filter, and projection operations over data in any .NET-based programming language. + The set of methods declared in the class provides an implementation of the standard query operators for querying data sources that implement . The standard query operators are general purpose methods that follow the LINQ pattern and enable you to express traversal, filter, and projection operations over data in any .NET-based programming language. - The majority of the methods in this class are defined as extension methods that extend the type. This means they can be called like an instance method on any object that implements . These methods that extend do not perform any querying directly. Instead, their functionality is to build an object, which is an expression tree that represents the cumulative query. The methods then pass the new expression tree to either the method or the method of the input . The method that is called depends on whether the method returns a singleton value, in which case is called, or has enumerable results, in which case is called. + The majority of the methods in this class are defined as extension methods that extend the type. This means they can be called like an instance method on any object that implements . These methods that extend do not perform any querying directly. Instead, their functionality is to build an object, which is an expression tree that represents the cumulative query. The methods then pass the new expression tree to either the method or the method of the input . The method that is called depends on whether the method returns a singleton value, in which case is called, or has enumerable results, in which case is called. - The actual query execution on the target data is performed by a class that implements . The expectation of any implementation is that the result of executing an expression tree that was constructed by a standard query operator method is equivalent to the result of calling the corresponding method in the class, if the data source were an . + The actual query execution on the target data is performed by a class that implements . The expectation of any implementation is that the result of executing an expression tree that was constructed by a standard query operator method is equivalent to the result of calling the corresponding method in the class, if the data source were an . - In addition to the standard query operator methods that operate on objects, this class also contains a method, , which types objects as objects. + In addition to the standard query operator methods that operate on objects, this class also contains a method, , which types objects as objects. ]]> @@ -136,18 +136,18 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that the specified function, `func`, is applied to each value in the source sequence and the accumulated value is returned. The first value in `source` is used as the seed value for the accumulated value, which corresponds to the first parameter in `func`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that the specified function, `func`, is applied to each value in the source sequence and the accumulated value is returned. The first value in `source` is used as the seed value for the accumulated value, which corresponds to the first parameter in `func`. - To simplify common aggregation operations, the set of standard query operators also includes two counting methods, and , and four numeric aggregation methods, namely , , , and . + To simplify common aggregation operations, the set of standard query operators also includes two counting methods, and , and four numeric aggregation methods, namely , , , and . ## Examples - The following code example demonstrates how to use to build a sentence from an array of strings. + The following code example demonstrates how to use to build a sentence from an array of strings. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet1"::: @@ -236,18 +236,18 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that the specified function, `func`, is applied to each value in the source sequence and the accumulated value is returned. The `seed` parameter is used as the seed value for the accumulated value, which corresponds to the first parameter in `func`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that the specified function, `func`, is applied to each value in the source sequence and the accumulated value is returned. The `seed` parameter is used as the seed value for the accumulated value, which corresponds to the first parameter in `func`. - To simplify common aggregation operations, the set of standard query operators also includes two counting methods, and , and four numeric aggregation methods, namely , , , and . + To simplify common aggregation operations, the set of standard query operators also includes two counting methods, and , and four numeric aggregation methods, namely , , , and . ## Examples - The following code example demonstrates how to use to apply an accumulator function when a seed value is provided to the function. + The following code example demonstrates how to use to apply an accumulator function when a seed value is provided to the function. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet2"::: @@ -345,18 +345,18 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that the specified function, `func`, is applied to each value in the source sequence and the accumulated value is returned. The `seed` parameter is used as the seed value for the accumulated value, which corresponds to the first parameter in `func`. The final accumulated value is passed to `selector` to obtain the result value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that the specified function, `func`, is applied to each value in the source sequence and the accumulated value is returned. The `seed` parameter is used as the seed value for the accumulated value, which corresponds to the first parameter in `func`. The final accumulated value is passed to `selector` to obtain the result value. - To simplify common aggregation operations, the set of standard query operators also includes two counting methods, and , and four numeric aggregation methods, namely , , , and . + To simplify common aggregation operations, the set of standard query operators also includes two counting methods, and , and four numeric aggregation methods, namely , , , and . ## Examples - The following code example demonstrates how to use to apply an accumulator function and a result selector. + The following code example demonstrates how to use to apply an accumulator function and a result selector. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet3"::: @@ -587,21 +587,21 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the `source` parameter's type. The expected behavior is that it determines if all the elements in `source` satisfy the condition in `predicate`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the `source` parameter's type. The expected behavior is that it determines if all the elements in `source` satisfy the condition in `predicate`. ## Examples - The following code example demonstrates how to use to determine whether all the elements in a sequence satisfy a condition. + The following code example demonstrates how to use to determine whether all the elements in a sequence satisfy a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet4"::: - The Boolean value that the method returns is typically used in the predicate of a `where` clause (`Where` clause in Visual Basic) or a direct call to the method. The following example demonstrates this use of the `All` method. + The Boolean value that the method returns is typically used in the predicate of a `where` clause (`Where` clause in Visual Basic) or a direct call to the method. The following example demonstrates this use of the `All` method. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet134"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet134"::: @@ -686,19 +686,19 @@ method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it determines if `source` contains any elements. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it determines if `source` contains any elements. ## Examples - The following code example demonstrates how to use to determine whether a sequence contains any elements. + The following code example demonstrates how to use to determine whether a sequence contains any elements. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet5"::: - The Boolean value that the method returns is typically used in the predicate of a `where` clause (`Where` clause in Visual Basic) or a direct call to the method. The following example demonstrates this use of the `Any` method. + The Boolean value that the method returns is typically used in the predicate of a `where` clause (`Where` clause in Visual Basic) or a direct call to the method. The following example demonstrates this use of the `Any` method. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet135"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet135"::: @@ -775,16 +775,16 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it determines if any of the elements of `source` satisfy the condition specified by `predicate`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it determines if any of the elements of `source` satisfy the condition specified by `predicate`. ## Examples - The following code example demonstrates how to use to determine whether any element in a sequence satisfies a condition. + The following code example demonstrates how to use to determine whether any element in a sequence satisfies a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet6"::: @@ -916,9 +916,9 @@ , returns it directly. Otherwise, it returns an that executes queries by calling the equivalent query operator methods in instead of those in . + If the type of `source` implements , returns it directly. Otherwise, it returns an that executes queries by calling the equivalent query operator methods in instead of those in . - This method assumes that `source` implements for some `T`. At runtime, the result is of type for the same `T`. This method is useful in dynamic scenarios when you do not statically know the type of `T`. + This method assumes that `source` implements for some `T`. At runtime, the result is of type for the same `T`. This method is useful in dynamic scenarios when you do not statically know the type of `T`. ]]> @@ -999,12 +999,12 @@ , returns it directly. Otherwise, it returns an that executes queries by calling the equivalent query operator methods in instead of those in . + If the type of `source` implements , returns it directly. Otherwise, it returns an that executes queries by calling the equivalent query operator methods in instead of those in . ## Examples - The following code example demonstrates how to use to convert an to an . + The following code example demonstrates how to use to convert an to an . :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet125"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet125"::: @@ -1071,14 +1071,14 @@ method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. ## Examples - The following code example demonstrates how to use to calculate the average of a sequence of values. + The following code example demonstrates how to use to calculate the average of a sequence of values. [!INCLUDE[sqo_diff_overload_example_elementtype](~/includes/sqo-diff-overload-example-elementtype-md.md)] @@ -1139,14 +1139,14 @@ method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. ## Examples - The following code example demonstrates how to use to calculate the average of a sequence of values. + The following code example demonstrates how to use to calculate the average of a sequence of values. [!INCLUDE[sqo_diff_overload_example_elementtype](~/includes/sqo-diff-overload-example-elementtype-md.md)] @@ -1207,14 +1207,14 @@ method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. ## Examples - The following code example demonstrates how to use to calculate the average of a sequence of values. + The following code example demonstrates how to use to calculate the average of a sequence of values. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet8"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet8"::: @@ -1273,14 +1273,14 @@ method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. ## Examples - The following code example demonstrates how to use to calculate the average of a sequence of values. + The following code example demonstrates how to use to calculate the average of a sequence of values. [!INCLUDE[sqo_diff_overload_example_elementtype](~/includes/sqo-diff-overload-example-elementtype-md.md)] @@ -1341,14 +1341,14 @@ method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. ## Examples - The following code example demonstrates how to use to calculate the average of a sequence of values. + The following code example demonstrates how to use to calculate the average of a sequence of values. [!INCLUDE[sqo_diff_overload_example_elementtype](~/includes/sqo-diff-overload-example-elementtype-md.md)] @@ -1407,14 +1407,14 @@ method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. ## Examples - The following code example demonstrates how to use to calculate the average of a sequence of values. + The following code example demonstrates how to use to calculate the average of a sequence of values. [!INCLUDE[sqo_diff_overload_example_elementtype](~/includes/sqo-diff-overload-example-elementtype-md.md)] @@ -1473,14 +1473,14 @@ method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. ## Examples - The following code example demonstrates how to use to calculate the average of a sequence of values. + The following code example demonstrates how to use to calculate the average of a sequence of values. [!INCLUDE[sqo_diff_overload_example_elementtype](~/includes/sqo-diff-overload-example-elementtype-md.md)] @@ -1539,14 +1539,14 @@ method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. ## Examples - The following code example demonstrates how to use to calculate the average of a sequence of values. + The following code example demonstrates how to use to calculate the average of a sequence of values. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet12"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet12"::: @@ -1603,14 +1603,14 @@ method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. ## Examples - The following code example demonstrates how to use to calculate the average of a sequence of values. + The following code example demonstrates how to use to calculate the average of a sequence of values. [!INCLUDE[sqo_diff_overload_example_elementtype](~/includes/sqo-diff-overload-example-elementtype-md.md)] @@ -1669,14 +1669,14 @@ method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source`. ## Examples - The following code example demonstrates how to use to calculate the average of a sequence of values. + The following code example demonstrates how to use to calculate the average of a sequence of values. [!INCLUDE[sqo_diff_overload_example_elementtype](~/includes/sqo-diff-overload-example-elementtype-md.md)] @@ -1756,16 +1756,16 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. ## Examples - The following code example demonstrates how to use to calculate the average length in a sequence of values of type . + The following code example demonstrates how to use to calculate the average length in a sequence of values of type . [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -1845,16 +1845,16 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. ## Examples - The following code example demonstrates how to use to calculate the average length in a sequence of values of type . + The following code example demonstrates how to use to calculate the average length in a sequence of values of type . [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -1934,16 +1934,16 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. ## Examples - The following code example demonstrates how to use to calculate the average length in a sequence of values of type . + The following code example demonstrates how to use to calculate the average length in a sequence of values of type . :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet18"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet18"::: @@ -2021,16 +2021,16 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. ## Examples - The following code example demonstrates how to use to calculate the average length in a sequence of values of type . + The following code example demonstrates how to use to calculate the average length in a sequence of values of type . [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -2110,16 +2110,16 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. ## Examples - The following code example demonstrates how to use to calculate the average length in a sequence of values of type . + The following code example demonstrates how to use to calculate the average length in a sequence of values of type . [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -2197,16 +2197,16 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. ## Examples - The following code example demonstrates how to use to calculate the average length in a sequence of values of type . + The following code example demonstrates how to use to calculate the average length in a sequence of values of type . [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -2284,16 +2284,16 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. ## Examples - The following code example demonstrates how to use to calculate the average length in a sequence of values of type . + The following code example demonstrates how to use to calculate the average length in a sequence of values of type . [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -2371,16 +2371,16 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. ## Examples - The following code example demonstrates how to use to calculate the average length in a sequence of values of type . + The following code example demonstrates how to use to calculate the average length in a sequence of values of type . [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -2458,16 +2458,16 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. ## Examples - The following code example demonstrates how to use to calculate the average length in a sequence of values of type . + The following code example demonstrates how to use to calculate the average length in a sequence of values of type . [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -2545,16 +2545,16 @@ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it calculates the average of the values in `source` after invoking `selector` on each value. ## Examples - The following code example demonstrates how to use to calculate the average length in a sequence of values of type . + The following code example demonstrates how to use to calculate the average length in a sequence of values of type . [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -2632,12 +2632,12 @@ method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it converts the values in `source` to type `TResult`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it converts the values in `source` to type `TResult`. ## Examples - The following code example demonstrates how to use to convert objects in a sequence to type . + The following code example demonstrates how to use to convert objects in a sequence to type . :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet19"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet19"::: @@ -2785,14 +2785,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that the elements in `source2` are concatenated to those of `source1` to create a new sequence. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that the elements in `source2` are concatenated to those of `source1` to create a new sequence. ## Examples - The following code example demonstrates how to use to concatenate two sequences. + The following code example demonstrates how to use to concatenate two sequences. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet20"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet20"::: @@ -2879,14 +2879,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it determines if `source` contains `item`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it determines if `source` contains `item`. ## Examples - The following code example demonstrates how to use to determine whether a sequence contains a specific element. + The following code example demonstrates how to use to determine whether a sequence contains a specific element. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet21"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet21"::: @@ -2973,9 +2973,9 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it determines if `source` contains `item` by using `comparer` to compare values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it determines if `source` contains `item` by using `comparer` to compare values. ]]> @@ -3056,14 +3056,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it counts the number of items in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it counts the number of items in `source`. ## Examples - The following code example demonstrates how to use to count the elements in a sequence. + The following code example demonstrates how to use to count the elements in a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet22"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet22"::: @@ -3140,16 +3140,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it counts the number of items in `source` that satisfy the condition specified by `predicate`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it counts the number of items in `source` that satisfy the condition specified by `predicate`. ## Examples - The following code example demonstrates how to use to count the elements in a sequence that satisfy a condition. + The following code example demonstrates how to use to count the elements in a sequence that satisfy a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet23"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet23"::: @@ -3299,14 +3299,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns `source` if it is not empty. Otherwise, it returns an that contains `default(TSource)`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns `source` if it is not empty. Otherwise, it returns an that contains `default(TSource)`. ## Examples - The following code examples demonstrate how to use to provide a default value in case the source sequence is empty. + The following code examples demonstrate how to use to provide a default value in case the source sequence is empty. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet24"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet24"::: @@ -3382,14 +3382,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns `source` if it is not empty. Otherwise, it returns an that contains `defaultValue`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns `source` if it is not empty. Otherwise, it returns an that contains `defaultValue`. ## Examples - The following code example shows a situation in which it is useful to call in a LINQ query. A default value is passed to in this example. + The following code example shows a situation in which it is useful to call in a LINQ query. A default value is passed to in this example. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet25"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet25"::: @@ -3473,14 +3473,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns an unordered sequence of the unique items in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns an unordered sequence of the unique items in `source`. ## Examples - The following code example demonstrates how to use to return distinct elements from a sequence. + The following code example demonstrates how to use to return distinct elements from a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet27"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet27"::: @@ -3564,9 +3564,9 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns an unordered sequence of the unique items in `source` by using `comparer` to compare values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns an unordered sequence of the unique items in `source` by using `comparer` to compare values. ]]> @@ -3839,14 +3839,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the item at position `index` in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the item at position `index` in `source`. ## Examples - The following code example demonstrates how to use to return an element at a specific position in a sequence. + The following code example demonstrates how to use to return an element at a specific position in a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet28"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet28"::: @@ -3984,14 +3984,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the item at position `index` in `source`, or `default(TSource)` if `index` is outside the bounds of `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the item at position `index` in `source`, or `default(TSource)` if `index` is outside the bounds of `source`. ## Examples - The following code example demonstrates how to use . This example uses a value for `index` that is outside the bounds of the source sequence. + The following code example demonstrates how to use . This example uses a value for `index` that is outside the bounds of the source sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet29"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet29"::: @@ -4077,14 +4077,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the`source1` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the`source1` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that all the elements in `source1` are returned except for those that are also in `source2`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that all the elements in `source1` are returned except for those that are also in `source2`. ## Examples - The following code example demonstrates how to use to return those elements that only appear in the first source sequence. + The following code example demonstrates how to use to return those elements that only appear in the first source sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet34"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet34"::: @@ -4170,9 +4170,9 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the`source1` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the`source1` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that all the elements in `source1` are returned except for those that are also in `source2`, and `comparer` is used to compare values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that all the elements in `source1` are returned except for those that are also in `source2`, and `comparer` is used to compare values. ]]> @@ -4394,14 +4394,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the first element in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the first element in `source`. ## Examples - The following code example demonstrates how to use to return the first element in a sequence. + The following code example demonstrates how to use to return the first element in a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet35"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet35"::: @@ -4478,16 +4478,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the first element in `source` that satisfies the condition specified by `predicate`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the first element in `source` that satisfies the condition specified by `predicate`. ## Examples - The following code example demonstrates how to use to return the first element of a sequence that satisfies a condition. + The following code example demonstrates how to use to return the first element of a sequence that satisfies a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet36"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet36"::: @@ -4578,21 +4578,21 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the first element in `source`, or a default value if `source` is empty. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the first element in `source`, or a default value if `source` is empty. - The method does not provide a way to specify the default value to return if `source` is empty. If you want to specify a default value other than `default(TSource)`, use the method as described in the Example section. + The method does not provide a way to specify the default value to return if `source` is empty. If you want to specify a default value other than `default(TSource)`, use the method as described in the Example section. ## Examples - The following code example demonstrates how to use on an empty sequence. + The following code example demonstrates how to use on an empty sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet37"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet37"::: - Sometimes the value of `default(TSource)` is not the default value that you want to use if the collection contains no elements. Instead of checking the result for the unwanted default value and then changing it if necessary, you can use the method to specify the default value that you want to use if the collection is empty. Then, call to obtain the first element. The following code example uses both techniques to obtain a default value of 1 if a collection of numeric months is empty. Because the default value for an integer is 0, which does not correspond to any month, the default value must be specified as 1 instead. The first result variable is checked for the unwanted default value after the query is completed. The second result variable is obtained by calling to specify a default value of 1. + Sometimes the value of `default(TSource)` is not the default value that you want to use if the collection contains no elements. Instead of checking the result for the unwanted default value and then changing it if necessary, you can use the method to specify the default value that you want to use if the collection is empty. Then, call to obtain the first element. The following code example uses both techniques to obtain a default value of 1 if a collection of numeric months is empty. Because the default value for an integer is 0, which does not correspond to any month, the default value must be specified as 1 instead. The first result variable is checked for the unwanted default value after the query is completed. The second result variable is obtained by calling to specify a default value of 1. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet131"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet131"::: @@ -4670,16 +4670,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the first element in `source` that satisfies the condition in `predicate`, or a default value if no element satisfies the condition. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the first element in `source` that satisfies the condition in `predicate`, or a default value if no element satisfies the condition. ## Examples - The following code example demonstrates how to use by passing in a predicate. In the second query, there is no element in the sequence that satisfies the condition. + The following code example demonstrates how to use by passing in a predicate. In the second query, there is no element in the sequence that satisfies the condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet38"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet38"::: @@ -4892,16 +4892,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by a key value that is obtained by invoking `keySelector` on each element. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by a key value that is obtained by invoking `keySelector` on each element. ## Examples - The following code example demonstrates how to use to group the elements of a sequence. + The following code example demonstrates how to use to group the elements of a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet14"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet14"::: @@ -4996,11 +4996,11 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by a key value. The key value is obtained by invoking `keySelector` on each element, and key values are compared by using `comparer`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by a key value. The key value is obtained by invoking `keySelector` on each element, and key values are compared by using `comparer`. ]]> @@ -5093,16 +5093,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by a key value that is obtained by invoking `keySelector` on each element. It invokes `elementSelector` on each element to obtain a result element. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by a key value that is obtained by invoking `keySelector` on each element. It invokes `elementSelector` on each element to obtain a result element. ## Examples - The following code example demonstrates how to use to group the elements of a sequence. + The following code example demonstrates how to use to group the elements of a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet39"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet39"::: @@ -5208,11 +5208,11 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by a key value that is obtained by invoking `keySelector` on each element. Key values are compared by using `comparer`. The `elementSelector` parameter is invoked on each element to obtain a result element. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by a key value that is obtained by invoking `keySelector` on each element. Key values are compared by using `comparer`. The `elementSelector` parameter is invoked on each element to obtain a result element. ]]> @@ -5305,16 +5305,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by a key value that is obtained by invoking `keySelector` on each element. The `resultSelector` parameter is used to obtain a result value from each group and its key. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by a key value that is obtained by invoking `keySelector` on each element. The `resultSelector` parameter is used to obtain a result value from each group and its key. ## Examples - The following code example demonstrates how to use to group the elements of a sequence and project a sequence of results of type `TResult`. + The following code example demonstrates how to use to group the elements of a sequence and project a sequence of results of type `TResult`. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet15"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet15"::: @@ -5420,11 +5420,11 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by key values that are obtained by invoking `keySelector` on each element. The `comparer` parameter is used to compare keys and the `resultSelector` parameter is used to obtain a result value from each group and its key. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by key values that are obtained by invoking `keySelector` on each element. The `comparer` parameter is used to compare keys and the `resultSelector` parameter is used to obtain a result value from each group and its key. ]]> @@ -5528,16 +5528,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by key values that are obtained by invoking `keySelector` on each element. The `elementSelector` parameter is used to project the elements of each group, and the `resultSelector` parameter is used to obtain a result value from each group and its key. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by key values that are obtained by invoking `keySelector` on each element. The `elementSelector` parameter is used to project the elements of each group, and the `resultSelector` parameter is used to obtain a result value from each group and its key. ## Examples - The following code example demonstrates how to use to group the elements of a sequence and project a sequence of results of type `TResult`. + The following code example demonstrates how to use to group the elements of a sequence and project a sequence of results of type `TResult`. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet130"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet130"::: @@ -5654,11 +5654,11 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by key values that are obtained by invoking `keySelector` on each element. The `comparer` parameter is used to compare key values. The `elementSelector` parameter is used to project the elements of each group, and the `resultSelector` parameter is used to obtain a result value from each group and its key. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it groups the elements of `source` by key values that are obtained by invoking `keySelector` on each element. The `comparer` parameter is used to compare key values. The `elementSelector` parameter is used to project the elements of each group, and the `resultSelector` parameter is used to obtain a result value from each group and its key. ]]> @@ -5774,16 +5774,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `outer` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `outer` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `outer` parameter. The expected behavior is that the `outerKeySelector` and `innerKeySelector` functions are used to extract keys from `outer` and `inner`, respectively. These keys are compared for equality to match each element in `outer` with zero or more elements from `inner`. Then the `resultSelector` function is invoked to project a result object from each group of correlated elements. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `outer` parameter. The expected behavior is that the `outerKeySelector` and `innerKeySelector` functions are used to extract keys from `outer` and `inner`, respectively. These keys are compared for equality to match each element in `outer` with zero or more elements from `inner`. Then the `resultSelector` function is invoked to project a result object from each group of correlated elements. ## Examples - The following code example demonstrates how to use to perform a grouped join on two sequences. + The following code example demonstrates how to use to perform a grouped join on two sequences. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet40"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet40"::: @@ -5902,11 +5902,11 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `outer` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `outer` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `outer` parameter. The expected behavior is that the `outerKeySelector` and `innerKeySelector` functions are used to extract keys from `outer` and `inner`, respectively. These keys are compared for equality by using `comparer`. The outcome of the comparisons is used to match each element in `outer` with zero or more elements from `inner`. Then the `resultSelector` function is invoked to project a result object from each group of correlated elements. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `outer` parameter. The expected behavior is that the `outerKeySelector` and `innerKeySelector` functions are used to extract keys from `outer` and `inner`, respectively. These keys are compared for equality by using `comparer`. The outcome of the comparisons is used to match each element in `outer` with zero or more elements from `inner`. Then the `resultSelector` function is invoked to project a result object from each group of correlated elements. ]]> @@ -6045,14 +6045,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that all the elements in `source1` that are also in `source2` are returned. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that all the elements in `source1` that are also in `source2` are returned. ## Examples - The following code example demonstrates how to use to return the elements that appear in each of two sequences. + The following code example demonstrates how to use to return the elements that appear in each of two sequences. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet41"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet41"::: @@ -6138,9 +6138,9 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that all the elements in `source1` that are also in `source2` are returned. The `comparer` parameter is used to compare elements. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that all the elements in `source1` that are also in `source2` are returned. The `comparer` parameter is used to compare elements. ]]> @@ -6401,16 +6401,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `outer` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `outer` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `outer` parameter. The expected behavior is that of an inner join. The `outerKeySelector` and `innerKeySelector` functions are used to extract keys from `outer` and `inner`, respectively. These keys are compared for equality to match elements from each sequence. A pair of elements is stored for each element in `inner` that matches an element in `outer`. Then the `resultSelector` function is invoked to project a result object from each pair of matching elements. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `outer` parameter. The expected behavior is that of an inner join. The `outerKeySelector` and `innerKeySelector` functions are used to extract keys from `outer` and `inner`, respectively. These keys are compared for equality to match elements from each sequence. A pair of elements is stored for each element in `inner` that matches an element in `outer`. Then the `resultSelector` function is invoked to project a result object from each pair of matching elements. ## Examples - The following code example demonstrates how to use to perform an inner join of two sequences based on a common key. + The following code example demonstrates how to use to perform an inner join of two sequences based on a common key. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet42"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet42"::: @@ -6529,11 +6529,11 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `outer` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `outer` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `outer` parameter. The expected behavior is that of an inner join. The `outerKeySelector` and `innerKeySelector` functions are used to extract keys from `outer` and `inner`, respectively. These keys are compared for equality by using `comparer`. The outcome of the comparisons is used to create a matching pair for each element in `inner` that matches an element in `outer`. Then the `resultSelector` function is invoked to project a result object from each pair of matching elements. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `outer` parameter. The expected behavior is that of an inner join. The `outerKeySelector` and `innerKeySelector` functions are used to extract keys from `outer` and `inner`, respectively. These keys are compared for equality by using `comparer`. The outcome of the comparisons is used to create a matching pair for each element in `inner` that matches an element in `outer`. Then the `resultSelector` function is invoked to project a result object from each pair of matching elements. ]]> @@ -6614,14 +6614,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the last element in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the last element in `source`. ## Examples - The following code example demonstrates how to use to return the last element of an array. + The following code example demonstrates how to use to return the last element of an array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet43"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet43"::: @@ -6698,16 +6698,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the last element in `source` that satisfies the condition specified by `predicate`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the last element in `source` that satisfies the condition specified by `predicate`. ## Examples - The following code example demonstrates how to use to return the last element of an array that satisfies a condition. + The following code example demonstrates how to use to return the last element of an array that satisfies a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet44"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet44"::: @@ -6798,21 +6798,21 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the last element in `source`, or a default value if `source` is empty. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the last element in `source`, or a default value if `source` is empty. - The method does not provide a way to specify a default value. If you want to specify a default value other than `default(TSource)`, use the method as described in the Example section. + The method does not provide a way to specify a default value. If you want to specify a default value other than `default(TSource)`, use the method as described in the Example section. ## Examples - The following code example demonstrates how to use on an empty array. + The following code example demonstrates how to use on an empty array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet45"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet45"::: - Sometimes the value of `default(TSource)` is not the default value that you want to use if the collection contains no elements. Instead of checking the result for the unwanted default value and then changing it if necessary, you can use the method to specify the default value that you want to use if the collection is empty. Then, call to obtain the last element. The following code example uses both techniques to obtain a default value of 1 if a collection of numeric days of the month is empty. Because the default value for an integer is 0, which does not correspond to any day of the month, the default value must be specified as 1 instead. The first result variable is checked for the unwanted default value after the query is completed. The second result variable is obtained by calling to specify a default value of 1. + Sometimes the value of `default(TSource)` is not the default value that you want to use if the collection contains no elements. Instead of checking the result for the unwanted default value and then changing it if necessary, you can use the method to specify the default value that you want to use if the collection is empty. Then, call to obtain the last element. The following code example uses both techniques to obtain a default value of 1 if a collection of numeric days of the month is empty. Because the default value for an integer is 0, which does not correspond to any day of the month, the default value must be specified as 1 instead. The first result variable is checked for the unwanted default value after the query is completed. The second result variable is obtained by calling to specify a default value of 1. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet132"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet132"::: @@ -6890,16 +6890,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the last element in `source` that satisfies the condition specified by `predicate`. It returns a default value if there is no such element in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the last element in `source` that satisfies the condition specified by `predicate`. It returns a default value if there is no such element in `source`. ## Examples - The following code example demonstrates how to use by passing in a predicate. In the second call to the method, there is no element in the sequence that satisfies the condition. + The following code example demonstrates how to use by passing in a predicate. In the second call to the method, there is no element in the sequence that satisfies the condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet46"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet46"::: @@ -7306,14 +7306,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it counts the number of items in `source` and returns an . + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it counts the number of items in `source` and returns an . ## Examples - The following code example demonstrates how to use to count the elements in an array. + The following code example demonstrates how to use to count the elements in an array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet47"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet47"::: @@ -7390,16 +7390,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it counts the number of items in `source` that satisfy the condition specified by `predicate` and returns an . + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it counts the number of items in `source` that satisfy the condition specified by `predicate` and returns an . ## Examples - The following code example demonstrates how to use to count the elements in an array that satisfy a condition. + The following code example demonstrates how to use to count the elements in an array that satisfy a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet48"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet48"::: @@ -7475,14 +7475,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the maximum value in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the maximum value in `source`. ## Examples - The following code example demonstrates how to use to determine the maximum value in a sequence. + The following code example demonstrates how to use to determine the maximum value in a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet52"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet52"::: @@ -7634,16 +7634,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element in `source` and returns the maximum value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element in `source` and returns the maximum value. ## Examples - The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. + The following code example demonstrates how to use to determine the maximum value in a sequence of projected values. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet58"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet58"::: @@ -7941,14 +7941,14 @@ The last chunk will contain the remaining elements and may be of a smaller size. method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the minimum value in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the minimum value in `source`. ## Examples - The following code example demonstrates how to use to determine the minimum value in a sequence. + The following code example demonstrates how to use to determine the minimum value in a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet60"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet60"::: @@ -8101,16 +8101,16 @@ The last chunk will contain the remaining elements and may be of a smaller size. whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element in `source` and returns the minimum value. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element in `source` and returns the minimum value. ## Examples - The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. + The following code example demonstrates how to use to determine the minimum value in a sequence of projected values. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet68"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet68"::: @@ -8407,7 +8407,7 @@ The last chunk will contain the remaining elements and may be of a smaller size. that represents calling `OfType` itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The `OfType` method generates a that represents calling `OfType` itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The query behavior that occurs as a result of executing an expression tree that represents calling `OfType` depends on the implementation of the type of the `source` parameter. The expected behavior is that it filters out any elements in `source` that are not of type `TResult`. @@ -8663,16 +8663,16 @@ The query behavior that occurs as a result of executing an expression tree whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it sorts the elements of `source` based on the key obtained by invoking `keySelector` on each element of `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it sorts the elements of `source` based on the key obtained by invoking `keySelector` on each element of `source`. ## Examples - The following code example demonstrates how to use to sort the elements of a sequence. + The following code example demonstrates how to use to sort the elements of a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet70"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet70"::: @@ -8767,11 +8767,11 @@ The query behavior that occurs as a result of executing an expression tree whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it sorts the elements of `source` based on the key obtained by invoking `keySelector` on each element of `source`. The `comparer` parameter is used to compare keys. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it sorts the elements of `source` based on the key obtained by invoking `keySelector` on each element of `source`. The `comparer` parameter is used to compare keys. ]]> @@ -8863,11 +8863,11 @@ The query behavior that occurs as a result of executing an expression tree whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it sorts the elements of `source` in descending order, based on the key obtained by invoking `keySelector` on each element of `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it sorts the elements of `source` in descending order, based on the key obtained by invoking `keySelector` on each element of `source`. ]]> @@ -8959,16 +8959,16 @@ The query behavior that occurs as a result of executing an expression tree whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it sorts the elements of `source` in descending order, based on the key obtained by invoking `keySelector` on each element of `source`. The `comparer` parameter is used to compare keys. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it sorts the elements of `source` in descending order, based on the key obtained by invoking `keySelector` on each element of `source`. The `comparer` parameter is used to compare keys. ## Examples - The following code example demonstrates how to use to sort the elements of a sequence in descending order by using a custom comparer. + The following code example demonstrates how to use to sort the elements of a sequence in descending order by using a custom comparer. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet71"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet71"::: @@ -9257,14 +9257,14 @@ The query behavior that occurs as a result of executing an expression tree method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it reverses the order of the elements in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it reverses the order of the elements in `source`. ## Examples - The following code example demonstrates how to use to reverse the order of elements in an array. + The following code example demonstrates how to use to reverse the order of elements in an array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet74"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet74"::: @@ -9564,16 +9564,16 @@ The query behavior that occurs as a result of executing an expression tree whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depend on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` to project it into a different form. + The query behavior that occurs as a result of executing an expression tree that represents calling depend on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` to project it into a different form. ## Examples - The following code example demonstrates how to use to project over a sequence of values and use the index of each element in the projected form. + The following code example demonstrates how to use to project over a sequence of values and use the index of each element in the projected form. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet76"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet76"::: @@ -9658,16 +9658,16 @@ The query behavior that occurs as a result of executing an expression tree whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` to project it into a different form. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` to project it into a different form. ## Examples - The following code example demonstrates how to use to project over a sequence of values. + The following code example demonstrates how to use to project over a sequence of values. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet75"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet75"::: @@ -9762,16 +9762,16 @@ The query behavior that occurs as a result of executing an expression tree whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` to project it into an enumerable form. It then concatenates the enumerable results into a single, one-dimensional sequence. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` to project it into an enumerable form. It then concatenates the enumerable results into a single, one-dimensional sequence. ## Examples - The following code example demonstrates how to use to perform a one-to-many projection over an array. + The following code example demonstrates how to use to perform a one-to-many projection over an array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet77"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet77"::: @@ -9856,16 +9856,16 @@ The query behavior that occurs as a result of executing an expression tree whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` to project it into an enumerable form. Each enumerable result incorporates the index of the source element. It then concatenates the enumerable results into a single, one-dimensional sequence. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` to project it into an enumerable form. Each enumerable result incorporates the index of the source element. It then concatenates the enumerable results into a single, one-dimensional sequence. ## Examples - The following code example demonstrates how to use to perform a one-to-many projection over an array and use the index of each source element. + The following code example demonstrates how to use to perform a one-to-many projection over an array and use the index of each source element. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet78"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet78"::: @@ -9961,16 +9961,16 @@ The query behavior that occurs as a result of executing an expression tree whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `collectionSelector` on each element of `source` to project it into an enumerable form. Then the function represented by `resultSelector` is invoked on each element in each intermediate sequence. The resulting values are concatenated into a single, one-dimensional sequence. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `collectionSelector` on each element of `source` to project it into an enumerable form. Then the function represented by `resultSelector` is invoked on each element in each intermediate sequence. The resulting values are concatenated into a single, one-dimensional sequence. ## Examples - The following code example demonstrates how to use to perform a one-to-many projection over an array. This example uses a result selector function to keep the source element that corresponds to each intermediate sequence in scope for the final call to `Select`. + The following code example demonstrates how to use to perform a one-to-many projection over an array. This example uses a result selector function to keep the source element that corresponds to each intermediate sequence in scope for the final call to `Select`. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet124"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet124"::: @@ -10066,11 +10066,11 @@ The query behavior that occurs as a result of executing an expression tree whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `collectionSelector` on each element of `source` to project it into an enumerable form. Each enumerable result incorporates the source element's index. Then the function represented by `resultSelector` is invoked on each element in each intermediate sequence. The resulting values are concatenated into a single, one-dimensional sequence. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `collectionSelector` on each element of `source` to project it into an enumerable form. Each enumerable result incorporates the source element's index. Then the function represented by `resultSelector` is invoked on each element in each intermediate sequence. The resulting values are concatenated into a single, one-dimensional sequence. ]]> @@ -10154,14 +10154,14 @@ The query behavior that occurs as a result of executing an expression tree method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that it determines if the two source sequences are equal. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that it determines if the two source sequences are equal. ## Examples - The following code example demonstrates how to use to determine whether two sequences are equal. In this example the sequences are equal. + The following code example demonstrates how to use to determine whether two sequences are equal. In this example the sequences are equal. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet32"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet32"::: @@ -10253,9 +10253,9 @@ The query behavior that occurs as a result of executing an expression tree method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that it determines if the two source sequences are equal by using `comparer` to compare elements. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that it determines if the two source sequences are equal by using `comparer` to compare elements. ]]> @@ -10379,14 +10379,14 @@ The query behavior that occurs as a result of executing an expression tree method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the only element in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the only element in `source`. ## Examples - The following code example demonstrates how to use to select the only element of an array. + The following code example demonstrates how to use to select the only element of an array. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet79"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet79"::: @@ -10468,16 +10468,16 @@ The query behavior that occurs as a result of executing an expression tree whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the only element in `source` that satisfies the condition specified by `predicate`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the only element in `source` that satisfies the condition specified by `predicate`. ## Examples - The following code example demonstrates how to use to select the only element of an array that satisfies a condition. + The following code example demonstrates how to use to select the only element of an array that satisfies a condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet81"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet81"::: @@ -10571,21 +10571,21 @@ The query behavior that occurs as a result of executing an expression tree method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the only element in `source`, or a default value if `source` is empty. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the only element in `source`, or a default value if `source` is empty. - The method does not provide a way to specify a default value. If you want to specify a default value other than `default(TSource)`, use the method as described in the Example section. + The method does not provide a way to specify a default value. If you want to specify a default value other than `default(TSource)`, use the method as described in the Example section. ## Examples - The following code example demonstrates how to use to select the only element of an array. The second query demonstrates that returns a default value when the sequence does not contain exactly one element. + The following code example demonstrates how to use to select the only element of an array. The second query demonstrates that returns a default value when the sequence does not contain exactly one element. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet83"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet83"::: - Sometimes the value of `default(TSource)` is not the default value that you want to use if the collection contains no elements. Instead of checking the result for the unwanted default value and then changing it if necessary, you can use the method to specify the default value that you want to use if the collection is empty. Then, call to obtain the element. The following code example uses both techniques to obtain a default value of 1 if a collection of page numbers is empty. Because the default value for an integer is 0, which is not usually a valid page number, the default value must be specified as 1 instead. The first result variable is checked for the unwanted default value after the query is completed. The second result variable is obtained by calling to specify a default value of 1. + Sometimes the value of `default(TSource)` is not the default value that you want to use if the collection contains no elements. Instead of checking the result for the unwanted default value and then changing it if necessary, you can use the method to specify the default value that you want to use if the collection is empty. Then, call to obtain the element. The following code example uses both techniques to obtain a default value of 1 if a collection of page numbers is empty. Because the default value for an integer is 0, which is not usually a valid page number, the default value must be specified as 1 instead. The first result variable is checked for the unwanted default value after the query is completed. The second result variable is obtained by calling to specify a default value of 1. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet133"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet133"::: @@ -10664,16 +10664,16 @@ The query behavior that occurs as a result of executing an expression tree whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the only element in `source` that satisfies the condition specified by `predicate`, or a default value if no such element exists. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the only element in `source` that satisfies the condition specified by `predicate`, or a default value if no such element exists. ## Examples - The following code example demonstrates how to use to select the only element of an array that satisfies a condition. The second query demonstrates that returns a default value when the sequence does not contain exactly one element that satisfies the condition. + The following code example demonstrates how to use to select the only element of an array that satisfies a condition. The second query demonstrates that returns a default value when the sequence does not contain exactly one element that satisfies the condition. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet85"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet85"::: @@ -10868,14 +10868,14 @@ The query behavior that occurs as a result of executing an expression tree method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it skips the first `count` elements in `source` and returns the remaining elements. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it skips the first `count` elements in `source` and returns the remaining elements. ## Examples - The following code example demonstrates how to use to skip a specified number of elements in a sorted array and return the remaining elements. + The following code example demonstrates how to use to skip a specified number of elements in a sorted array and return the remaining elements. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet87"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet87"::: @@ -11030,16 +11030,16 @@ If `count` is not a positive number, this method returns an identical copy of th whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it applies `predicate` to each element in `source` until it finds an element for which `predicate` returns false. That element and all the remaining elements are returned. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it applies `predicate` to each element in `source` until it finds an element for which `predicate` returns false. That element and all the remaining elements are returned. ## Examples - The following code example demonstrates how to use to skip elements of an array as long as a condition is true. + The following code example demonstrates how to use to skip elements of an array as long as a condition is true. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet88"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet88"::: @@ -11115,16 +11115,16 @@ If `count` is not a positive number, this method returns an identical copy of th whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it applies `predicate` to each element in `source` until it finds an element for which `predicate` returns false. That element and all the remaining elements are returned. The index of each source element is provided as the second argument to `predicate`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it applies `predicate` to each element in `source` until it finds an element for which `predicate` returns false. That element and all the remaining elements are returned. The index of each source element is provided as the second argument to `predicate`. ## Examples - The following code example demonstrates how to use to skip elements of an array as long as a condition that depends on the element's index is true. + The following code example demonstrates how to use to skip elements of an array as long as a condition that depends on the element's index is true. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet89"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet89"::: @@ -11191,9 +11191,9 @@ If `count` is not a positive number, this method returns an identical copy of th method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. ]]> @@ -11248,9 +11248,9 @@ If `count` is not a positive number, this method returns an identical copy of th method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. ]]> @@ -11304,9 +11304,9 @@ If `count` is not a positive number, this method returns an identical copy of th method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. ]]> @@ -11361,9 +11361,9 @@ If `count` is not a positive number, this method returns an identical copy of th method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. ]]> @@ -11418,9 +11418,9 @@ If `count` is not a positive number, this method returns an identical copy of th method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. ]]> @@ -11475,9 +11475,9 @@ If `count` is not a positive number, this method returns an identical copy of th method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. ]]> @@ -11531,9 +11531,9 @@ If `count` is not a positive number, this method returns an identical copy of th method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. ]]> @@ -11588,9 +11588,9 @@ If `count` is not a positive number, this method returns an identical copy of th method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. ]]> @@ -11645,14 +11645,14 @@ If `count` is not a positive number, this method returns an identical copy of th method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. ## Examples - The following code example demonstrates how to use to sum the values of a sequence. + The following code example demonstrates how to use to sum the values of a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet121"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet121"::: @@ -11709,14 +11709,14 @@ If `count` is not a positive number, this method returns an identical copy of th method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the sum of the values in `source`. ## Examples - The following code example demonstrates how to use to sum the values of a sequence. + The following code example demonstrates how to use to sum the values of a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet120"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet120"::: @@ -11792,16 +11792,16 @@ If `count` is not a positive number, this method returns an identical copy of th whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -11880,14 +11880,14 @@ If `count` is not a positive number, this method returns an identical copy of th whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -11965,16 +11965,16 @@ If `count` is not a positive number, this method returns an identical copy of th whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -12053,16 +12053,16 @@ If `count` is not a positive number, this method returns an identical copy of th whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -12141,16 +12141,16 @@ If `count` is not a positive number, this method returns an identical copy of th whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -12229,16 +12229,16 @@ If `count` is not a positive number, this method returns an identical copy of th whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -12316,16 +12316,16 @@ If `count` is not a positive number, this method returns an identical copy of th whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -12404,16 +12404,16 @@ If `count` is not a positive number, this method returns an identical copy of th whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -12492,16 +12492,16 @@ If `count` is not a positive number, this method returns an identical copy of th whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -12579,16 +12579,16 @@ If `count` is not a positive number, this method returns an identical copy of th whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it invokes `selector` on each element of `source` and returns the sum of the resulting values. ## Examples - The following code example demonstrates how to use to sum the projected values of a sequence. + The following code example demonstrates how to use to sum the projected values of a sequence. [!INCLUDE[sqo_diff_overload_example_func](~/includes/sqo-diff-overload-example-func-md.md)] @@ -12666,14 +12666,14 @@ If `count` is not a positive number, this method returns an identical copy of th method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it takes the first `count` elements from the start of `source`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it takes the first `count` elements from the start of `source`. ## Examples - The following code example demonstrates how to use to return elements from the start of a sequence. + The following code example demonstrates how to use to return elements from the start of a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet99"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet99"::: @@ -12885,16 +12885,16 @@ If `count` is not a positive number, this method returns an empty queryable sequ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it applies `predicate` to each element in `source` until it finds an element for which `predicate` returns `false`. It returns all the elements up until that point. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it applies `predicate` to each element in `source` until it finds an element for which `predicate` returns `false`. It returns all the elements up until that point. ## Examples - The following code example demonstrates how to use to return elements from the start of a sequence as long as a condition is true. + The following code example demonstrates how to use to return elements from the start of a sequence as long as a condition is true. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet100"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet100"::: @@ -12970,16 +12970,16 @@ If `count` is not a positive number, this method returns an empty queryable sequ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it applies `predicate` to each element in `source` until it finds an element for which `predicate` returns `false`. It returns all the elements up until that point. The index of each source element is provided as the second argument to `predicate`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it applies `predicate` to each element in `source` until it finds an element for which `predicate` returns `false`. It returns all the elements up until that point. The index of each source element is provided as the second argument to `predicate`. ## Examples - The following code example demonstrates how to use to return elements from the start of a sequence as long as a condition that uses the index of the element is true. + The following code example demonstrates how to use to return elements from the start of a sequence as long as a condition that uses the index of the element is true. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet101"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet101"::: @@ -13074,16 +13074,16 @@ If `count` is not a positive number, this method returns an empty queryable sequ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it performs a secondary sort of the elements of `source` based on the key obtained by invoking `keySelector` on each element of `source`. All previously established sort orders are preserved. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it performs a secondary sort of the elements of `source` based on the key obtained by invoking `keySelector` on each element of `source`. All previously established sort orders are preserved. ## Examples - The following code example demonstrates how to use to perform a secondary ordering of the elements in a sequence. + The following code example demonstrates how to use to perform a secondary ordering of the elements in a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet102"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet102"::: @@ -13178,11 +13178,11 @@ If `count` is not a positive number, this method returns an empty queryable sequ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it performs a secondary sort of the elements of `source` based on the key obtained by invoking `keySelector` on each element of `source`. All previously established sort orders are preserved. The `comparer` parameter is used to compare key values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it performs a secondary sort of the elements of `source` based on the key obtained by invoking `keySelector` on each element of `source`. All previously established sort orders are preserved. The `comparer` parameter is used to compare key values. ]]> @@ -13274,11 +13274,11 @@ If `count` is not a positive number, this method returns an empty queryable sequ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it performs a secondary sort of the elements of `source` in descending order, based on the key obtained by invoking `keySelector` on each element of `source`. All previously established sort orders are preserved. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it performs a secondary sort of the elements of `source` in descending order, based on the key obtained by invoking `keySelector` on each element of `source`. All previously established sort orders are preserved. ]]> @@ -13370,16 +13370,16 @@ If `count` is not a positive number, this method returns an empty queryable sequ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. The result of calling is cast to type and returned. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it performs a secondary sort of the elements of `source` in descending order, based on the key obtained by invoking `keySelector` on each element of `source`. All previously established sort orders are preserved. The `comparer` parameter is used to compare key values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it performs a secondary sort of the elements of `source` in descending order, based on the key obtained by invoking `keySelector` on each element of `source`. All previously established sort orders are preserved. The `comparer` parameter is used to compare key values. ## Examples - The following code example demonstrates how to use to perform a secondary ordering of the elements in a sequence in descending order by using a custom comparer. + The following code example demonstrates how to use to perform a secondary ordering of the elements in a sequence in descending order by using a custom comparer. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" id="Snippet103"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet103"::: @@ -13465,14 +13465,14 @@ If `count` is not a positive number, this method returns an empty queryable sequ method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that the set union of the elements in `source1` and `source2` is returned. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that the set union of the elements in `source1` and `source2` is returned. ## Examples - The following code example demonstrates how to use to obtain the set union of two sequences. + The following code example demonstrates how to use to obtain the set union of two sequences. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet109"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet109"::: @@ -13558,9 +13558,9 @@ If `count` is not a positive number, this method returns an empty queryable sequ method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that the set union of the elements in `source1` and `source2` is returned. The `comparer` parameter is used to compare values. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source1` parameter. The expected behavior is that the set union of the elements in `source1` and `source2` is returned. The `comparer` parameter is used to compare values. ]]> @@ -13788,16 +13788,16 @@ If `count` is not a positive number, this method returns an empty queryable sequ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the elements from `source` that satisfy the condition specified by `predicate`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the elements from `source` that satisfy the condition specified by `predicate`. ## Examples - The following code example demonstrates how to use to filter a sequence. + The following code example demonstrates how to use to filter a sequence. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet110"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet110"::: @@ -13873,16 +13873,16 @@ If `count` is not a positive number, this method returns an empty queryable sequ whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . + This method has at least one parameter of type whose type argument is one of the types. For these parameters, you can pass in a lambda expression and it will be compiled to an . - The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source` parameter. - The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the elements from `source` that satisfy the condition specified by `predicate`. The index of each source element is provided as the second argument to `predicate`. + The query behavior that occurs as a result of executing an expression tree that represents calling depends on the implementation of the type of the `source` parameter. The expected behavior is that it returns the elements from `source` that satisfy the condition specified by `predicate`. The index of each source element is provided as the second argument to `predicate`. ## Examples - The following code example demonstrates how to use to filter a sequence based on a predicate that incorporates the index of each element. + The following code example demonstrates how to use to filter a sequence based on a predicate that incorporates the index of each element. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet111"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet111"::: @@ -14054,14 +14054,14 @@ If `count` is not a positive number, this method returns an empty queryable sequ method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. + The method generates a that represents calling itself as a constructed generic method. It then passes the to the method of the represented by the property of the `source1` parameter. The method merges each element of the first sequence with an element that has the same index in the second sequence. If the sequences do not have the same number of elements, the method merges sequences until it reaches the end of one of them. For example, if one sequence has three elements and the other one has four, the resulting sequence will have only three elements. ## Examples - The following code example demonstrates how to use the method to merge two sequences. + The following code example demonstrates how to use the method to merge two sequences. :::code language="csharp" source="~/snippets/csharp/System.Linq/Queryable/AggregateTSource/queryable.cs" interactive="try-dotnet-method" id="Snippet200"::: :::code language="vb" source="~/snippets/visualbasic/System.Linq/Queryable/AggregateTSource/queryable.vb" id="Snippet200"::: diff --git a/xml/System.Reflection.Context/CustomReflectionContext.xml b/xml/System.Reflection.Context/CustomReflectionContext.xml index 256e8d55ef1..eebae21a52f 100644 --- a/xml/System.Reflection.Context/CustomReflectionContext.xml +++ b/xml/System.Reflection.Context/CustomReflectionContext.xml @@ -32,35 +32,35 @@ Represents a customizable reflection context. - provides a way for you to add or remove custom attributes from reflection objects, or add dummy properties to those objects, without re-implementing the complete reflection model. The default simply wraps reflection objects without making any changes, but by subclassing and overriding the relevant methods, you can add, remove, or change the attributes that apply to any reflected parameter or member, or add new properties to a reflected type. - - For example, suppose that your code follows the convention of applying a particular attribute to factory methods, but you are now required to work with third-party code that lacks attributes. You can use to specify a rule for identifying the objects that should have attributes and to supply the objects with those attributes when they are viewed from your code. - - To use effectively, the code that uses the reflected objects must support the notion of specifying a reflection context, instead of assuming that all reflected objects are associated with the runtime reflection context. Many reflection methods in the .NET Framework provide a parameter for this purpose. - - To modify the attributes that are applied to a reflected parameter or member, override the or method. These methods take the reflected object and the list of attributes under its current reflection context, and return the list of attributes it should have under the custom reflection context. - + provides a way for you to add or remove custom attributes from reflection objects, or add dummy properties to those objects, without re-implementing the complete reflection model. The default simply wraps reflection objects without making any changes, but by subclassing and overriding the relevant methods, you can add, remove, or change the attributes that apply to any reflected parameter or member, or add new properties to a reflected type. + + For example, suppose that your code follows the convention of applying a particular attribute to factory methods, but you are now required to work with third-party code that lacks attributes. You can use to specify a rule for identifying the objects that should have attributes and to supply the objects with those attributes when they are viewed from your code. + + To use effectively, the code that uses the reflected objects must support the notion of specifying a reflection context, instead of assuming that all reflected objects are associated with the runtime reflection context. Many reflection methods in the .NET Framework provide a parameter for this purpose. + + To modify the attributes that are applied to a reflected parameter or member, override the or method. These methods take the reflected object and the list of attributes under its current reflection context, and return the list of attributes it should have under the custom reflection context. + > [!WARNING] -> methods should not access the list of attributes of a reflected object or method directly by calling the method on the provided or instance, but should instead use the `declaredAttributes` list, which is passed as a parameter to the method overloads. - - To add properties to a reflected type, override the method. The method accepts a parameter that specifies the reflected type, and returns a list of additional properties. You should use the method to create property objects to return. You can specify delegates when creating the property that will serve as the property accessor, and you can omit one of the accessors to create a read-only or write-only property. Note that such dummy properties have no metadata or Common Intermediate Language (CIL) backing. - +> methods should not access the list of attributes of a reflected object or method directly by calling the method on the provided or instance, but should instead use the `declaredAttributes` list, which is passed as a parameter to the method overloads. + + To add properties to a reflected type, override the method. The method accepts a parameter that specifies the reflected type, and returns a list of additional properties. You should use the method to create property objects to return. You can specify delegates when creating the property that will serve as the property accessor, and you can omit one of the accessors to create a read-only or write-only property. Note that such dummy properties have no metadata or Common Intermediate Language (CIL) backing. + > [!WARNING] -> Be cautious about equality among reflected objects when you work with reflection contexts, because objects may represent the same reflected object in multiple contexts. You can use the method to obtain a particular reflection context's version of a reflected object. - +> Be cautious about equality among reflected objects when you work with reflection contexts, because objects may represent the same reflected object in multiple contexts. You can use the method to obtain a particular reflection context's version of a reflected object. + > [!WARNING] -> A object alters the attributes returned by a particular reflection object, such as those obtained by the method. It does not alter the custom attribute data returned by the method, and these two lists will not match when you use a custom reflection context. - - - -## Examples - The following example demonstrates how to subclass to add a custom attribute to all the members of a given type whose names begin with "To". To run this code, paste it into an empty console project, and make sure to include a reference to System.Reflection.Context.dll. - - :::code language="csharp" source="~/snippets/csharp/System.Reflection.Context/CustomReflectionContext/Overview/program.cs" id="Snippet1"::: - +> A object alters the attributes returned by a particular reflection object, such as those obtained by the method. It does not alter the custom attribute data returned by the method, and these two lists will not match when you use a custom reflection context. + + + +## Examples + The following example demonstrates how to subclass to add a custom attribute to all the members of a given type whose names begin with "To". To run this code, paste it into an empty console project, and make sure to include a reference to System.Reflection.Context.dll. + + :::code language="csharp" source="~/snippets/csharp/System.Reflection.Context/CustomReflectionContext/Overview/program.cs" id="Snippet1"::: + ]]> @@ -157,11 +157,11 @@ When overridden in a derived class, provides a collection of additional properties for the specified type, as represented in this reflection context. A collection of additional properties for the specified type. - method. - + method. + ]]> @@ -222,11 +222,11 @@ Creates an object that represents a property to be added to a type, to be used with the method. An object that represents the property. - objects, and should be used only in the context of the method. - + objects, and should be used only in the context of the method. + ]]> @@ -304,11 +304,11 @@ Creates an object that represents a property to be added to a type, to be used with the method and using the specified custom attributes. An object that represents the property. - objects, and should be used only in the context of the method. - + objects, and should be used only in the context of the method. + ]]> diff --git a/xml/System.Reflection.Emit/AssemblyBuilder.xml b/xml/System.Reflection.Emit/AssemblyBuilder.xml index fb16c4cdc58..c2ce717f441 100644 --- a/xml/System.Reflection.Emit/AssemblyBuilder.xml +++ b/xml/System.Reflection.Emit/AssemblyBuilder.xml @@ -585,7 +585,7 @@ The following code example shows how to define and use a dynamic assembly. The e The defined dynamic module is transient. The dynamic module is not saved, even if the parent dynamic assembly was created with . > [!NOTE] -> To suppress optimizations when debugging dynamic modules, apply the attribute to the dynamic assembly before calling . Create an instance of with the flag and apply it using the method. The attribute must be applied to the dynamic assembly. It has no effect if applied to the module. +> To suppress optimizations when debugging dynamic modules, apply the attribute to the dynamic assembly before calling . Create an instance of with the flag and apply it using the method. The attribute must be applied to the dynamic assembly. It has no effect if applied to the module. ## Examples @@ -670,7 +670,7 @@ The following code example shows how to define and use a dynamic assembly. The e The dynamic module is not saved, even if the parent dynamic assembly was created with . > [!NOTE] -> To suppress optimizations when debugging dynamic modules, apply the attribute to the dynamic assembly before calling . Create an instance of with the flag and apply it using the method. The attribute must be applied to the dynamic assembly. It has no effect if applied to the module. +> To suppress optimizations when debugging dynamic modules, apply the attribute to the dynamic assembly before calling . Create an instance of with the flag and apply it using the method. The attribute must be applied to the dynamic assembly. It has no effect if applied to the module. ## Examples @@ -750,7 +750,7 @@ The following code example shows how to define and use a dynamic assembly. The e In an assembly with only one module, that module should contain the assembly manifest. > [!NOTE] -> To suppress optimizations when debugging dynamic modules, apply the attribute to the dynamic assembly before calling . Create an instance of with the flag and apply it using the method. The attribute must be applied to the dynamic assembly. It has no effect if applied to the module. +> To suppress optimizations when debugging dynamic modules, apply the attribute to the dynamic assembly before calling . Create an instance of with the flag and apply it using the method. The attribute must be applied to the dynamic assembly. It has no effect if applied to the module. ## Examples @@ -837,7 +837,7 @@ The following code example shows how to define and use a dynamic assembly. The e In an assembly with only one module, that module should contain the assembly manifest. > [!NOTE] -> To suppress optimizations when debugging dynamic modules, apply the attribute to the dynamic assembly before calling . Create an instance of with the flag and apply it using the method. The attribute must be applied to the dynamic assembly. It has no effect if applied to the module. +> To suppress optimizations when debugging dynamic modules, apply the attribute to the dynamic assembly before calling . Create an instance of with the flag and apply it using the method. The attribute must be applied to the dynamic assembly. It has no effect if applied to the module. ## Examples @@ -958,14 +958,14 @@ The following code example shows how to define and use a dynamic assembly. The e by calling . + Fine grain resources can be added with the returned by calling . `fileName` should not be the same as that of any other persistable module, stand-alone managed resource, or the stand-alone manifest file. - The runtime calls the method when the dynamic assembly is saved. + The runtime calls the method when the dynamic assembly is saved. ## Examples - The following example uses the method to get a resource writer. The example uses the resource writer to add three resource strings. + The following example uses the method to get a resource writer. The example uses the resource writer to add three resource strings. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/AssemblyBuilder/DefineResource/assemblybuilder_defineresource.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/AssemblyBuilder/DefineResource/assemblybuilder_defineresource.vb" id="Snippet1"::: @@ -1041,11 +1041,11 @@ The following code example shows how to define and use a dynamic assembly. The e by calling . + Fine-grain resources can be added with the returned by calling . `fileName` should not be the same as that of any other persistable module, standalone managed resource, or the standalone manifest file. - The runtime calls the method when the dynamic assembly is saved. + The runtime calls the method when the dynamic assembly is saved. ]]> @@ -1111,7 +1111,7 @@ The following code example shows how to define and use a dynamic assembly. The e or after either one of the methods was called previously will throw the System.ArgumentException being throw. Multiple unmanaged resources need to be merged with a tool such as the Microsoft ResMerge utility (not supplied with the common language runtime). + An assembly can be associated with only one unmanaged resource. This means that calling or after either one of the methods was called previously will throw the System.ArgumentException being throw. Multiple unmanaged resources need to be merged with a tool such as the Microsoft ResMerge utility (not supplied with the common language runtime). @@ -1168,7 +1168,7 @@ The following code example shows how to define and use a dynamic assembly. The e or after either one of the methods was called previously will throw the System.ArgumentException. Multiple unmanaged resources need to be merged with a tool such as the Microsoft ResMerge utility (not supplied with the common language runtime). + An assembly can be associated with only one unmanaged resource. This means that calling or after either one of the methods was called previously will throw the System.ArgumentException. Multiple unmanaged resources need to be merged with a tool such as the Microsoft ResMerge utility (not supplied with the common language runtime). ## Examples The example below demonstrates a call to `DefineUnmanagedResource`, passing an external resource file. @@ -1238,7 +1238,7 @@ The following code example shows how to define and use a dynamic assembly. The e or after either one of the methods was called previously will throw the System.ArgumentException. Multiple unmanaged resources need to be merged with a tool such as the Microsoft ResMerge utility (not supplied with the common language runtime SDK). + An assembly can be associated with only one unmanaged resource. This means that calling or after either one of the methods was called previously will throw the System.ArgumentException. Multiple unmanaged resources need to be merged with a tool such as the Microsoft ResMerge utility (not supplied with the common language runtime SDK). Empty argument strings get written as a single space. Spaces are substituted for null characters in the argument strings. @@ -1301,7 +1301,7 @@ The following code example shows how to define and use a dynamic assembly. The e or after either one of the methods was called previously will throw the System.ArgumentException. Multiple unmanaged resources need to be merged with a tool such as the Microsoft `ResMerge` utility (not supplied with the common language runtime SDK). + An assembly can be associated with only one unmanaged resource. This means that calling or after either one of the methods was called previously will throw the System.ArgumentException. Multiple unmanaged resources need to be merged with a tool such as the Microsoft `ResMerge` utility (not supplied with the common language runtime SDK). Empty argument strings get written as a single space. Spaces are substituted for null characters in the argument strings. @@ -1633,7 +1633,7 @@ The following code example shows how to define and use a dynamic assembly. The e and cannot be used in such cases, because they create instances of the attributes. Code in the reflection-only context cannot be executed. For more information and for example code, see the class. + Use this method to examine the custom attributes of code in the reflection-only context, in cases where the custom attributes themselves are defined in code that is loaded into the reflection-only context. Methods such as and cannot be used in such cases, because they create instances of the attributes. Code in the reflection-only context cannot be executed. For more information and for example code, see the class. ]]> @@ -2400,7 +2400,7 @@ The following code example shows how to define and use a dynamic assembly. The e ## Remarks This method does not return a complete list of referenced assemblies. For example, if you apply a custom attribute to the , the assembly in which the attribute was defined is included in the list returned by this method. However, if you use a object to specify the type of a method parameter, that type is not included. - To get a complete list of referenced assemblies, save the assembly, load it into another application domain, and call the method. + To get a complete list of referenced assemblies, save the assembly, load it into another application domain, and call the method. ]]> @@ -2525,7 +2525,7 @@ The following code example shows how to define and use a dynamic assembly. The e ## Remarks Satellite assemblies contain localized resources, as distinct from main application assemblies, which contain non-localizable executable code and resources for a single culture that serve as the default or neutral culture. - Call the overload to use your current assembly version. + Call the overload to use your current assembly version. ]]> @@ -2601,7 +2601,7 @@ The following code example shows how to define and use a dynamic assembly. The e method. + A type cannot be found until it has been created by calling the method. ]]> @@ -3039,7 +3039,7 @@ The following code example shows how to define and use a dynamic assembly. The e To emit a dynamic assembly in the reflection-only context, specify when you create the . If a dynamic assembly is emitted in the reflection-only context, its code cannot be executed. > [!NOTE] -> After you have saved a dynamic assembly to disk, you can use the method to load the completed assembly into the reflection-only context. However, the assembly can no longer be modified. +> After you have saved a dynamic assembly to disk, you can use the method to load the completed assembly into the reflection-only context. However, the assembly can no longer be modified. ]]> @@ -3102,11 +3102,11 @@ The following code example shows how to define and use a dynamic assembly. The e This method saves all non-transient dynamic modules defined in this dynamic assembly. Transient dynamic modules are not saved. The assembly file name can be the same as the name of one of the modules. If so, the assembly manifest is stored within that module. `assemblyFileName` can be different from the names of all of the modules contained within the assembly. If so, the assembly file contains only the assembly manifest. - For each obtained using , this method writes the .resources file and calls to close the stream. + For each obtained using , this method writes the .resources file and calls to close the stream. - The `assemblyFileName` needs to be a simple file name without a drive or directory component. To create an assembly in a specific directory, use one of the methods that takes a target directory argument. + The `assemblyFileName` needs to be a simple file name without a drive or directory component. To create an assembly in a specific directory, use one of the methods that takes a target directory argument. - In .NET Framework 2.0, this overload of the method is equivalent to calling the method overload with for the `portableExecutableKind` parameter and for the `imageFileMachine` parameter. + In .NET Framework 2.0, this overload of the method is equivalent to calling the method overload with for the `portableExecutableKind` parameter and for the `imageFileMachine` parameter. ## Examples The following code sample creates a dynamic assembly and then persists it to a local disk using `Save`. @@ -3193,9 +3193,9 @@ The following code example shows how to define and use a dynamic assembly. The e This method saves all non-transient dynamic modules defined in this dynamic assembly. Transient dynamic modules are not saved. The assembly file name can be the same as the name of one of the module. If so, the assembly manifest is stored within that module. `assemblyFileName` can be different from the names of all of the modules contained within the assembly. If so, the assembly file contains only the assembly manifest. - For each obtained using , this method writes the .resources file and calls to close the stream. + For each obtained using , this method writes the .resources file and calls to close the stream. - The `assemblyFileName` needs to be a simple file name without a drive or directory component. To create an assembly in a specific directory, use one of the methods that takes a target directory argument. + The `assemblyFileName` needs to be a simple file name without a drive or directory component. To create an assembly in a specific directory, use one of the methods that takes a target directory argument. ]]> @@ -3325,7 +3325,7 @@ The following code example shows how to define and use a dynamic assembly. The e ## Remarks > [!NOTE] -> cannot be used to set declarative security attributes. Use one of the overloads of that takes required, optional, and refused permissions. +> cannot be used to set declarative security attributes. Use one of the overloads of that takes required, optional, and refused permissions. ## Examples The following code sample illustrates the use of `SetCustomAttribute` within , using a . @@ -3404,7 +3404,7 @@ For information on how to format `binaryAttribute`, see the metadata specificati `RuntimeConstructorInfo` is a special type generated by the system. It derives from the class, and any object you obtain through reflection is actually an instance of `RuntimeConstructorInfo`. > [!NOTE] -> cannot be used to set declarative security attributes. Use one of the overloads of that takes required, optional, and refused permissions. +> cannot be used to set declarative security attributes. Use one of the overloads of that takes required, optional, and refused permissions. ## Examples The following code sample illustrates the use of `SetCustomAttribute` to attach a custom attribute to a dynamically generated assembly. diff --git a/xml/System.Reflection.Emit/ConstructorBuilder.xml b/xml/System.Reflection.Emit/ConstructorBuilder.xml index 6e00514b029..b13b034a5dc 100644 --- a/xml/System.Reflection.Emit/ConstructorBuilder.xml +++ b/xml/System.Reflection.Emit/ConstructorBuilder.xml @@ -80,15 +80,15 @@ is used to fully describe a constructor in Microsoft intermediate language (MSIL), including the name, attributes, signature, and constructor body. It is used in conjunction with the class to create classes at run time. Call to get an instance of . + is used to fully describe a constructor in Microsoft intermediate language (MSIL), including the name, attributes, signature, and constructor body. It is used in conjunction with the class to create classes at run time. Call to get an instance of . If you do not define a constructor for your dynamic type, a parameterless constructor is provided automatically, and it calls the parameterless constructor of the base class. If you use to define a constructor for your dynamic type, a parameterless constructor is not provided. You have the following options for providing a parameterless constructor in addition to the constructor you defined: -- If you want a parameterless constructor that simply calls the parameterless constructor of the base class, you can use the method to create one (and optionally restrict access to it). Do not provide an implementation for this parameterless constructor. If you do, an exception is thrown when you try to use the constructor. No exception is thrown when the method is called. +- If you want a parameterless constructor that simply calls the parameterless constructor of the base class, you can use the method to create one (and optionally restrict access to it). Do not provide an implementation for this parameterless constructor. If you do, an exception is thrown when you try to use the constructor. No exception is thrown when the method is called. -- If you want a parameterless constructor that does something more than simply calling the parameterless constructor of the base class, or that calls another constructor of the base class, or that does something else entirely, you must use the method to create a , and provide your own implementation. +- If you want a parameterless constructor that does something more than simply calling the parameterless constructor of the base class, or that calls another constructor of the base class, or that does something else entirely, you must use the method to create a , and provide your own implementation. @@ -170,7 +170,7 @@ can be called several times, with each call specifying a security action (such as `Demand`, `Assert`, and `Deny`) and a set of permissions that the action applies to. + can be called several times, with each call specifying a security action (such as `Demand`, `Assert`, and `Deny`) and a set of permissions that the action applies to. > [!NOTE] > In the .NET Framework versions 1.0, 1.1, and 2.0, the declarative security attributes applied to a constructor by using this method are stored in the old XML metadata format. See Emitting Declarative Security Attributes. @@ -512,7 +512,7 @@ ## Remarks The `inherit` parameter is ignored because a class never inherits constructors from base classes. - To get the custom attributes, finish building the type by calling , retrieve the constructor by calling the method on the returned type, and then call the method on the returned . + To get the custom attributes, finish building the type by calling , retrieve the constructor by calling the method on the returned type, and then call the method on the returned . ]]> @@ -569,7 +569,7 @@ ## Remarks The `inherit` parameter is ignored because a class never inherits constructors from base classes. - To get the custom attributes, finish building the type by calling , retrieve the constructor by calling the method on the returned type, and then call the method on the returned . + To get the custom attributes, finish building the type by calling , retrieve the constructor by calling the method on the returned type, and then call the method on the returned . ]]> @@ -874,7 +874,7 @@ method has been called. In the .NET Framework versions 1.0 and 1.1, is thrown. In the .NET Framework version 2.0, is thrown. + This property is not supported until after the method has been called. In the .NET Framework versions 1.0 and 1.1, is thrown. In the .NET Framework version 2.0, is thrown. @@ -1365,7 +1365,7 @@ method. + This property returns the same value as the method. ]]> diff --git a/xml/System.Reflection.Emit/CustomAttributeBuilder.xml b/xml/System.Reflection.Emit/CustomAttributeBuilder.xml index 50007614512..f6ec7329951 100644 --- a/xml/System.Reflection.Emit/CustomAttributeBuilder.xml +++ b/xml/System.Reflection.Emit/CustomAttributeBuilder.xml @@ -76,7 +76,7 @@ and its argument. Then call on an `AssemblyBuilder` to establish the association. + Use the `CustomAttributeBuilder` object returned by the constructor to describe the custom attribute. Associate the `CustomAttribute` with a builder instance by calling the `SetCustomAttribute` method on that builder instance. For example, create a `CustomAttributeBuilder` to describe an instance of `AssemblyCultureAttribute` by supplying the constructor of and its argument. Then call on an `AssemblyBuilder` to establish the association. @@ -243,7 +243,7 @@ The elements of the `constructorArgs` and `fieldValues` arrays are restricted to element types. They can be `byte`, `sbyte`, `int`, `uint`, `long`, `ulong`, `float`, `double`, `String`, `char`, `bool`, an enum, a type, any of the previous types that was cast to an object, or a single-dimension, zero-based array of any of the previous types. > [!IMPORTANT] -> Do not include private fields in `namedFields`. Doing so will cause to be thrown when the method is later called on the completed type. +> Do not include private fields in `namedFields`. Doing so will cause to be thrown when the method is later called on the completed type. ]]> @@ -343,7 +343,7 @@ The elements of the `constructorArgs` and `propertyValues` arrays are restricted to element types. They can be `byte`, `sbyte`, `int`, `uint`, `long`, `ulong`, `float`, `double`, `String`, `char`, `bool`, an enum, a type, any of the previous types that was cast to an object, or a single-dimension, zero-based array of any of the previous types. > [!IMPORTANT] -> Do not include private properties in `namedProperties`. Doing so will cause to be thrown when the method is later called on the completed type. +> Do not include private properties in `namedProperties`. Doing so will cause to be thrown when the method is later called on the completed type. ]]> @@ -458,7 +458,7 @@ The elements of the `constructorArgs`, `propertyValues`, or `fieldValues` arrays are restricted to element types. They can be `byte`, `sbyte`, `int`, `uint`, `long`, `ulong`, `float`, `double`, `String`, `char`, `bool`, an enum, a type, any of the previous types that was cast to an object, or a single-dimension, zero-based array of any of the previous types. > [!IMPORTANT] -> Do not include private properties or fields in `namedProperties` or `namedFields`. Doing so will cause to be thrown when the method is later called on the completed type. +> Do not include private properties or fields in `namedProperties` or `namedFields`. Doing so will cause to be thrown when the method is later called on the completed type. ]]> diff --git a/xml/System.Reflection.Emit/DynamicILInfo.xml b/xml/System.Reflection.Emit/DynamicILInfo.xml index 1bfabac7bf7..d50aa913305 100644 --- a/xml/System.Reflection.Emit/DynamicILInfo.xml +++ b/xml/System.Reflection.Emit/DynamicILInfo.xml @@ -63,14 +63,14 @@ ## Remarks The class allows developers to write their own MSIL generators instead of using . - To create instances of other types, call methods, and so on, the MSIL you generate must include tokens for those entities. The class provides several overloads of the method, which return tokens valid in the scope of the current . For example, if you need to call an overload of the method, you can obtain a for that overload and pass it to the method to obtain a token to embed in your MSIL. + To create instances of other types, call methods, and so on, the MSIL you generate must include tokens for those entities. The class provides several overloads of the method, which return tokens valid in the scope of the current . For example, if you need to call an overload of the method, you can obtain a for that overload and pass it to the method to obtain a token to embed in your MSIL. - Once you have created arrays for your local variable signature, exceptions, and code body, you can use the , , and methods to insert them into the associated with your object. + Once you have created arrays for your local variable signature, exceptions, and code body, you can use the , , and methods to insert them into the associated with your object. Generating your own metadata and MSIL requires familiarity with the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics" and "Partition III: CIL Instruction Set". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). > [!NOTE] -> Do not use to generate code that creates a delegate to another dynamic method by calling the delegate constructor directly. Instead, use the method to create the delegate. A delegate that is created with the delegate constructor does not have a reference to the target dynamic method. The dynamic method might be reclaimed by garbage collection while the delegate is still in use. +> Do not use to generate code that creates a delegate to another dynamic method by calling the delegate constructor directly. Instead, use the method to create the delegate. A delegate that is created with the delegate constructor does not have a reference to the target dynamic method. The dynamic method might be reclaimed by garbage collection while the delegate is still in use. ]]> @@ -276,7 +276,7 @@ object. Use the method to get a for the field you want to access, then use the property to get the . + You must obtain a token for any field that will be accessed by the dynamic method associated with the current object. Use the method to get a for the field you want to access, then use the property to get the . ]]> @@ -332,10 +332,10 @@ object. Use the method to get a for the method you want to access, and then use the property to get the . + You must obtain a token for any method that will be accessed by the dynamic method associated with the current object. Use the method to get a for the method you want to access, and then use the property to get the . > [!NOTE] -> For a method that belongs to a generic type, use the method overload and specify a for the generic type. +> For a method that belongs to a generic type, use the method overload and specify a for the generic type. ]]> @@ -481,7 +481,7 @@ object. Use the method to get a for the field you want to access, and then use the property to get the . + You must obtain a token for any field that will be accessed by the dynamic method associated with the current object. Use the method to get a for the field you want to access, and then use the property to get the . ]]> @@ -533,7 +533,7 @@ object. Use the method to get a for the method you want to call, and then use the property to get the . + You must obtain a token for any method that will be called by the dynamic method associated with the current object. Use the method to get a for the method you want to call, and then use the property to get the . ]]> @@ -855,7 +855,7 @@ method to get a for the local signature. + The local variable signature describes the layout of a method's local variables. To simplify construction of the local variable signature, use the `static` (`Shared` in Visual Basic) method to get a for the local signature. For information on local variable signatures, see the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). @@ -917,7 +917,7 @@ method to get a for the local signature. + The local variable signature describes the layout of a method's local variables. To simplify construction of the local variable signature, use the `static` (`Shared` in Visual Basic) method to get a for the local signature. For information on local variable signatures, see the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). diff --git a/xml/System.Reflection.Emit/DynamicMethod.xml b/xml/System.Reflection.Emit/DynamicMethod.xml index 80505153580..cd2f42ed905 100644 --- a/xml/System.Reflection.Emit/DynamicMethod.xml +++ b/xml/System.Reflection.Emit/DynamicMethod.xml @@ -57,7 +57,7 @@ For more information about this API, see Supplemental API remarks for DynamicMethod. method. +The following code example creates a dynamic method that takes two parameters. The example emits a simple function body that prints the first parameter to the console, and the example uses the second parameter as the return value of the method. The example completes the method by creating a delegate, invokes the delegate with different parameters, and finally invokes the dynamic method using the method. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/DynamicMethod/Overview/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/DynamicMethod/Overview/source.vb" id="Snippet1"::: @@ -151,7 +151,7 @@ The following code example creates a dynamic method that takes two parameters. T ## Remarks The dynamic method that is created by this constructor is associated with an anonymous assembly instead of an existing type or module. The anonymous assembly exists only to provide a sandbox environment for dynamic methods, that is, to isolate them from other code. This environment makes it safe for the dynamic method to be emitted and executed by partially trusted code. - This constructor specifies that just-in-time (JIT) visibility checks will be enforced for the Microsoft intermediate language (MSIL) of the dynamic method. That is, the code in the dynamic method has access to public methods of public classes. Exceptions are thrown if the method tries to access types or members that are `private`, `protected`, or `internal` (`Friend` in Visual Basic). To create a dynamic method that has restricted ability to skip JIT visibility checks, use the constructor. + This constructor specifies that just-in-time (JIT) visibility checks will be enforced for the Microsoft intermediate language (MSIL) of the dynamic method. That is, the code in the dynamic method has access to public methods of public classes. Exceptions are thrown if the method tries to access types or members that are `private`, `protected`, or `internal` (`Friend` in Visual Basic). To create a dynamic method that has restricted ability to skip JIT visibility checks, use the constructor. When an anonymously hosted dynamic method is constructed, the call stack of the emitting assembly is included. When the method is invoked, the permissions of the emitting assembly are used instead of the permissions of the actual caller. Thus, the dynamic method cannot execute at a higher level of privilege than that of the assembly that emitted it, even if it is passed to and executed by an assembly that has a higher trust level. @@ -257,7 +257,7 @@ The following code example creates a dynamic method that takes two parameters. T - The call stack that emits the dynamic method is granted with the flag. This is always true when the code is executed with full trust. For partially trusted code, it is true only if the host explicitly grants the permission. > [!IMPORTANT] - > If the permission has not been granted, a security exception is thrown when is called or when the dynamic method is invoked, not when this constructor is called. No special permissions are required to emit the dynamic method. + > If the permission has not been granted, a security exception is thrown when is called or when the dynamic method is invoked, not when this constructor is called. No special permissions are required to emit the dynamic method. For example, a dynamic method that is created with `restrictedSkipVisibility` set to `true` can access a private member of any assembly on the call stack if the call stack has been granted restricted member access. If the dynamic method is created with partially trusted code on the call stack, it cannot access a private member of a type in a .NET Framework assembly, because such assemblies are fully trusted. @@ -363,7 +363,7 @@ The following code example creates a dynamic method that takes two parameters. T > For backward compatibility, this constructor demands with the flag if the following conditions are both true: `m` is a module other than the calling module, and the demand for with the flag has failed. If the demand for succeeds, the operation is allowed. ## Examples - The following code example creates a dynamic method that takes two parameters. The example emits a simple function body that prints the first parameter to the console, and the example uses the second parameter as the return value of the method. The example completes the method by creating a delegate, invokes the delegate with different parameters, and finally invokes the dynamic method using the method. + The following code example creates a dynamic method that takes two parameters. The example emits a simple function body that prints the first parameter to the console, and the example uses the second parameter as the return value of the method. The example completes the method by creating a delegate, invokes the delegate with different parameters, and finally invokes the dynamic method using the method. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/DynamicMethod/.ctor/source1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/DynamicMethod/.ctor/source1.vb" id="Snippet1"::: @@ -477,10 +477,10 @@ The following code example creates a dynamic method that takes two parameters. T > [!NOTE] > In general, changing the internal fields of classes is not good object-oriented coding practice. - The example code creates an instance of `Example` and then creates two delegates. The first is of type `UseLikeStatic`, which has the same parameters as the dynamic method. The second is of type `UseLikeInstance`, which lacks the first parameter (of type `Example`). This delegate is created using the method overload; the second parameter of that method overload is an instance of `Example`, in this case the instance just created, which is bound to the newly created delegate. Whenever that delegate is invoked, the dynamic method acts on the bound instance of `Example`. + The example code creates an instance of `Example` and then creates two delegates. The first is of type `UseLikeStatic`, which has the same parameters as the dynamic method. The second is of type `UseLikeInstance`, which lacks the first parameter (of type `Example`). This delegate is created using the method overload; the second parameter of that method overload is an instance of `Example`, in this case the instance just created, which is bound to the newly created delegate. Whenever that delegate is invoked, the dynamic method acts on the bound instance of `Example`. > [!NOTE] -> This is an example of the relaxed rules for delegate binding introduced in .NET Framework 2.0, along with new overloads of the method. For more information, see the class. +> This is an example of the relaxed rules for delegate binding introduced in .NET Framework 2.0, along with new overloads of the method. For more information, see the class. The `UseLikeStatic` delegate is invoked, passing in the instance of `Example` that is bound to the `UseLikeInstance` delegate. Then the `UseLikeInstance` delegate is invoked, so that both delegates act on the same instance of `Example`. The changes in the values of the internal field are displayed after each call. Finally, a `UseLikeInstance` delegate is bound to an instance of `DerivedFromExample`, and the delegate calls are repeated. @@ -1121,14 +1121,14 @@ The following code example creates a dynamic method that takes two parameters. T method or the method completes the dynamic method. Any further attempt to alter the dynamic method, such as modifying parameter definitions or emitting more Microsoft intermediate language (MSIL), is ignored; no exception is thrown. + Calling the method or the method completes the dynamic method. Any further attempt to alter the dynamic method, such as modifying parameter definitions or emitting more Microsoft intermediate language (MSIL), is ignored; no exception is thrown. - To create a method body for a dynamic method when you have your own MSIL generator, call the method to obtain a object. If you do not have your own MSIL generator, call the method to obtain an object that can be used to generate the method body. + To create a method body for a dynamic method when you have your own MSIL generator, call the method to obtain a object. If you do not have your own MSIL generator, call the method to obtain an object that can be used to generate the method body. ## Examples - The following code example creates a dynamic method that takes two parameters. The example emits a simple function body that prints the first parameter to the console, and the example uses the second parameter as the return value of the method. The example completes the method by creating a delegate, invokes the delegate with different parameters, and finally invokes the dynamic method using the method. + The following code example creates a dynamic method that takes two parameters. The example emits a simple function body that prints the first parameter to the console, and the example uses the second parameter as the return value of the method. The example completes the method by creating a delegate, invokes the delegate with different parameters, and finally invokes the dynamic method using the method. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/DynamicMethod/.ctor/source1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/DynamicMethod/.ctor/source1.vb" id="Snippet1"::: @@ -1216,9 +1216,9 @@ The following code example creates a dynamic method that takes two parameters. T This method overload requires `target` to be of the same type as the first parameter of the dynamic method, or to be assignable to that type (for example, a derived class). The signature of `delegateType` has all the parameters of the dynamic method except the first. For example, if the dynamic method has the parameters , , and , then `delegateType` has the parameters and ; `target` is of type . - Calling the method or the method completes the dynamic method. Any further attempt to alter the dynamic method, such as modifying parameter definitions or emitting more Microsoft intermediate language (MSIL), is ignored; no exception is thrown. + Calling the method or the method completes the dynamic method. Any further attempt to alter the dynamic method, such as modifying parameter definitions or emitting more Microsoft intermediate language (MSIL), is ignored; no exception is thrown. - To create a method body for a dynamic method when you have your own MSIL generator, call the method to obtain a object. If you do not have your own MSIL generator, call the method to obtain an object that can be used to generate the method body. + To create a method body for a dynamic method when you have your own MSIL generator, call the method to obtain a object. If you do not have your own MSIL generator, call the method to obtain an object that can be used to generate the method body. @@ -1232,10 +1232,10 @@ The following code example creates a dynamic method that takes two parameters. T > [!NOTE] > In general, changing the internal fields of classes is not good object-oriented coding practice. - The example code creates an instance of `Example` and then creates two delegates. The first is of type `UseLikeStatic`, which has the same parameters as the dynamic method. The second is of type `UseLikeInstance`, which lacks the first parameter (of type `Example`). This delegate is created using the method overload; the second parameter of that method overload is an instance of `Example`, in this case the instance just created, which is bound to the newly created delegate. Whenever that delegate is invoked, the dynamic method acts on the bound instance of `Example`. + The example code creates an instance of `Example` and then creates two delegates. The first is of type `UseLikeStatic`, which has the same parameters as the dynamic method. The second is of type `UseLikeInstance`, which lacks the first parameter (of type `Example`). This delegate is created using the method overload; the second parameter of that method overload is an instance of `Example`, in this case the instance just created, which is bound to the newly created delegate. Whenever that delegate is invoked, the dynamic method acts on the bound instance of `Example`. > [!NOTE] -> This is an example of the relaxed rules for delegate binding introduced in .NET Framework 2.0, along with new overloads of the method. For more information, see the class. +> This is an example of the relaxed rules for delegate binding introduced in .NET Framework 2.0, along with new overloads of the method. For more information, see the class. The `UseLikeStatic` delegate is invoked, passing in the instance of `Example` that is bound to the `UseLikeInstance` delegate. Then the `UseLikeInstance` delegate is invoked, so that both delegates act on the same instance of `Example`. The changes in the values of the internal field are displayed after each call. Finally, a `UseLikeInstance` delegate is bound to an instance of `DerivedFromExample`, and the delegate calls are repeated. @@ -1365,9 +1365,9 @@ The following code example creates a dynamic method that takes two parameters. T method refers to the return value. Setting parameter information has no effect on the return value. + If `position` is 0, the method refers to the return value. Setting parameter information has no effect on the return value. - If the dynamic method has already been completed, by calling the or method, the method has no effect. No exception is thrown. + If the dynamic method has already been completed, by calling the or method, the method has no effect. No exception is thrown. @@ -1497,7 +1497,7 @@ The following code example creates a dynamic method that takes two parameters. T For dynamic methods, specifying `true` for `inherit` has no effect, because the method is not declared in a type. > [!NOTE] -> Custom attributes are not currently supported on dynamic methods. The only attribute returned is ; you can get the method implementation flags more easily using the method. +> Custom attributes are not currently supported on dynamic methods. The only attribute returned is ; you can get the method implementation flags more easily using the method. ]]> @@ -1555,7 +1555,7 @@ The following code example creates a dynamic method that takes two parameters. T For dynamic methods, specifying `true` for `inherit` has no effect, because the method is not declared in a type. > [!NOTE] -> Custom attributes are not currently supported on dynamic methods. The only attribute returned is ; you can get the method implementation flags more easily using the method. +> Custom attributes are not currently supported on dynamic methods. The only attribute returned is ; you can get the method implementation flags more easily using the method. ]]> @@ -1671,7 +1671,7 @@ The following code example creates a dynamic method that takes two parameters. T or method, any further attempt to add MSIL is ignored. No exception is thrown. + After a dynamic method has been completed, by calling the or method, any further attempt to add MSIL is ignored. No exception is thrown. > [!NOTE] > There are restrictions on unverifiable code in dynamic methods, even in some full-trust scenarios. See the "Verification" section in Remarks for . @@ -1679,7 +1679,7 @@ The following code example creates a dynamic method that takes two parameters. T ## Examples - The following code example creates a dynamic method that takes two parameters. The example emits a simple function body that prints the first parameter to the console, and the example uses the second parameter as the return value of the method. The example completes the method by creating a delegate, invokes the delegate with different parameters, and finally invokes the dynamic method using the method. + The following code example creates a dynamic method that takes two parameters. The example emits a simple function body that prints the first parameter to the console, and the example uses the second parameter as the return value of the method. The example completes the method by creating a delegate, invokes the delegate with different parameters, and finally invokes the dynamic method using the method. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/DynamicMethod/.ctor/source1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/DynamicMethod/.ctor/source1.vb" id="Snippet1"::: @@ -1741,7 +1741,7 @@ The following code example creates a dynamic method that takes two parameters. T or method, any further attempt to add MSIL is ignored. No exception is thrown. + After a dynamic method has been completed, by calling the or method, any further attempt to add MSIL is ignored. No exception is thrown. > [!NOTE] > There are restrictions on unverifiable code in dynamic methods, even in some full-trust scenarios. See the "Verification" section in Remarks for . @@ -1850,7 +1850,7 @@ The following code example creates a dynamic method that takes two parameters. T objects returned by this method are for information only. Use the method to set or change the characteristics of the parameters. + The objects returned by this method are for information only. Use the method to set or change the characteristics of the parameters. @@ -1984,16 +1984,16 @@ The following code example creates a dynamic method that takes two parameters. T ## Remarks In addition to the listed exceptions, the calling code should be prepared to catch any exceptions thrown by the dynamic method. - Executing a dynamic method with a delegate created by the method is more efficient than executing it with the method. + Executing a dynamic method with a delegate created by the method is more efficient than executing it with the method. - Calling the method or the method completes the dynamic method. Any further attempt to alter the dynamic method, such as modifying parameter definitions or emitting more Microsoft intermediate language (MSIL), is ignored; no exception is thrown. + Calling the method or the method completes the dynamic method. Any further attempt to alter the dynamic method, such as modifying parameter definitions or emitting more Microsoft intermediate language (MSIL), is ignored; no exception is thrown. - All dynamic methods are static, so the `obj` parameter is always ignored. To treat a dynamic method as if it were an instance method, use the overload that takes an object instance. + All dynamic methods are static, so the `obj` parameter is always ignored. To treat a dynamic method as if it were an instance method, use the overload that takes an object instance. If the dynamic method has no parameters, the value of `parameters` should be `null`. Otherwise the number, type, and order of elements in the parameters array should be identical to the number, type, and order of parameters of the dynamic method. > [!NOTE] -> This method overload is called by the method overload inherited from the class, so the preceding remarks apply to both overloads. +> This method overload is called by the method overload inherited from the class, so the preceding remarks apply to both overloads. This method does not demand permissions directly, but invoking the dynamic method can result in security demands, depending on the method. For example, no demands are made for anonymously hosted dynamic methods that are created with the `restrictedSkipVisibility` parameter set to `false`. On the other hand, if you create a method with `restrictedSkipVisibility` set to `true` so it can access a hidden member of a target assembly, the method will cause a demand for the permissions of the target assembly plus with the flag. @@ -2123,7 +2123,7 @@ The following code example creates a dynamic method that takes two parameters. T , , and properties report the transparency level of the dynamic method as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: + The , , and properties report the transparency level of the dynamic method as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: |Security level|IsSecurityCritical|IsSecuritySafeCritical|IsSecurityTransparent| |--------------------|------------------------|----------------------------|---------------------------| @@ -2211,7 +2211,7 @@ The following code example creates a dynamic method that takes two parameters. T , , and properties report the transparency level of the dynamic method as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: + The , , and properties report the transparency level of the dynamic method as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: |Security level|IsSecurityCritical|IsSecuritySafeCritical|IsSecurityTransparent| |--------------------|------------------------|----------------------------|---------------------------| @@ -2299,7 +2299,7 @@ The following code example creates a dynamic method that takes two parameters. T , , and properties report the transparency level of the dynamic method as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: + The , , and properties report the transparency level of the dynamic method as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: |Security level|IsSecurityCritical|IsSecuritySafeCritical|IsSecurityTransparent| |--------------------|------------------------|----------------------------|---------------------------| @@ -2727,7 +2727,7 @@ The following code example creates a dynamic method that takes two parameters. T method is always empty. + Custom attributes are not supported on the return type of a dynamic method, so the array of custom attributes returned by the method is always empty. @@ -2790,7 +2790,7 @@ The following code example creates a dynamic method that takes two parameters. T ## Examples - The following code example displays the method of a dynamic method. This code example is part of a larger example provided for the class. + The following code example displays the method of a dynamic method. This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/DynamicMethod/Overview/source.cs" id="Snippet32"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/DynamicMethod/Overview/source.vb" id="Snippet32"::: diff --git a/xml/System.Reflection.Emit/EnumBuilder.xml b/xml/System.Reflection.Emit/EnumBuilder.xml index 214e4d4fe5f..1f266c8f1b9 100644 --- a/xml/System.Reflection.Emit/EnumBuilder.xml +++ b/xml/System.Reflection.Emit/EnumBuilder.xml @@ -1026,7 +1026,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the constructor of a finished type, you can retrieve the type using or and use reflection on the retrieved type. ]]> @@ -1089,7 +1089,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr and call on the returned . + As a workaround, to retrieve the custom attributes of a finished type, retrieve the type using and call on the returned . The following code sample illustrates the use of `GetCustomAttribute` in the context of . @@ -1149,7 +1149,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr and call on the returned . + As a workaround, to retrieve the custom attributes of a finished type, retrieve the type using and call on the returned . The following code sample illustrates the use of `GetCustomAttribute` in the context of . @@ -1307,7 +1307,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the event of a finished type, retrieve the type using or and use reflection on the retrieved type. ]]> @@ -1373,7 +1373,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the events of a finished type, retrieve the type using or and use reflection on the retrieved type. ]]> @@ -1432,7 +1432,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type to retrieve the events. + As a workaround, to retrieve the events of a finished type, retrieve the type using or and use reflection on the retrieved type to retrieve the events. ]]> @@ -1500,7 +1500,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the field of a finished type, retrieve the type using or and use reflection on the retrieved type. ]]> @@ -1559,9 +1559,9 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the field of a finished type, retrieve the type using or and use reflection on the retrieved type. - The method does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned, because that order can vary. + The method does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned, because that order can vary. ]]> @@ -1689,7 +1689,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the interface of a finished type, retrieve the type using or and use reflection on the retrieved type. ]]> @@ -1755,7 +1755,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the interface mapping types of a finished type, retrieve the type using or and use reflection on the retrieved type. ]]> @@ -1811,7 +1811,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the interface of a finished type, retrieve the type using or and use reflection on the retrieved type. ]]> @@ -1877,7 +1877,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the member of a finished type, retrieve the type using or and use reflection on the retrieved type. ]]> @@ -1940,7 +1940,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the members of a finished type, retrieve the type using or and use reflection on the retrieved type. ]]> @@ -2091,7 +2091,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the methods of a finished type, retrieve the type using or and use reflection on the retrieved type. ]]> @@ -2163,7 +2163,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the nested type of a finished type, retrieve the type using or and use reflection on the retrieved type. ]]> @@ -2224,7 +2224,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the nested types of a finished type, retrieve the type using or and use reflection on the retrieved type. ]]> @@ -2283,7 +2283,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + As a workaround, to retrieve the properties of a finished type, retrieve the type using or and use reflection on the retrieved type. ]]> @@ -2554,7 +2554,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr or and use reflection on the retrieved type. + You can retrieve the type using or and use reflection on the retrieved type. ]]> @@ -2862,7 +2862,7 @@ The following code sample demonstrates the use of the `AssemblyQualifiedName` pr and call on the returned . + As a workaround, to check if a custom attribute is defined for a finished type, retrieve the type using and call on the returned . ]]> @@ -4100,7 +4100,7 @@ For information on how to format `binaryAttribute`, see the metadata specificati or and use reflection on the retrieved type. + You can retrieve the type using or and use reflection on the retrieved type. Use this handle to access the underlying metadata handle. diff --git a/xml/System.Reflection.Emit/EventToken.xml b/xml/System.Reflection.Emit/EventToken.xml index 5af7717eb95..6851727a84a 100644 --- a/xml/System.Reflection.Emit/EventToken.xml +++ b/xml/System.Reflection.Emit/EventToken.xml @@ -194,7 +194,7 @@ if is equal to ; otherwise, . - .]]> + .]]> @@ -229,7 +229,7 @@ if is not equal to ; otherwise, . - .]]> + .]]> diff --git a/xml/System.Reflection.Emit/FieldBuilder.xml b/xml/System.Reflection.Emit/FieldBuilder.xml index 6cc8870c6e4..ea6292017a6 100644 --- a/xml/System.Reflection.Emit/FieldBuilder.xml +++ b/xml/System.Reflection.Emit/FieldBuilder.xml @@ -80,10 +80,10 @@ , , or . + Get an instance of `FieldBuilder` by calling , , or . > [!NOTE] -> The method is currently not supported. As a workaround, retrieve the by reflecting on the finished type and call to set the value of the field. +> The method is currently not supported. As a workaround, retrieve the by reflecting on the finished type and call to set the value of the field. @@ -494,7 +494,7 @@ ## Remarks If the field is `static`, the `obj` parameter is ignored. For non-static fields, `obj` should be an instance of a class that inherits or declares the field. - The return type of is . For example, if the field holds a Boolean primitive value, an instance of with the appropriate Boolean value is returned. Before returning the value, checks to see if the user has access permission. + The return type of is . For example, if the field holds a Boolean primitive value, an instance of with the appropriate Boolean value is returned. Before returning the value, checks to see if the user has access permission. Access restrictions are ignored for fully-trusted code. `Private` constructors, methods, fields, and properties can be accessed and invoked using Reflection whenever the code is fully-trusted. @@ -1225,12 +1225,12 @@ For information on how to format `binaryAttribute`, see the metadata specificati ## Remarks This method will assign the `val` parameter to the field reflected by this instance on `obj`. If the field is static, `obj` will be ignored. For non-static fields, `obj` should be an instance of a class that inherits or declares the field. - The new value is passed as an . For example, if the field's type is Boolean, an instance of with the appropriate Boolean value is passed. Before setting the value, checks to see if the user has access permission. + The new value is passed as an . For example, if the field's type is Boolean, an instance of with the appropriate Boolean value is passed. Before setting the value, checks to see if the user has access permission. Access restrictions are ignored for fully-trusted code. `Private` constructors, methods, fields, and properties can be accessed and invoked using Reflection whenever the code is fully-trusted. > [!NOTE] -> This method is currently not supported. As a workaround, retrieve the by reflecting on the finished type and call to set the value of the field. +> This method is currently not supported. As a workaround, retrieve the by reflecting on the finished type and call to set the value of the field. ]]> diff --git a/xml/System.Reflection.Emit/FieldToken.xml b/xml/System.Reflection.Emit/FieldToken.xml index da3d7a27fcf..143ef91dbfb 100644 --- a/xml/System.Reflection.Emit/FieldToken.xml +++ b/xml/System.Reflection.Emit/FieldToken.xml @@ -194,7 +194,7 @@ if is equal to ; otherwise, . - .]]> + .]]> @@ -229,7 +229,7 @@ if is not equal to ; otherwise, . - .]]> + .]]> diff --git a/xml/System.Reflection.Emit/GenericTypeParameterBuilder.xml b/xml/System.Reflection.Emit/GenericTypeParameterBuilder.xml index ec45666656b..450df2776e9 100644 --- a/xml/System.Reflection.Emit/GenericTypeParameterBuilder.xml +++ b/xml/System.Reflection.Emit/GenericTypeParameterBuilder.xml @@ -68,15 +68,15 @@ objects by using the method to add type parameters to a dynamic type, thus making it a generic type, or by using the method to add type parameters to a dynamic method. Use the objects to add constraints to the type parameters. Constraints are of three kinds: + You can get an array of objects by using the method to add type parameters to a dynamic type, thus making it a generic type, or by using the method to add type parameters to a dynamic method. Use the objects to add constraints to the type parameters. Constraints are of three kinds: -- The base type constraint specifies that any type assigned to the generic type parameter must derive from a particular base type. Set this constraint by using the method. +- The base type constraint specifies that any type assigned to the generic type parameter must derive from a particular base type. Set this constraint by using the method. -- An interface constraint specifies that any type assigned to the generic type parameter must implement a particular interface. Set the interface constraints by using the method. +- An interface constraint specifies that any type assigned to the generic type parameter must implement a particular interface. Set the interface constraints by using the method. -- Special constraints specify that any type assigned to the generic type parameter must have a parameterless constructor, must be a reference type, or must be a value type. Set the special constraints for a type parameter by using the method. +- Special constraints specify that any type assigned to the generic type parameter must have a parameterless constructor, must be a reference type, or must be a value type. Set the special constraints for a type parameter by using the method. - Interface constraints and special constraints cannot be retrieved using methods of the class. Once you have created the generic type that contains the type parameters, you can use its object to reflect the constraints. Use the method to get the type parameters, and for each type parameter use the method to get the base type constraint and interface constraints, and the property to get the special constraints. + Interface constraints and special constraints cannot be retrieved using methods of the class. Once you have created the generic type that contains the type parameters, you can use its object to reflect the constraints. Use the method to get the type parameters, and for each type parameter use the method to get the base type constraint and interface constraints, and the property to get the special constraints. @@ -292,7 +292,7 @@ method. + To set the base type constraint, use the method. ]]> @@ -3327,7 +3327,7 @@ method provides a way to generate array types for parameter lists. + The method provides a way to generate array types for parameter lists. @@ -3395,7 +3395,7 @@ method provides a way to generate array types for parameter lists. + The method provides a way to generate array types for parameter lists. @@ -3456,7 +3456,7 @@ method provides a way to generate `ref` types (`ByRef` in Visual Basic) for parameter lists. + The method provides a way to generate `ref` types (`ByRef` in Visual Basic) for parameter lists. @@ -3578,7 +3578,7 @@ method provides a way to generate pointer types for parameter lists. + The method provides a way to generate pointer types for parameter lists. @@ -3871,7 +3871,7 @@ ## Remarks To retrieve the base type constraint use the property. - Once you have created the generic type that contains the type parameter, you can use its object to reflect the type parameter and their constraints. To get the type parameters of a completed generic type, use the method. For each type parameter, get the base type constraint and interface constraints by using the method, and get the special constraints by using the property. + Once you have created the generic type that contains the type parameter, you can use its object to reflect the type parameter and their constraints. To get the type parameters of a completed generic type, use the method. For each type parameter, get the base type constraint and interface constraints by using the method, and get the special constraints by using the property. @@ -4125,7 +4125,7 @@ For information on how to format `binaryAttribute`, see the metadata specificati ## Remarks Special constraints can specify that any type assigned to the generic type parameter must have a parameterless constructor, must be a reference type, or must be a value type. - Special constraints cannot be retrieved using methods of the class. Once you have created the generic type that contains the type parameter, you can use its object to reflect the type parameters and their constraints. To get the type parameters of a completed generic type, use the method. To get the special constraints for each type parameter, use the property. + Special constraints cannot be retrieved using methods of the class. Once you have created the generic type that contains the type parameter, you can use its object to reflect the type parameters and their constraints. To get the type parameters of a completed generic type, use the method. To get the special constraints for each type parameter, use the property. The enumeration values that refer to the variance characteristics of a type parameter are relevant only in languages that support covariance and contravariance, such as Microsoft intermediate language (MSIL). Visual Basic and C# currently do not support covariance and contravariance. @@ -4239,7 +4239,7 @@ For information on how to format `binaryAttribute`, see the metadata specificati class. Once you have created the generic type that contains the type parameter, you can use its object to reflect the type parameters and their constraints. To get the type parameters of a completed generic type, use the method. For each type parameter, get the base type constraint and interface constraints by using the method. + Interface constraints cannot be retrieved using methods of the class. Once you have created the generic type that contains the type parameter, you can use its object to reflect the type parameters and their constraints. To get the type parameters of a completed generic type, use the method. For each type parameter, get the base type constraint and interface constraints by using the method. diff --git a/xml/System.Reflection.Emit/ILGenerator.xml b/xml/System.Reflection.Emit/ILGenerator.xml index 88fa607d435..854f6da9615 100644 --- a/xml/System.Reflection.Emit/ILGenerator.xml +++ b/xml/System.Reflection.Emit/ILGenerator.xml @@ -80,7 +80,7 @@ is used to generate method bodies for methods and constructors in dynamic assemblies (represented by the and classes) and for standalone dynamic methods (represented by the class). To obtain an , use the , , and methods. + is used to generate method bodies for methods and constructors in dynamic assemblies (represented by the and classes) and for standalone dynamic methods (represented by the class). To obtain an , use the , , and methods. MSIL is used as input to a just-in-time (JIT) compiler. @@ -484,7 +484,7 @@ are scoped until the corresponding is called. + This method is used to emit symbolic information. Local variables declared after are scoped until the corresponding is called. If the current is associated with a object, it does not support symbolic information. @@ -595,7 +595,7 @@ ## Remarks The local variable is created in the current lexical scope; for example, if code is being emitted in a `for` loop (`For` loop in Visual Basic), the scope of the variable is the loop. - A local variable created with this overload is not pinned. To create a pinned variable for use with unmanaged pointers, use the method overload. + A local variable created with this overload is not pinned. To create a pinned variable for use with unmanaged pointers, use the method overload. @@ -729,7 +729,7 @@ . Failure to do so will cause an when is called. + To set the position of the label within the stream, you must call . Failure to do so will cause an when is called. This is just a token and does not yet represent any particular location within the stream. @@ -1243,7 +1243,7 @@ ## Remarks The instruction values are defined in the `OpCodes` enumeration. - Labels are created using , and their location within the stream is fixed by using . If a single-byte instruction is used, the label can represent a jump of at most 127 bytes along the stream. `opcode` must represent a branch instruction. Because branches are relative instructions, `label` will be replaced with the correct offset to branch during the fixup process. + Labels are created using , and their location within the stream is fixed by using . If a single-byte instruction is used, the label can represent a jump of at most 127 bytes along the stream. `opcode` must represent a branch instruction. Because branches are relative instructions, `label` will be replaced with the correct offset to branch during the fixup process. @@ -1313,7 +1313,7 @@ The instruction values are defined in the `OpCodes` enumeration. - Labels are created using and their location within the stream is fixed by using . If a single-byte instruction is used, the label can represent a jump of at most 127 bytes along the stream. `opcode` must represent a branch instruction. Because branches are relative instructions, `label` will be replaced with the correct offset to branch during the fixup process. + Labels are created using and their location within the stream is fixed by using . If a single-byte instruction is used, the label can represent a jump of at most 127 bytes along the stream. `opcode` must represent a branch instruction. Because branches are relative instructions, `label` will be replaced with the correct offset to branch during the fixup process. ## Examples The code sample below illustrates the creation of a dynamic method with a jump table. The jump table is built using an array of . @@ -1897,11 +1897,11 @@ Puts a or instruction onto the Microsoft intermediate language (MSIL) stream to call a method. method is used to emit calls to `varargs` methods because there is no overload of the method that specifies the parameter types of the variable arguments. +The method is used to emit calls to `varargs` methods because there is no overload of the method that specifies the parameter types of the variable arguments. -To emit calls to methods that do not use the calling convention, use the method overload. +To emit calls to methods that do not use the calling convention, use the method overload. -The method does not throw an exception when optional parameter types are specified for a method that is not `varargs`. is thrown when the call is executed. +The method does not throw an exception when optional parameter types are specified for a method that is not `varargs`. is thrown when the call is executed. ]]> @@ -1997,12 +1997,12 @@ The following code example emits two methods, a `varargs` method and a method th to put a instruction onto the stream. Do not use . + Use to put a instruction onto the stream. Do not use . ## Examples - The following code sample demonstrates the contextual usage of the method to call an unmanaged type method external to the dynamic class. + The following code sample demonstrates the contextual usage of the method to call an unmanaged type method external to the dynamic class. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ILGenerator/EmitCalli/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ILGenerator/EmitCalli/source.vb" id="Snippet1"::: @@ -2095,7 +2095,7 @@ The following code example emits two methods, a `varargs` method and a method th to put a instruction onto the stream. Do not use . + Use to put a instruction onto the stream. Do not use . If `optionalParameterTypes` specifies optional arguments, `callingConvention` must include the flag. @@ -2167,12 +2167,12 @@ The following code example emits two methods, a `varargs` method and a method th method. + The type of `localBuilder` must match the parameter type of an overload of the method. ## Examples - The code sample below demonstrates the contextual usage of the method to write a string to the console in a dynamic method. + The code sample below demonstrates the contextual usage of the method to write a string to the console in a dynamic method. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ILGenerator/EmitWriteLine/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ILGenerator/EmitWriteLine/source.vb" id="Snippet1"::: @@ -2240,12 +2240,12 @@ The following code example emits two methods, a `varargs` method and a method th method. + The type of `fld` must match the parameter type of an overload of the method. ## Examples - The following code sample demonstrates the use of the method to write a string to the console in a dynamic method. + The following code sample demonstrates the use of the method to write a string to the console in a dynamic method. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ILGenerator/EmitWriteLine/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ILGenerator/EmitWriteLine/source.vb" id="Snippet1"::: @@ -2429,7 +2429,7 @@ The following code example emits two methods, a `varargs` method and a method th . + This method is used to emit symbolic information. It is used with . If the current is associated with a object, it does not support symbolic information. diff --git a/xml/System.Reflection.Emit/Label.xml b/xml/System.Reflection.Emit/Label.xml index 957ed07f107..7a2447cf8c0 100644 --- a/xml/System.Reflection.Emit/Label.xml +++ b/xml/System.Reflection.Emit/Label.xml @@ -302,7 +302,7 @@ if is equal to ; otherwise, . - .]]> + .]]> @@ -352,7 +352,7 @@ if is not equal to ; otherwise, . - .]]> + .]]> diff --git a/xml/System.Reflection.Emit/LocalBuilder.xml b/xml/System.Reflection.Emit/LocalBuilder.xml index deef4340db5..a7aa98c9bb0 100644 --- a/xml/System.Reflection.Emit/LocalBuilder.xml +++ b/xml/System.Reflection.Emit/LocalBuilder.xml @@ -86,7 +86,7 @@ method. + A `LocalBuilder` object can be defined using the method. @@ -320,12 +320,12 @@ method is supported for methods defined in dynamic types. It is not supported for dynamic methods defined using the class. + The method is supported for methods defined in dynamic types. It is not supported for dynamic methods defined using the class. ## Examples - The following code sample illustrates the use of the method. This code is part of a larger example for the class. + The following code sample illustrates the use of the method. This code is part of a larger example for the class. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ILGenerator/DeclareLocal/localbuilder_sample_4.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ILGenerator/DeclareLocal/localbuilder_sample_4.vb" id="Snippet2"::: @@ -384,12 +384,12 @@ method is supported for methods defined in dynamic types. It is not supported for dynamic methods defined using the class. + The method is supported for methods defined in dynamic types. It is not supported for dynamic methods defined using the class. ## Examples - The following code sample illustrates the use of the method. This code is part of a larger example for the class. + The following code sample illustrates the use of the method. This code is part of a larger example for the class. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ILGenerator/DeclareLocal/localbuilder_sample_4.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ILGenerator/DeclareLocal/localbuilder_sample_4.vb" id="Snippet2"::: diff --git a/xml/System.Reflection.Emit/MethodBuilder.xml b/xml/System.Reflection.Emit/MethodBuilder.xml index 5d962a46414..4b4e19f548e 100644 --- a/xml/System.Reflection.Emit/MethodBuilder.xml +++ b/xml/System.Reflection.Emit/MethodBuilder.xml @@ -155,10 +155,10 @@ The following example uses the class can be called several times, with each call specifying a security action (such as `Demand`, `Assert`, and `Deny`) and a set of permissions that the action applies to. + can be called several times, with each call specifying a security action (such as `Demand`, `Assert`, and `Deny`) and a set of permissions that the action applies to. > [!NOTE] -> In the .NET Framework versions 1.0, 1.1, and 2.0, the declarative security attributes applied to a method by using the method are stored in the old XML metadata format. See Emitting Declarative Security Attributes. +> In the .NET Framework versions 1.0, 1.1, and 2.0, the declarative security attributes applied to a method by using the method are stored in the old XML metadata format. See Emitting Declarative Security Attributes. @@ -312,7 +312,7 @@ The following example uses the class ## Remarks A always represents a generic method definition, and thus cannot be invoked. - For more information, see and . For information on generic types, see . + For more information, see and . For information on generic types, see . ]]> @@ -496,13 +496,13 @@ The following example uses the class method makes the current method generic. There is no way to undo this change. Calling this method a second time causes an . + Calling the method makes the current method generic. There is no way to undo this change. Calling this method a second time causes an . - The type parameters of the generic method can be retrieved later by using the method. + The type parameters of the generic method can be retrieved later by using the method. By convention, a type parameter name is a single uppercase letter. - For more information, see and . For information on generic types, see . + For more information, see and . For information on generic types, see . @@ -969,9 +969,9 @@ The following example uses the class method that is used to define them. + The type parameters of a generic method also are returned by the method that is used to define them. - For more information, see and . For information on generic types, see . + For more information, see and . For information on generic types, see . ]]> @@ -1025,7 +1025,7 @@ The following example uses the class ## Remarks A cannot be used to emit a constructed generic method directly. The emitted method is a generic method definition. - For more information, see and . For information on generic types, see . + For more information, see and . For information on generic types, see . ]]> @@ -1681,12 +1681,12 @@ The following example uses the class method to add type parameters. This change cannot be reversed. + A method is generic if it has type parameters. You can make a method generic by calling the method to add type parameters. This change cannot be reversed. ## Examples - The following code example displays the status of a method. This code is part of a larger example provided for the method. + The following code example displays the status of a method. This code is part of a larger example provided for the method. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/MethodBuilder/DefineGenericParameters/source.cs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/MethodBuilder/DefineGenericParameters/source.vb" id="Snippet7"::: @@ -1744,7 +1744,7 @@ The following example uses the class ## Examples - The following code example displays the status of a method. This code is part of a larger example provided for the method. + The following code example displays the status of a method. This code is part of a larger example provided for the method. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/MethodBuilder/DefineGenericParameters/source.cs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/MethodBuilder/DefineGenericParameters/source.vb" id="Snippet7"::: @@ -1791,7 +1791,7 @@ The following example uses the class , call the method on the completed type, and get the property on the resulting . + To determine whether a method in a dynamic assembly is security-critical, complete the type by calling , call the method on the completed type, and get the property on the resulting . ]]> @@ -1835,7 +1835,7 @@ The following example uses the class , call the method on the completed type, and get the property on the resulting . + To determine whether a method in a dynamic assembly is security-safe-critical, complete the type by calling , call the method on the completed type, and get the property on the resulting . ]]> @@ -1879,7 +1879,7 @@ The following example uses the class , call the method on the completed type, and get the property on the resulting . + To determine whether a method in a dynamic assembly is security-transparent, complete the type by calling , call the method on the completed type, and get the property on the resulting . ]]> @@ -1949,17 +1949,17 @@ The following example uses the class , before the enclosing type has been completed. You can use the method to create a for such a constructed method, and use the in the emitted call. + When you are emitting dynamic code, you might need to emit a call to a method constructed from the generic method definition represented by a , before the enclosing type has been completed. You can use the method to create a for such a constructed method, and use the in the emitted call. ## Examples The following code example creates a constructed method from an incomplete generic method definition in an incomplete type. - The example creates a transient assembly and module with a single type, adds a method `M`, and makes the method generic by adding a type parameter T using the method. The type parameter is used as the type of the method's parameter, and also as its return type. The generic method definition is not given a body, and the enclosing type is not completed. The method is then used to make the constructed method `M` (`M(Of String)` in Visual Basic). The example code has no output, because the subclass of returned by the method does not allow reflection over its parameters. + The example creates a transient assembly and module with a single type, adds a method `M`, and makes the method generic by adding a type parameter T using the method. The type parameter is used as the type of the method's parameter, and also as its return type. The generic method definition is not given a body, and the enclosing type is not completed. The method is then used to make the constructed method `M` (`M(Of String)` in Visual Basic). The example code has no output, because the subclass of returned by the method does not allow reflection over its parameters. > [!NOTE] -> For another code example that uses , see . is also used extensively when emitting code that uses generic types. See [How to: Define a Generic Method with Reflection Emit](/dotnet/framework/reflection-and-codedom/how-to-define-a-generic-method-with-reflection-emit). +> For another code example that uses , see . is also used extensively when emitting code that uses generic types. See [How to: Define a Generic Method with Reflection Emit](/dotnet/framework/reflection-and-codedom/how-to-define-a-generic-method-with-reflection-emit). :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/MethodBuilder/MakeGenericMethod/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/MethodBuilder/MakeGenericMethod/source.vb" id="Snippet1"::: @@ -2120,7 +2120,7 @@ The following example uses the class ## Remarks This property is provided as a convenience. It is equivalent to using the property to get the type in which the method is being declared, and then calling the property of the resulting object. - This property is also equivalent to calling . + This property is also equivalent to calling . ]]> @@ -2311,7 +2311,7 @@ The following example uses the class ## Remarks > [!NOTE] -> This member is inherited from the base class, . See . +> This member is inherited from the base class, . See . ]]> @@ -2359,7 +2359,7 @@ The following example uses the class after the containing has been created and invoked on the . + This method always returns `null`. Get the after the containing has been created and invoked on the . ]]> @@ -2427,7 +2427,7 @@ The following example uses the class method can interact with the method when the two methods are used in combination. See the Remarks section of the method for details. + The method can interact with the method when the two methods are used in combination. See the Remarks section of the method for details. ]]> @@ -2497,7 +2497,7 @@ The following example uses the class For information on how to format `binaryAttribute`, see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) specification](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). - The method can interact with the method when the two methods are used in combination. See the Remarks section of the method for details. + The method can interact with the method when the two methods are used in combination. See the Remarks section of the method for details. ]]> @@ -2597,11 +2597,11 @@ For information on how to format `binaryAttribute`, see the metadata specificati method in combination with the method, be aware of potential interactions. For example, using the method to add the attribute also sets the flag. If you subsequently call the method, the flag is overwritten. There are two ways to avoid this: + When you use the method in combination with the method, be aware of potential interactions. For example, using the method to add the attribute also sets the flag. If you subsequently call the method, the flag is overwritten. There are two ways to avoid this: -- Call the method before you call the method. The method always respects existing method implementation flags. +- Call the method before you call the method. The method always respects existing method implementation flags. -- When you set implementation flags, call the method to retrieve the existing flags, use bitwise OR to add your flag, and then call the method. +- When you set implementation flags, call the method to retrieve the existing flags, use bitwise OR to add your flag, and then call the method. @@ -2811,18 +2811,18 @@ For information on how to format `binaryAttribute`, see the metadata specificati method that accepts an array of parameter types. However, a generic method can have parameters whose types are specified by one or more of its own generic type parameters, which cannot be defined until after the method has been defined. Use this method to set the parameter types in that case. + If the number and types of the parameters are known when the method is defined, they can be set using any overload of the method that accepts an array of parameter types. However, a generic method can have parameters whose types are specified by one or more of its own generic type parameters, which cannot be defined until after the method has been defined. Use this method to set the parameter types in that case. - If the return type has optional or required custom modifiers, such as , use the method overload. + If the return type has optional or required custom modifiers, such as , use the method overload. - Calling this method replaces any parameter types that were set using the method. + Calling this method replaces any parameter types that were set using the method. ## Examples - The following code example uses the method to make a method generic. The method is used to give the method one parameter, whose type will be specified by the first generic type parameter. The method is used to give the method a return type, specified by the second generic type parameter. + The following code example uses the method to make a method generic. The method is used to give the method one parameter, whose type will be specified by the first generic type parameter. The method is used to give the method a return type, specified by the second generic type parameter. - This code is part of a larger example provided for the method. + This code is part of a larger example provided for the method. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/MethodBuilder/DefineGenericParameters/source.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/MethodBuilder/DefineGenericParameters/source.vb" id="Snippet3"::: @@ -2888,16 +2888,16 @@ For information on how to format `binaryAttribute`, see the metadata specificati , use the method overload. + Use this method to set the return type of a generic method, when the return type is specified by one of the generic type parameters of the method. If the return type has optional or required custom modifiers, such as , use the method overload. - Calling this method replaces a return type established using the method. + Calling this method replaces a return type established using the method. ## Examples - The following code example uses the method to make a method generic. The method is used to give the method one parameter, whose type will be specified by the first generic type parameter. The method is used to give the method a return type, specified by the second generic type parameter. + The following code example uses the method to make a method generic. The method is used to give the method one parameter, whose type will be specified by the first generic type parameter. The method is used to give the method a return type, specified by the second generic type parameter. - This code is part of a larger example provided for the method. + This code is part of a larger example provided for the method. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/MethodBuilder/DefineGenericParameters/source.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/MethodBuilder/DefineGenericParameters/source.vb" id="Snippet3"::: @@ -3008,18 +3008,18 @@ For information on how to format `binaryAttribute`, see the metadata specificati method that accepts an array of parameter types. However, a generic method can have parameters whose types are specified by one or more of its own generic type parameters, which cannot be defined until after the method has been defined. Use this method to set the parameter types in that case. + If the return type and the number and types of the parameters are known when the method is defined, they can be established using any overload of the method that accepts an array of parameter types. However, a generic method can have parameters whose types are specified by one or more of its own generic type parameters, which cannot be defined until after the method has been defined. Use this method to set the parameter types in that case. - If neither the return type nor the parameter types have optional or required custom modifiers, such as , you can use the and methods. + If neither the return type nor the parameter types have optional or required custom modifiers, such as , you can use the and methods. - Calling this method replaces the parameters and return type established using the method. + Calling this method replaces the parameters and return type established using the method. ## Examples The following code example contains source code for a generic class named Sample that has a type parameter `T`. The class has a field named `Field`, of type `T`, and a generic method `GM` with its own type parameter, `U`. Method `GM` creates an instance of Sample, substituting its own type parameter `U` for the type parameter of Sample, and stores its input parameter in `Field`. This source code is compiled but not used; you can view it with the [Ildasm.exe (IL Disassembler)](/dotnet/framework/tools/ildasm-exe-il-disassembler), and compare it to the code emitted by class `Example`. - The code in class `Example` demonstrates the use of the method in emitting generic code. The `Main` method of class `Example` creates a dynamic assembly containing a class named `Sample`, and uses the method to make it generic by adding a type parameter named `T`. A parameterless constructor and a field named `Field`, of type `T`, are added to class `Sample`. A method `GM` is added, and turned into a generic method using the method. The type parameter of `GM` is named `U`. Once the type parameter is defined, the signature of `GM` is added, using the method. There is no return type, and no required or custom modifiers, so all the parameters of this method are `null` except `parameterTypes`, which sets the type of the only parameter of the method; this is set to the method's type parameter, `U`. The body of the method creates an instance of the constructed type `Sample` (`Sample(Of U)` in Visual Basic), assigns the method's parameter to `Field`, and then prints the value of `Field`. A dummy type is defined, to hold the entry point method `Main`. In the body of `Main`, the static `GM` method is invoked on the constructed generic type `Sample` (`Sample(Of Integer)` in Visual Basic), with type substituted for `U`. The method is used to create a for the static `GM` method of the constructed generic type `Sample`, and the method is then used to create a that can emitted in a method call. + The code in class `Example` demonstrates the use of the method in emitting generic code. The `Main` method of class `Example` creates a dynamic assembly containing a class named `Sample`, and uses the method to make it generic by adding a type parameter named `T`. A parameterless constructor and a field named `Field`, of type `T`, are added to class `Sample`. A method `GM` is added, and turned into a generic method using the method. The type parameter of `GM` is named `U`. Once the type parameter is defined, the signature of `GM` is added, using the method. There is no return type, and no required or custom modifiers, so all the parameters of this method are `null` except `parameterTypes`, which sets the type of the only parameter of the method; this is set to the method's type parameter, `U`. The body of the method creates an instance of the constructed type `Sample` (`Sample(Of U)` in Visual Basic), assigns the method's parameter to `Field`, and then prints the value of `Field`. A dummy type is defined, to hold the entry point method `Main`. In the body of `Main`, the static `GM` method is invoked on the constructed generic type `Sample` (`Sample(Of Integer)` in Visual Basic), with type substituted for `U`. The method is used to create a for the static `GM` method of the constructed generic type `Sample`, and the method is then used to create a that can emitted in a method call. When the code example is run, it saves the emitted assembly as TypeBuilderGetFieldExample.exe. You can run TypeBuilderGetFieldExample.exe, and you can use the [Ildasm.exe (IL Disassembler)](/dotnet/framework/tools/ildasm-exe-il-disassembler) to compare the emitted code with the code for the `Sample` class that is compiled into the code example itself. diff --git a/xml/System.Reflection.Emit/MethodToken.xml b/xml/System.Reflection.Emit/MethodToken.xml index a26d2936927..c9ecec68940 100644 --- a/xml/System.Reflection.Emit/MethodToken.xml +++ b/xml/System.Reflection.Emit/MethodToken.xml @@ -194,7 +194,7 @@ if is equal to ; otherwise, . - .]]> + .]]> @@ -229,7 +229,7 @@ if is not equal to ; otherwise, . - .]]> + .]]> diff --git a/xml/System.Reflection.Emit/ModuleBuilder.xml b/xml/System.Reflection.Emit/ModuleBuilder.xml index d1f31c354c9..55d289100f1 100644 --- a/xml/System.Reflection.Emit/ModuleBuilder.xml +++ b/xml/System.Reflection.Emit/ModuleBuilder.xml @@ -80,12 +80,12 @@ , use the method. + To get an instance of , use the method. ## Examples - The following code sample demonstrates the use of `ModuleBuilder` to create a dynamic module. Note that the ModuleBuilder is created by calling in , rather than through a constructor. + The following code sample demonstrates the use of `ModuleBuilder` to create a dynamic module. Note that the ModuleBuilder is created by calling in , rather than through a constructor. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ModuleBuilder/Overview/modulebuilder.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ModuleBuilder/Overview/modulebuilder.vb" id="Snippet1"::: @@ -214,7 +214,7 @@ This method should be called when the user is done with defining all the global functions within this dynamic module. After calling this function, no more new global functions or new global data are allowed. ## Examples - The following sample illustrates the use of `CreateGlobalFunctions` to create a static global method from a implemented with . + The following sample illustrates the use of `CreateGlobalFunctions` to create a static global method from a implemented with . :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ModuleBuilder/CreateGlobalFunctions/modulebuilder_createglobalfunctions.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ModuleBuilder/CreateGlobalFunctions/modulebuilder_createglobalfunctions.vb" id="Snippet2"::: @@ -590,10 +590,10 @@ . + The global method that this method defines is not usable until you call . ## Examples - The following example illustrates the use of `DefineGlobalMethod` to create a type-independent method tied to the current . After building the global method, must be called in order to complete it. + The following example illustrates the use of `DefineGlobalMethod` to create a type-independent method tied to the current . After building the global method, must be called in order to complete it. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ModuleBuilder/CreateGlobalFunctions/modulebuilder_createglobalfunctions.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ModuleBuilder/CreateGlobalFunctions/modulebuilder_createglobalfunctions.vb" id="Snippet1"::: @@ -685,10 +685,10 @@ . + You cannot use the global method that this method defines until you call . ## Examples - The following code sample illustrates the use of `DefineGlobalMethod` to create a type-independent method tied to the current . After building the global method, must be called in order to complete it. + The following code sample illustrates the use of `DefineGlobalMethod` to create a type-independent method tied to the current . After building the global method, must be called in order to complete it. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ModuleBuilder/CreateGlobalFunctions/modulebuilder_createglobalfunctions.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ModuleBuilder/CreateGlobalFunctions/modulebuilder_createglobalfunctions.vb" id="Snippet1"::: @@ -813,7 +813,7 @@ ## Remarks This overload is provided for designers of managed compilers. - You cannot use the global method that this method defines until you call . ]]> + You cannot use the global method that this method defines until you call . ]]> The method is not static. That is, does not include . @@ -973,10 +973,10 @@ ## Remarks is automatically included in `attributes`. - The data defined by this method is not created until the method is called. + The data defined by this method is not created until the method is called. ## Examples - The following example uses the method to define an initialized data field in the `.sdata` section of the portable executable (PE) file. + The following example uses the method to define an initialized data field in the `.sdata` section of the portable executable (PE) file. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ModuleBuilder/DefineInitializedData/modulebuilder_defineinitializeddata.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ModuleBuilder/DefineInitializedData/modulebuilder_defineinitializeddata.vb" id="Snippet1"::: @@ -1069,18 +1069,18 @@ - This method allows you to embed a manifest resource BLOB into a dynamic assembly. -- To embed a managed resource into the manifest module of a dynamic assembly or into a satellite module, use the method to get a resource writer, and use the method to add the resource. +- To embed a managed resource into the manifest module of a dynamic assembly or into a satellite module, use the method to get a resource writer, and use the method to add the resource. -- To link a managed resource into a dynamic assembly, use the method to get a resource writer, and use the method to add the linked resource. +- To link a managed resource into a dynamic assembly, use the method to get a resource writer, and use the method to add the linked resource. -- To link a manifest resource BLOB into a dynamic assembly, use the method to add the linked resource. +- To link a manifest resource BLOB into a dynamic assembly, use the method to add the linked resource. - In addition, a single Win32 resource can be attached to an assembly by using the method or the method. This resource does not appear in the assembly manifest. + In addition, a single Win32 resource can be attached to an assembly by using the method or the method. This resource does not appear in the assembly manifest. ## Examples - The following example generates and saves a dynamic assembly named `EmittedManifestResourceAssembly.exe`, which contains an embedded unmanaged resource. The example creates the assembly, which consists of one module, and opens a memory stream to contain the unmanaged resource. The code then calls the method to define the resource. + The following example generates and saves a dynamic assembly named `EmittedManifestResourceAssembly.exe`, which contains an embedded unmanaged resource. The example creates the assembly, which consists of one module, and opens a memory stream to contain the unmanaged resource. The code then calls the method to define the resource. > [!NOTE] > You can use any kind of stream for your resource; for example, you can read the unmanaged binary data from a file. @@ -1211,7 +1211,7 @@ The following example illustrates the use of the `DefinePInvokeMethod` method to create a for an external unmanaged method, `MessageBoxA`, in the Windows API. The example displays a message box with **Retry** and **Cancel** buttons, and displays the return value from the message box. > [!IMPORTANT] -> To get a non-zero return value, you must add to the method implementation flags after you create the , by using the and methods. +> To get a non-zero return value, you must add to the method implementation flags after you create the , by using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ModuleBuilder/DefinePInvokeMethod/modulebuilder_definepinvokemethod1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ModuleBuilder/DefinePInvokeMethod/modulebuilder_definepinvokemethod1.vb" id="Snippet1"::: @@ -1324,9 +1324,9 @@ The following example illustrates the use of the `DefinePInvokeMethod` method to create a for an external unmanaged method, `MessageBoxA`, in the Windows API. The example displays a message box with **Retry** and **Cancel** buttons, and displays the return value from the message box. > [!IMPORTANT] -> To get a non-zero return value, you must add to the method implementation flags after you create the , by using the and methods. +> To get a non-zero return value, you must add to the method implementation flags after you create the , by using the and methods. - This example uses a different overload of the method, but the technique is the same. + This example uses a different overload of the method, but the technique is the same. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ModuleBuilder/DefinePInvokeMethod/modulebuilder_definepinvokemethod1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ModuleBuilder/DefinePInvokeMethod/modulebuilder_definepinvokemethod1.vb" id="Snippet1"::: @@ -1454,7 +1454,7 @@ ## Remarks The caller must not call the `ResourceWriter.Generate()` and `ResourceWriter.Close()` methods, because these methods are called by `ModuleBuilder.Save` when the dynamic assembly is written to disk. - Use this method to embed a managed resource. To embed a manifest resource blob, use the method. For a summary of embedding and linking managed resources and manifest resource blobs, see the method. + Use this method to embed a managed resource. To embed a manifest resource blob, use the method. For a summary of embedding and linking managed resources and manifest resource blobs, see the method. ## Examples The following example illustrates the use of `DefineResource` to add an external resource to the current . @@ -1515,7 +1515,7 @@ ## Remarks The caller must not call the `ResourceWriter.Generate()` and `ResourceWriter.Close()` methods, because these methods are called by `ModuleBuilder.Save` when the dynamic assembly is written to disk. - Use this method to embed a managed resource. To embed a manifest resource blob, use the method. For a summary of embedding and linking managed resources and manifest resource blobs, see the method. + Use this method to embed a managed resource. To embed a manifest resource blob, use the method. For a summary of embedding and linking managed resources and manifest resource blobs, see the method. ## Examples The following example illustrates the use of DefineResource to add an external resource to the current . @@ -2271,7 +2271,7 @@ ## Remarks is automatically included in `attributes`. - The data defined by this method is not created until the method is called. ]]> + The data defined by this method is not created until the method is called. ]]> The length of is zero. @@ -2614,7 +2614,7 @@ ## Examples - The following example demonstrates how to use to obtain the corresponding to a method that returns an array value. + The following example demonstrates how to use to obtain the corresponding to a method that returns an array value. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ModuleBuilder/GetArrayMethod/modulebuilder_getarraymethod.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ModuleBuilder/GetArrayMethod/modulebuilder_getarraymethod.vb" id="Snippet1"::: @@ -2729,12 +2729,12 @@ , except that it returns the token of the array method instead of the method itself. + This method is similar to , except that it returns the token of the array method instead of the method itself. ## Examples - The following example demonstrates how to use to obtain the corresponding to a method that returns an array value. + The following example demonstrates how to use to obtain the corresponding to a method that returns an array value. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/ModuleBuilder/GetArrayMethod/modulebuilder_getarraymethod.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/ModuleBuilder/GetArrayMethod/modulebuilder_getarraymethod.vb" id="Snippet2"::: @@ -2985,7 +2985,7 @@ and cannot be used in such cases, because they create instances of the attributes. Code in the reflection-only context cannot be executed. For more information and for example code, see the class. + Use this method to examine the custom attributes of code in the reflection-only context, in cases where the custom attributes themselves are defined in code that is loaded into the reflection-only context. Methods like and cannot be used in such cases, because they create instances of the attributes. Code in the reflection-only context cannot be executed. For more information and for example code, see the class. ]]> @@ -3048,10 +3048,10 @@ or methods. + When you emit dynamic assemblies, fields in the .sdata region of the portable executable (PE) file are defined by using the or methods. > [!IMPORTANT] -> Module-level fields cannot be retrieved until after the method has been called for the module. +> Module-level fields cannot be retrieved until after the method has been called for the module. ]]> @@ -3137,10 +3137,10 @@ or methods. + When you emit dynamic assemblies, fields in the .sdata region of the portable executable (PE) file are defined by using the or methods. > [!IMPORTANT] -> Module-level fields cannot be retrieved until after the method has been called for the module. +> Module-level fields cannot be retrieved until after the method has been called for the module. ]]> @@ -3299,10 +3299,10 @@ method. Use the inherited method to get methods that have been declared at the module level. Module-level methods are defined in emitted code by using the method. + This method provides the implementation for all overloads of the inherited method. Use the inherited method to get methods that have been declared at the module level. Module-level methods are defined in emitted code by using the method. > [!IMPORTANT] -> Module-level methods cannot be retrieved until after the method has been called for the module. +> Module-level methods cannot be retrieved until after the method has been called for the module. ]]> @@ -3423,10 +3423,10 @@ method. + Module-level methods are defined in emitted code by using the method. > [!IMPORTANT] -> Module-level methods cannot be retrieved until after the method has been called for the module. +> Module-level methods cannot be retrieved until after the method has been called for the module. ]]> @@ -3933,7 +3933,7 @@ , , and methods instead. ]]> + Do not use this method to generate array types, pointer types, or byref types. Use the , , and methods instead. ]]> Length of is zero or is greater than 1023. @@ -4010,7 +4010,7 @@ , , and methods instead. ]]> + Do not use this method to generate array types, pointer types, or byref types. Use the , , and methods instead. ]]> Length of is zero or is greater than 1023. @@ -4091,7 +4091,7 @@ ## Remarks The `throwOnError` parameter only affects what happens when the type is not found. It does not affect any other exceptions that might be thrown. In particular, if the type is found but cannot be loaded, can be thrown even if `throwOnError` is `false`. - Do not use this method to generate array types, pointer types, or byref types. Use the , , and methods instead. ]]> + Do not use this method to generate array types, pointer types, or byref types. Use the , , and methods instead. ]]> Length of is zero or is greater than 1023. @@ -4683,12 +4683,12 @@ method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. It is always safe to provide these arguments, even when they are not needed. + Use the method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. It is always safe to provide these arguments, even when they are not needed. > [!NOTE] > Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). - For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. + For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. ]]> @@ -4769,12 +4769,12 @@ method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. It is always safe to provide these arguments, even when they are not needed. + Use the method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. It is always safe to provide these arguments, even when they are not needed. > [!NOTE] > Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). - For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. + For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. ]]> @@ -4859,12 +4859,12 @@ method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericMethodArguments`. It is always safe to provide these arguments, even when they are not needed. + Use the method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericMethodArguments`. It is always safe to provide these arguments, even when they are not needed. > [!NOTE] > Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). - For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. + For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. ]]> @@ -5065,12 +5065,12 @@ method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. It is always safe to provide these arguments, even when they are not needed. + Use the method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. It is always safe to provide these arguments, even when they are not needed. > [!NOTE] > Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). - For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. + For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. ]]> diff --git a/xml/System.Reflection.Emit/OpCode.xml b/xml/System.Reflection.Emit/OpCode.xml index 8fbdffd1e08..ca675b4b04f 100644 --- a/xml/System.Reflection.Emit/OpCode.xml +++ b/xml/System.Reflection.Emit/OpCode.xml @@ -412,7 +412,7 @@ if is equal to ; otherwise, . - .]]> + .]]> @@ -463,7 +463,7 @@ if is not equal to ; otherwise, . - .]]> + .]]> diff --git a/xml/System.Reflection.Emit/OpCodes.xml b/xml/System.Reflection.Emit/OpCodes.xml index bad01e1e99a..325dd35620d 100644 --- a/xml/System.Reflection.Emit/OpCodes.xml +++ b/xml/System.Reflection.Emit/OpCodes.xml @@ -153,9 +153,9 @@ |add|`*`|`int32`|`*`| |add|`*`|`native int`|`*`| - The following method overload can use the `add` opcode: + The following method overload can use the `add` opcode: -- +- ]]> @@ -243,9 +243,9 @@ |add|`*`|`int32`|`*`| |add|`*`|`native int`|`*`| - The following method overload can use the `add.ovf` opcode: + The following method overload can use the `add.ovf` opcode: -- +- ]]> @@ -333,9 +333,9 @@ |add|`*`|`int32`|`*`| |add|`*`|`native int`|`*`| - The following method overload can use the `add.ovf.un` opcode: + The following method overload can use the `add.ovf.un` opcode: -- +- ]]> @@ -404,9 +404,9 @@ `And` is an integer-specific operation. - The following method overload can use the `and` opcode: + The following method overload can use the `and` opcode: -- +- ]]> @@ -465,9 +465,9 @@ The `arglist` instruction returns an opaque handle (an unmanaged pointer, of type `native int`) that represents the argument list of the current method. This handle is valid only during the lifetime of the current method. You can, however, pass the handle to other methods as long as the current method is on the thread of control. You can only execute the `arglist` instruction within a method that takes a variable number of arguments. - The following method overload can use the `arglist` opcode: + The following method overload can use the `arglist` opcode: -- +- ]]> @@ -538,9 +538,9 @@ Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction (such transfers are severely restricted and must use the instruction instead). - The following method overload can use the `beq` opcode: + The following method overload can use the `beq` opcode: -- +- ]]> @@ -611,9 +611,9 @@ Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction (such transfers are severely restricted and must use the instruction instead). - The following method overload can use the `beq.s` opcode: + The following method overload can use the `beq.s` opcode: -- +- ]]> @@ -680,9 +680,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `bge` opcode: + The following method overload can use the `bge` opcode: -- +- ]]> @@ -749,9 +749,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `bge.s` opcode: + The following method overload can use the `bge.s` opcode: -- +- ]]> @@ -818,9 +818,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `bge.un` opcode: + The following method overload can use the `bge.un` opcode: -- +- ]]> @@ -887,9 +887,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `bge.un.s` opcode: + The following method overload can use the `bge.un.s` opcode: -- +- ]]> @@ -956,9 +956,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `bgt` opcode: + The following method overload can use the `bgt` opcode: -- +- ]]> @@ -1025,9 +1025,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `bgt.s` opcode: + The following method overload can use the `bgt.s` opcode: -- +- ]]> @@ -1094,9 +1094,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `bgt.un` opcode: + The following method overload can use the `bgt.un` opcode: -- +- ]]> @@ -1163,9 +1163,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `bgt.un.s` opcode: + The following method overload can use the `bgt.un.s` opcode: -- +- ]]> @@ -1232,9 +1232,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `ble` opcode: + The following method overload can use the `ble` opcode: -- +- ]]> @@ -1301,9 +1301,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `ble.s` opcode: + The following method overload can use the `ble.s` opcode: -- +- ]]> @@ -1370,9 +1370,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `ble.un` opcode: + The following method overload can use the `ble.un` opcode: -- +- ]]> @@ -1439,9 +1439,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `ble.un.s` opcode: + The following method overload can use the `ble.un.s` opcode: -- +- ]]> @@ -1508,9 +1508,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `blt` opcode: + The following method overload can use the `blt` opcode: -- +- ]]> @@ -1577,9 +1577,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `blt.s` opcode: + The following method overload can use the `blt.s` opcode: -- +- ]]> @@ -1646,9 +1646,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `blt.un` opcode: + The following method overload can use the `blt.un` opcode: -- +- ]]> @@ -1715,9 +1715,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `blt.un.s` opcode: + The following method overload can use the `blt.un.s` opcode: -- +- ]]> @@ -1784,9 +1784,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `bne.un` opcode: + The following method overload can use the `bne.un` opcode: -- +- ]]> @@ -1853,9 +1853,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `bne.un.s` opcode: + The following method overload can use the `bne.un.s` opcode: -- +- ]]> @@ -1930,9 +1930,9 @@ is thrown if the class cannot be found. This is typically detected when Microsoft Intermediate Language (MSIL) is converted to native code, rather than at runtime. - The following method overload can use the `box` opcode: + The following method overload can use the `box` opcode: -- +- ]]> @@ -1993,9 +1993,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `br` opcode: + The following method overload can use the `br` opcode: -- +- ]]> @@ -2056,9 +2056,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `br.s` opcode: + The following method overload can use the `br.s` opcode: -- +- ]]> @@ -2121,9 +2121,9 @@ The `break` instruction can trap to a debugger, do nothing, or raise a security exception. The exact behavior is implementation-defined. - The following method overload can use the `break` opcode: + The following method overload can use the `break` opcode: -- +- ]]> @@ -2190,9 +2190,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `brfalse` opcode: + The following method overload can use the `brfalse` opcode: -- +- ]]> @@ -2259,9 +2259,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `brfalse.s` opcode: + The following method overload can use the `brfalse.s` opcode: -- +- ]]> @@ -2330,9 +2330,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `brtrue` opcode: + The following method overload can use the `brtrue` opcode: -- +- ]]> @@ -2401,9 +2401,9 @@ If the target instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. - The following method overload can use the `brtrue.s` opcode: + The following method overload can use the `brtrue.s` opcode: -- +- ]]> @@ -2481,16 +2481,16 @@ > [!NOTE] > When calling methods of System.Object on value types, consider using the `constrained` prefix with the `callvirt` instruction instead of emitting a `call` instruction. This removes the need to emit different IL depending on whether or not the value type overrides the method, avoiding a potential versioning problem. Consider using the `constrained` prefix when invoking interface methods on value types, since the value type method implementing the interface method can be changed using a `MethodImpl`. These issues are described in more detail in the opcode. - The following method overloads can use the `call` opcode: + The following method overloads can use the `call` opcode: -- +- -- +- -- +- > [!NOTE] -> The method is provided for `varargs` calls. Use the method for normal calls. +> The method is provided for `varargs` calls. Use the method for normal calls. ]]> @@ -2565,11 +2565,11 @@ may be thrown if the system security does not grant the caller access to the called method. The security check can occur when the Microsoft Intermediate Language (MSIL) instructions are converted to native code rather than at runtime. - The following methods can be used to perform a `calli` instruction on the stack. Note that `calli` should be called through the below methods rather than using the class to place the instruction directly on the stack. + The following methods can be used to perform a `calli` instruction on the stack. Note that `calli` should be called through the below methods rather than using the class to place the instruction directly on the stack. -- for calls using a managed calling convention. +- for calls using a managed calling convention. -- for calls using an unmanaged calling convention. +- for calls using an unmanaged calling convention. ]]> @@ -2653,11 +2653,11 @@ > [!NOTE] > When calling methods of System.Object on value types, consider using the `constrained` prefix with the `callvirt` instruction. This removes the need to emit different IL depending on whether or not the value type overrides the method, avoiding a potential versioning problem. Consider using the `constrained` prefix when invoking interface methods on value types, since the value type method implementing the interface method can be changed using a `MethodImpl`. These issues are described in more detail in the opcode. - The following method overload can use the `callvirt` opcode: + The following method overload can use the `callvirt` opcode: -- +- -- +- ]]> @@ -2732,9 +2732,9 @@ is thrown if class cannot be found. This is typically detected when a Microsoft Intermediate Language (MSIL) instruction is converted to native code rather than at runtime. - The following method overload can use the `castclass` opcode: + The following method overload can use the `castclass` opcode: -- +- ]]> @@ -2803,9 +2803,9 @@ For floating-point number, `ceq` will return 0 if the numbers are unordered (either or both are NaN). The infinite values are equal to themselves. - The following method overload can use the `ceq` opcode: + The following method overload can use the `ceq` opcode: -- +- ]]> @@ -2874,9 +2874,9 @@ - For floating-point numbers, `cgt` returns 0 if the numbers are unordered (that is, if one or both of the arguments are NaN). - The following method overload can use the `cgt` opcode: + The following method overload can use the `cgt` opcode: -- +- ]]> @@ -2949,9 +2949,9 @@ Otherwise an `int32` value of 0 is pushed on the stack. - The following method overload can use the `cgt.un` opcode: + The following method overload can use the `cgt.un` opcode: -- +- ]]> @@ -3020,9 +3020,9 @@ Note that a special exception or a derived class of may be more appropriate, passing the incorrect value to the exception handler. - The following method overload can use the `ckfinite` opcode: + The following method overload can use the `ckfinite` opcode: -- +- ]]> @@ -3091,9 +3091,9 @@ - For floating-point numbers, `clt` returns 0 if the numbers are unordered (that is, if one or both of the arguments are NaN). - The following method overload can use the `clt` opcode: + The following method overload can use the `clt` opcode: -- +- ]]> @@ -3168,9 +3168,9 @@ Otherwise, an `int32` value of 0 is pushed on the stack. - The following method overload can use the `clt.un` opcode: + The following method overload can use the `clt.un` opcode: -- +- ]]> @@ -3252,9 +3252,9 @@ The `constrained` prefix can also be used for invocation of interface methods on value types, because the value type method implementing the interface method can be changed using a `MethodImpl`. If the `constrained` prefix is not used, the compiler is forced to choose which of the value type's methods to bind to at compile time. Using the `constrained` prefix allows the MSIL to bind to the method that implements the interface method at run time, rather than at compile time. - The following method overload can use the `constrained` opcode: + The following method overload can use the `constrained` opcode: -- +- ]]> @@ -3325,9 +3325,9 @@ No exceptions are ever thrown when using this field. See and for equivalent instructions that will throw an exception when the result type can not properly represent the result value. - The following method overload can use the `conv.i` opcode: + The following method overload can use the `conv.i` opcode: -- +- ]]> @@ -3398,9 +3398,9 @@ No exceptions are ever thrown when using this field. See and for equivalent instructions that will throw an exception when the result type can not properly represent the result value. - The following method overload can use the `conv.i1` opcode: + The following method overload can use the `conv.i1` opcode: -- +- ]]> @@ -3471,9 +3471,9 @@ No exceptions are ever thrown when using this field. See and for equivalent instructions that will throw an exception when the result type can not properly represent the result value. - The following method overload can use the `conv.i2` opcode: + The following method overload can use the `conv.i2` opcode: -- +- ]]> @@ -3544,9 +3544,9 @@ No exceptions are ever thrown when using this field. See and for equivalent instructions that will throw an exception when the result type can not properly represent the result value. - The following method overload can use the `conv.i4` opcode: + The following method overload can use the `conv.i4` opcode: -- +- ]]> @@ -3617,9 +3617,9 @@ No exceptions are ever thrown when using this field. See and for equivalent instructions that will throw an exception when the result type can not properly represent the result value. - The following method overload can use the `conv.i8` opcode: + The following method overload can use the `conv.i8` opcode: -- +- ]]> @@ -3688,9 +3688,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.i` opcode: + The following method overload can use the `conv.ovf.i` opcode: -- +- ]]> @@ -3759,9 +3759,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.i.un` opcode: + The following method overload can use the `conv.ovf.i.un` opcode: -- +- ]]> @@ -3830,9 +3830,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.i1` opcode: + The following method overload can use the `conv.ovf.i1` opcode: -- +- ]]> @@ -3901,9 +3901,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.i1.un` opcode: + The following method overload can use the `conv.ovf.i1.un` opcode: -- +- ]]> @@ -3972,9 +3972,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.i2` opcode: + The following method overload can use the `conv.ovf.i2` opcode: -- +- ]]> @@ -4043,9 +4043,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.i2.un` opcode: + The following method overload can use the `conv.ovf.i2.un` opcode: -- +- ]]> @@ -4114,9 +4114,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.i4` opcode: + The following method overload can use the `conv.ovf.i4` opcode: -- +- ]]> @@ -4185,9 +4185,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.i4.un` opcode: + The following method overload can use the `conv.ovf.i4.un` opcode: -- +- ]]> @@ -4256,9 +4256,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.i8` opcode: + The following method overload can use the `conv.ovf.i8` opcode: -- +- ]]> @@ -4327,9 +4327,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.i8.un` opcode: + The following method overload can use the `conv.ovf.i8.un` opcode: -- +- ]]> @@ -4398,9 +4398,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.u` opcode: + The following method overload can use the `conv.ovf.u` opcode: -- +- ]]> @@ -4469,9 +4469,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.uvf.u.un` opcode: + The following method overload can use the `conv.uvf.u.un` opcode: -- +- ]]> @@ -4540,9 +4540,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.u1` opcode: + The following method overload can use the `conv.ovf.u1` opcode: -- +- ]]> @@ -4611,9 +4611,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.u1.un` opcode: + The following method overload can use the `conv.ovf.u1.un` opcode: -- +- ]]> @@ -4682,9 +4682,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.u2` opcode: + The following method overload can use the `conv.ovf.u2` opcode: -- +- ]]> @@ -4753,9 +4753,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.u2.un` opcode: + The following method overload can use the `conv.ovf.u2.un` opcode: -- +- ]]> @@ -4824,9 +4824,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.u4` opcode: + The following method overload can use the `conv.ovf.u4` opcode: -- +- ]]> @@ -4895,9 +4895,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.u4.un` opcode: + The following method overload can use the `conv.ovf.u4.un` opcode: -- +- ]]> @@ -4966,9 +4966,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.u8` opcode: + The following method overload can use the `conv.ovf.u8` opcode: -- +- ]]> @@ -5037,9 +5037,9 @@ is thrown if the result can not be represented in the result type. - The following method overload can use the `conv.ovf.u8.un` opcode: + The following method overload can use the `conv.ovf.u8.un` opcode: -- +- ]]> @@ -5110,9 +5110,9 @@ No exceptions are ever thrown when using this field. - The following method overload can use the `conv.r.un` opcode: + The following method overload can use the `conv.r.un` opcode: -- +- ]]> @@ -5183,9 +5183,9 @@ No exceptions are ever thrown when using this field. - The following method overload can use the `conv.r4` opcode: + The following method overload can use the `conv.r4` opcode: -- +- ]]> @@ -5256,9 +5256,9 @@ No exceptions are ever thrown when using this field. - The following method overload can use the `conv.r8` opcode: + The following method overload can use the `conv.r8` opcode: -- +- ]]> @@ -5329,9 +5329,9 @@ No exceptions are ever thrown when using this field. See and for equivalent instructions that will throw an exception when the result type can not properly represent the result value. - The following method overload can use the `conv.u` opcode: + The following method overload can use the `conv.u` opcode: -- +- ]]> @@ -5402,9 +5402,9 @@ No exceptions are ever thrown when using this field. See and for equivalent instructions that will throw an exception when the result type can not properly represent the result value. - The following method overload can use the `conv.u1` opcode: + The following method overload can use the `conv.u1` opcode: -- +- ]]> @@ -5475,9 +5475,9 @@ No exceptions are ever thrown when using this field. See and for equivalent instructions that will throw an exception when the result type can not properly represent the result value. - The following method overload can use the `conv.u2` opcode: + The following method overload can use the `conv.u2` opcode: -- +- ]]> @@ -5548,9 +5548,9 @@ No exceptions are ever thrown when using this field. See and for equivalent instructions that will throw an exception when the result type can not properly represent the result value. - The following method overload can use the `conv.u4` opcode: + The following method overload can use the `conv.u4` opcode: -- +- ]]> @@ -5621,9 +5621,9 @@ No exceptions are ever thrown when using this field. See and for equivalent instructions that will throw an exception when the result type can not properly represent the result value. - The following method overload can use the `conv.u8` opcode: + The following method overload can use the `conv.u8` opcode: -- +- ]]> @@ -5696,9 +5696,9 @@ may be thrown if an invalid address is detected. - The following method overload can use the `cpblk` opcode: + The following method overload can use the `cpblk` opcode: -- +- ]]> @@ -5765,9 +5765,9 @@ may be thrown if an invalid address is detected. - The following method overload can use the `cpobj` opcode: + The following method overload can use the `cpobj` opcode: -- +- ]]> @@ -5852,9 +5852,9 @@ Note that on Intel-based platforms an is thrown when computing (minint div -1). Floating-point operations never throw an exception (they produce NaNs or infinities instead). - The following method overload can use the `div` opcode: + The following method overload can use the `div` opcode: -- +- ]]> @@ -5921,9 +5921,9 @@ The `div.un` instruction computes `value1` divided by `value2`, both taken as unsigned integers, and pushes the `result` on the stack. - The following method overload can use the `div.un` opcode: + The following method overload can use the `div.un` opcode: -- +- ]]> @@ -5990,9 +5990,9 @@ The `dup` instruction duplicates the top element of the stack, and leaves two identical values atop it. - The following method overload can use the `dup` opcode: + The following method overload can use the `dup` opcode: -- +- ]]> @@ -6065,9 +6065,9 @@ Control cannot be transferred into a filter block except through the exception mechanism. Control cannot be transferred out of a filter block except through the use of a `throw` instruction or by executing the final `endfilter` instruction. You cannot embed a `try` block within a `filter` block. If an exception is thrown inside the `filter` block, it is intercepted and a value of 0 (`exception_continue_search`) is returned. - The following method overload can use the `endfilter` opcode: + The following method overload can use the `endfilter` opcode: -- +- ]]> @@ -6132,9 +6132,9 @@ Note that the `endfault` and `endfinally` instructions are aliases - they correspond to the same opcode. - The following method overload can use the `endfinally` (`endfault`) opcode, as well as the `ILGenerator` method . + The following method overload can use the `endfinally` (`endfault`) opcode, as well as the `ILGenerator` method . -- +- - @@ -6207,9 +6207,9 @@ may be thrown if an invalid address is detected. - The following method overload can use the `initblk` opcode: + The following method overload can use the `initblk` opcode: -- +- ]]> @@ -6274,9 +6274,9 @@ Unlike , `initobj` does not call the constructor method. `Initobj` is intended for initializing value types, while `newobj` is used to allocate and initialize objects. - The following method overload can use the `initobj` opcode: + The following method overload can use the `initobj` opcode: -- +- ]]> @@ -6343,9 +6343,9 @@ is thrown if class cannot be found. This is typically detected when the Microsoft Intermediate Language (MSIL) instructions are converted to native code rather than at runtime. - The following method overload can use the `isinst` opcode: + The following method overload can use the `isinst` opcode: -- +- ]]> @@ -6408,9 +6408,9 @@ The `jmp` instruction cannot be used to transferred control out of a `try`, `filter`, `catch`, or `finally` block. - The following method overload can use the `jmp` opcode: + The following method overload can use the `jmp` opcode: -- +- ]]> @@ -6475,9 +6475,9 @@ Arguments that hold an integer value smaller than 4 bytes long are expanded to type `int32` when they are loaded onto the stack. Floating-point values are expanded to their native size (type `F`). - The following method overload can use the `ldarg` opcode: + The following method overload can use the `ldarg` opcode: -- +- ]]> @@ -6542,9 +6542,9 @@ Arguments that hold an integer value smaller than 4 bytes long are expanded to type `int32` when they are loaded onto the stack. Floating-point values are expanded to their native size (type `F`). - The following method overload can use the `ldarg.0` opcode: + The following method overload can use the `ldarg.0` opcode: -- +- ]]> @@ -6609,9 +6609,9 @@ Arguments that hold an integer value smaller than 4 bytes long are expanded to type `int32` when they are loaded onto the stack. Floating-point values are expanded to their native size (type `F`). - The following method overload can use the `ldarg.1` opcode: + The following method overload can use the `ldarg.1` opcode: -- +- ]]> @@ -6676,9 +6676,9 @@ Arguments that hold an integer value smaller than 4 bytes long are expanded to type `int32` when they are loaded onto the stack. Floating-point values are expanded to their native size (type `F`). - The following method overload can use the `ldarg.2` opcode: + The following method overload can use the `ldarg.2` opcode: -- +- ]]> @@ -6743,9 +6743,9 @@ Arguments that hold an integer value smaller than 4 bytes long are expanded to type `int32` when they are loaded onto the stack. Floating-point values are expanded to their native size (type `F`). - The following method overload can use the `ldarg.3` opcode: + The following method overload can use the `ldarg.3` opcode: -- +- ]]> @@ -6812,9 +6812,9 @@ Arguments that hold an integer value smaller than 4 bytes long are expanded to type `int32` when they are loaded onto the stack. Floating-point values are expanded to their native size (type `F`). - The following method overload can use the `ldarg.s` opcode: + The following method overload can use the `ldarg.s` opcode: -- +- ]]> @@ -6879,9 +6879,9 @@ `ldarga` is used for by-ref parameter passing. For other cases, and should be used. - The following method overload can use the `ldarga` opcode: + The following method overload can use the `ldarga` opcode: -- +- ]]> @@ -6948,9 +6948,9 @@ `ldarga.s` is used for by-ref parameter passing. For other cases, and should be used. - The following method overload can use the `ldarga.s` opcode: + The following method overload can use the `ldarga.s` opcode: -- +- ]]> @@ -7017,9 +7017,9 @@ 3. Use a short form instruction followed by a for constants that can be expressed in 8 or fewer bits. - The following method overload can use the `ldc.i4` opcode: + The following method overload can use the `ldc.i4` opcode: -- +- ]]> @@ -7080,9 +7080,9 @@ This is a special short encoding for the push of the integer value 0. All special short encodings push 4 byte integers on the stack. - The following method overload can use the `ldc.i4.0` opcode: + The following method overload can use the `ldc.i4.0` opcode: -- +- ]]> @@ -7143,9 +7143,9 @@ This is a special short encoding for the push of the integer value 1. All special short encodings push 4 byte integers on the stack. - The following method overload can use the `ldc.i4.1` opcode: + The following method overload can use the `ldc.i4.1` opcode: -- +- ]]> @@ -7206,9 +7206,9 @@ This is a special short encoding for the push of the integer value 2. All special short encodings push 4 byte integers on the stack. - The following method overload can use the `ldc.i4.2` opcode: + The following method overload can use the `ldc.i4.2` opcode: -- +- ]]> @@ -7269,9 +7269,9 @@ This is a special short encoding for the push of the integer value 3. All special short encodings push 4 byte integers on the stack. - The following method overload can use the `ldc.i4.3` opcode: + The following method overload can use the `ldc.i4.3` opcode: -- +- ]]> @@ -7332,9 +7332,9 @@ This is a special short encoding for the push of the integer value 4. All special short encodings push 4 byte integers on the stack. - The following method overload can use the `ldc.i4.4` opcode: + The following method overload can use the `ldc.i4.4` opcode: -- +- ]]> @@ -7395,9 +7395,9 @@ This is a special short encoding for the push of the integer value 5. All special short encodings push 4 byte integers on the stack. - The following method overload can use the `ldc.i4.5` opcode: + The following method overload can use the `ldc.i4.5` opcode: -- +- ]]> @@ -7458,9 +7458,9 @@ This is a special short encoding for the push of the integer value 6. All special short encodings push 4 byte integers on the stack. - The following method overload can use the `ldc.i4.6` opcode: + The following method overload can use the `ldc.i4.6` opcode: -- +- ]]> @@ -7521,9 +7521,9 @@ This is a special short encoding for the push of the integer value 7. All special short encodings push 4 byte integers on the stack. - The following method overload can use the `ldc.i4.7` opcode: + The following method overload can use the `ldc.i4.7` opcode: -- +- ]]> @@ -7584,9 +7584,9 @@ This is a special short encoding for the push of the integer value 8. All special short encodings push 4 byte integers on the stack. - The following method overload can use the `ldc.i4.8` opcode: + The following method overload can use the `ldc.i4.8` opcode: -- +- ]]> @@ -7647,9 +7647,9 @@ This is a special short encoding for the push of the integer value -1. All special short encodings push 4 byte integers on the stack. - The following method overload can use the `ldc.i4.m1` opcode: + The following method overload can use the `ldc.i4.m1` opcode: -- +- ]]> @@ -7710,7 +7710,7 @@ `ldc.i4.s` is a more efficient encoding for pushing the integers from -128 to 127 onto the evaluation stack. -The following method overloads can use the `ldc.i4.s` opcode: +The following method overloads can use the `ldc.i4.s` opcode: - - @@ -7774,9 +7774,9 @@ The following method overloads This encoding pushes an `int64` value onto the stack. - The following method overload can use the `ldc.i8` opcode: + The following method overload can use the `ldc.i8` opcode: -- +- ]]> @@ -7837,9 +7837,9 @@ The following method overloads This encoding pushes a `float32` value onto the stack. - The following method overload can use the `ldc.r4` opcode: + The following method overload can use the `ldc.r4` opcode: -- +- ]]> @@ -7900,9 +7900,9 @@ The following method overloads This encoding pushes a `float64` value onto the stack. - The following method overload can use the `ldc.r8` opcode: + The following method overload can use the `ldc.r8` opcode: -- +- ]]> @@ -7974,9 +7974,9 @@ The following method overloads is thrown if `index` is negative, or larger than the upper bound of `array`. - The following method overload can use the `ldelem` opcode: + The following method overload can use the `ldelem` opcode: -- +- ]]> @@ -8053,9 +8053,9 @@ The following method overloads is thrown if `index` is negative, or larger than the bound of `array`. - The following method overload can use the `ldelem.i` opcode: + The following method overload can use the `ldelem.i` opcode: -- +- ]]> @@ -8132,9 +8132,9 @@ The following method overloads is thrown if `index` is negative, or larger than the bound of `array`. - The following method overload can use the `ldelem.i1` opcode: + The following method overload can use the `ldelem.i1` opcode: -- +- ]]> @@ -8211,9 +8211,9 @@ The following method overloads is thrown if `index` is negative, or larger than the bound of `array`. - The following method overload can use the `ldelem.i2` opcode: + The following method overload can use the `ldelem.i2` opcode: -- +- ]]> @@ -8290,9 +8290,9 @@ The following method overloads is thrown if `index` is negative, or larger than the bound of `array`. - The following method overload can use the `ldelem.i4` opcode: + The following method overload can use the `ldelem.i4` opcode: -- +- ]]> @@ -8369,9 +8369,9 @@ The following method overloads is thrown if `index` is negative, or larger than the bound of `array`. - The following method overload can use the `ldelem.i8` opcode: + The following method overload can use the `ldelem.i8` opcode: -- +- ]]> @@ -8448,9 +8448,9 @@ The following method overloads is thrown if `index` is negative, or larger than the bound of `array`. - The following method overload can use the `ldelem.r4` opcode: + The following method overload can use the `ldelem.r4` opcode: -- +- ]]> @@ -8527,9 +8527,9 @@ The following method overloads is thrown if `index` is negative, or larger than the bound of `array`. - The following method overload can use the `ldelem.r8` opcode: + The following method overload can use the `ldelem.r8` opcode: -- +- ]]> @@ -8604,9 +8604,9 @@ The following method overloads is thrown if `index` is negative, or larger than the bound of `array`. - The following method overload can use the `ldelem.ref` opcode: + The following method overload can use the `ldelem.ref` opcode: -- +- ]]> @@ -8683,9 +8683,9 @@ The following method overloads is thrown if `index` is negative, or larger than the bound of `array`. - The following method overload can use the `ldelem.u1` opcode: + The following method overload can use the `ldelem.u1` opcode: -- +- ]]> @@ -8762,9 +8762,9 @@ The following method overloads is thrown if `index` is negative, or larger than the bound of `array`. - The following method overload can use the `ldelem.u2` opcode: + The following method overload can use the `ldelem.u2` opcode: -- +- ]]> @@ -8841,9 +8841,9 @@ The following method overloads is thrown if `index` is negative, or larger than the bound of `array`. - The following method overload can use the `ldelem.u4` opcode: + The following method overload can use the `ldelem.u4` opcode: -- +- ]]> @@ -8920,9 +8920,9 @@ The following method overloads is thrown if `index` is negative, or larger than the bound of `array`. - The following method overload can use the `ldelema` opcode: + The following method overload can use the `ldelema` opcode: -- +- ]]> @@ -8993,9 +8993,9 @@ The following method overloads is thrown if the specified field is not found in the metadata. This is typically checked when Microsoft Intermediate Language (MSIL) instructions are converted to native code, not at run time. - The following method overload can use the `ldfld` opcode: + The following method overload can use the `ldfld` opcode: -- +- ]]> @@ -9070,9 +9070,9 @@ The following method overloads is thrown if the specified field is not found in the metadata. This is typically checked when Microsoft Intermediate Language (MSIL) instructions are converted to native code, not at run time. - The following method overload can use the `ldflda` opcode: + The following method overload can use the `ldflda` opcode: -- +- ]]> @@ -9135,9 +9135,9 @@ The following method overloads The value returned points to native code using the CLR calling convention. This method pointer should not be passed to unmanaged native code as a callback routine. - The following method overload can use the `ldftn` opcode: + The following method overload can use the `ldftn` opcode: -- +- ]]> @@ -9212,9 +9212,9 @@ The following method overloads can be thrown if an invalid address is detected. - The following method overload can use the `ldind.i` opcode: + The following method overload can use the `ldind.i` opcode: -- +- ]]> @@ -9289,9 +9289,9 @@ The following method overloads can be thrown if an invalid address is detected. - The following method overload can use the `ldind.i1` opcode: + The following method overload can use the `ldind.i1` opcode: -- +- ]]> @@ -9366,9 +9366,9 @@ The following method overloads can be thrown if an invalid address is detected. - The following method overload can use the `ldind.i2` opcode: + The following method overload can use the `ldind.i2` opcode: -- +- ]]> @@ -9443,9 +9443,9 @@ The following method overloads can be thrown if an invalid address is detected. - The following method overload can use the `ldind.i4` opcode: + The following method overload can use the `ldind.i4` opcode: -- +- ]]> @@ -9520,9 +9520,9 @@ The following method overloads can be thrown if an invalid address is detected. - The following method overload can use the `ldind.i8` opcode: + The following method overload can use the `ldind.i8` opcode: -- +- ]]> @@ -9597,9 +9597,9 @@ The following method overloads can be thrown if an invalid address is detected. - The following method overload can use the `ldind.r4` opcode: + The following method overload can use the `ldind.r4` opcode: -- +- ]]> @@ -9674,9 +9674,9 @@ The following method overloads can be thrown if an invalid address is detected. - The following method overload can use the `ldind.r8` opcode: + The following method overload can use the `ldind.r8` opcode: -- +- ]]> @@ -9751,9 +9751,9 @@ The following method overloads can be thrown if an invalid address is detected. - The following method overload can use the `ldind.ref` opcode: + The following method overload can use the `ldind.ref` opcode: -- +- ]]> @@ -9828,9 +9828,9 @@ The following method overloads can be thrown if an invalid address is detected. - The following method overload can use the `ldind.u1` opcode: + The following method overload can use the `ldind.u1` opcode: -- +- ]]> @@ -9905,9 +9905,9 @@ The following method overloads can be thrown if an invalid address is detected. - The following method overload can use the `ldind.u2` opcode: + The following method overload can use the `ldind.u2` opcode: -- +- ]]> @@ -9982,9 +9982,9 @@ The following method overloads can be thrown if an invalid address is detected. - The following method overload can use the `ldind.u4` opcode: + The following method overload can use the `ldind.u4` opcode: -- +- ]]> @@ -10051,9 +10051,9 @@ The following method overloads is thrown if the array reference is a null reference. - The following method overload can use the `ldlen` opcode: + The following method overload can use the `ldlen` opcode: -- +- ]]> @@ -10118,11 +10118,11 @@ The following method overloads The type of the value is the same as the type of the local variable, which is specified in the method header. See Partition I. Local variables that are smaller than 4 bytes long are expanded to type `int32` when they are loaded onto the stack. Floating-point values are expanded to their native size (type `F`). - The following method overloads can use the `ldloc` opcode: + The following method overloads can use the `ldloc` opcode: -- +- -- +- ]]> @@ -10185,9 +10185,9 @@ The following method overloads The type of the value is the same as the type of the local variable, which is specified in the method header. Local variables that are smaller than 4 bytes long are expanded to type `int32` when they are loaded onto the stack. Floating-point values are expanded to their native size (type `F`). - The following method overload can use the `ldloc.0` opcode: + The following method overload can use the `ldloc.0` opcode: -- +- ]]> @@ -10250,9 +10250,9 @@ The following method overloads The type of the value is the same as the type of the local variable, which is specified in the method header. Local variables that are smaller than 4 bytes long are expanded to type `int32` when they are loaded onto the stack. Floating-point values are expanded to their native size (type `F`). - The following method overload can use the `ldloc.1` opcode: + The following method overload can use the `ldloc.1` opcode: -- +- ]]> @@ -10315,9 +10315,9 @@ The following method overloads The type of the value is the same as the type of the local variable, which is specified in the method header. Local variables that are smaller than 4 bytes long are expanded to type `int32` when they are loaded onto the stack. Floating-point values are expanded to their native size (type `F`). - The following method overload can use the `ldloc.2` opcode: + The following method overload can use the `ldloc.2` opcode: -- +- ]]> @@ -10380,9 +10380,9 @@ The following method overloads The type of the value is the same as the type of the local variable, which is specified in the method header. Local variables that are smaller than 4 bytes long are expanded to type `int32` when they are loaded onto the stack. Floating-point values are expanded to their native size (type `F`). - The following method overload can use the `ldloc.3` opcode: + The following method overload can use the `ldloc.3` opcode: -- +- ]]> @@ -10445,11 +10445,11 @@ The following method overloads The type of the value is the same as the type of the local variable, which is specified in the method header. See Partition I. Local variables that are smaller than 4 bytes long are expanded to type `int32` when they are loaded onto the stack. Floating-point values are expanded to their native size (type `F`). - The following method overloads can use the `ldloc.s` opcode: + The following method overloads can use the `ldloc.s` opcode: -- +- -- +- ]]> @@ -10510,9 +10510,9 @@ The following method overloads The `ldloca` instruction pushes the address of the local variable number at the passed index onto the stack, where local variables are numbered 0 onwards. The value pushed on the stack is already aligned correctly for use with instructions like and . The result is a managed pointer (type `&`). The local variable is stored in unmanaged memory, so the return value can be converted to an unmanaged pointer without pinning. - The following method overload can use the `ldloca` opcode: + The following method overload can use the `ldloca` opcode: -- +- ]]> @@ -10575,9 +10575,9 @@ The following method overloads The `ldloca.s` instruction provides an efficient encoding for use with the local variables 0 through 255. - The following method overload can use the `ldloca.s` opcode: + The following method overload can use the `ldloca.s` opcode: -- +- ]]> @@ -10640,9 +10640,9 @@ The following method overloads `ldnull` provides a null reference that is size-independent. - The following method overload can use the `ldnull` opcode: + The following method overload can use the `ldnull` opcode: -- +- ]]> @@ -10713,9 +10713,9 @@ The following method overloads is thrown if class cannot be found. This is typically detected when the Microsoft Intermediate Language (MSIL) instruction is converted to native code rather than at runtime. - The following method overload can use the `ldobj` opcode: + The following method overload can use the `ldobj` opcode: -- +- ]]> @@ -10778,9 +10778,9 @@ The following method overloads The `ldsfld` instruction can have a prefix. - The following method overload can use the `ldsfld` opcode: + The following method overload can use the `ldsfld` opcode: -- +- ]]> @@ -10845,9 +10845,9 @@ The following method overloads is thrown if field is not found in the metadata. This is typically checked when Microsoft Intermediate Language (MSIL) instructions are converted to native code, not at runtime. - The following method overload can use the `ldsflda` opcode: + The following method overload can use the `ldsflda` opcode: -- +- ]]> @@ -10910,9 +10910,9 @@ The following method overloads The Common Language Infrastructure (CLI) guarantees that the result of two `ldstr` instructions referring to two metadata tokens that have the same sequence of characters return precisely the same string object (a process known as "string interning"). - The following method overload can use the `ldstr` opcode: + The following method overload can use the `ldstr` opcode: -- +- ]]> @@ -10977,13 +10977,13 @@ The following method overloads For information on runtime handles, see the following classes: , , and . - The following method overloads can use the `ldtoken` opcode: + The following method overloads can use the `ldtoken` opcode: -- +- -- +- -- +- ]]> @@ -11050,9 +11050,9 @@ The following method overloads The unmanaged pointer points to native code using the CLR calling convention. This method pointer should not be passed to unmanaged native code as a callback routine. - The following method overload can use the `ldvirtftn` opcode: + The following method overload can use the `ldvirtftn` opcode: -- +- ]]> @@ -11117,9 +11117,9 @@ The following method overloads If an instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. - The following method overloads can use the `leave` opcode: + The following method overloads can use the `leave` opcode: -- +- ]]> @@ -11184,9 +11184,9 @@ The following method overloads If an instruction has one or more prefix codes, control can only be transferred to the first of these prefixes. - The following method overload can use the `leave.s` opcode: + The following method overload can use the `leave.s` opcode: -- +- ]]> @@ -11257,9 +11257,9 @@ The following method overloads is thrown if there is insufficient memory to service the request. - The following method overload can use the `localloc` opcode: + The following method overload can use the `localloc` opcode: -- +- ]]> @@ -11328,9 +11328,9 @@ The following method overloads is thrown if `class` cannot be found. This is typically detected when Microsoft Intermediate Language (MSIL) instructions are converted to native code rather than at runtime. - The following method overload can use the `mkrefany` opcode: + The following method overload can use the `mkrefany` opcode: -- +- ]]> @@ -11401,9 +11401,9 @@ The following method overloads For floating-point types, 0 * infinity = NaN. - The following method overload can use the `mul` opcode: + The following method overload can use the `mul` opcode: -- +- ]]> @@ -11472,9 +11472,9 @@ The following method overloads is thrown if the result can not be represented in the result type. - The following method overload can use the `mul.ovf` opcode: + The following method overload can use the `mul.ovf` opcode: -- +- ]]> @@ -11543,9 +11543,9 @@ The following method overloads is thrown if the result can not be represented in the result type. - The following method overload can use the `mul.ovf.un` opcode: + The following method overload can use the `mul.ovf.un` opcode: -- +- ]]> @@ -11614,9 +11614,9 @@ The following method overloads Negating a floating-point number cannot overflow, and negating NaN returns NaN. - The following method overload can use the `neg` opcode: + The following method overload can use the `neg` opcode: -- +- ]]> @@ -11691,9 +11691,9 @@ The following method overloads is thrown if `numElems` is less than 0. - The following method overload can use the `newarr` opcode: + The following method overload can use the `newarr` opcode: -- +- ]]> @@ -11770,9 +11770,9 @@ The following method overloads is thrown if a constructor method `ctor` with the indicated name, class and signature could not be found. This is typically detected when Microsoft Intermediate Language (MSIL) instructions are converted to native code, rather than at runtime. - The following method overload can use the `newobj` opcode: + The following method overload can use the `newobj` opcode: -- +- ]]> @@ -11831,9 +11831,9 @@ The following method overloads The `nop` operation does nothing. It is intended to fill in space if opcodes are patched. - The following method overload can use the `nop` opcode: + The following method overload can use the `nop` opcode: -- +- ]]> @@ -11898,9 +11898,9 @@ The following method overloads The `not` instruction computes the bitwise complement of an integer value and pushes the result onto the stack. The return type is the same as the operand type. - The following method overload can use the `not` opcode: + The following method overload can use the `not` opcode: -- +- ]]> @@ -11969,9 +11969,9 @@ The following method overloads `Or` is an integer-specific operation. - The following method overload can use the `or` opcode: + The following method overload can use the `or` opcode: -- +- ]]> @@ -12032,9 +12032,9 @@ The following method overloads The `pop` instruction removes the top element from the stack. - The following method overload can use the `pop` opcode: + The following method overload can use the `pop` opcode: -- +- ]]> @@ -12460,9 +12460,9 @@ callvirt m In general it would be unsafe to skip the run-time check if the array held elements of a reference type. To be safe, it is necessary to ensure that no modifications to the array are made through this pointer. The verifier rules ensure this. The restricted managed pointer can be passed as the object of instance method calls, so it is not strictly speaking read-only for value types, but there is no type safety problem for value types. - The following method overload can use the `readonly` opcode: + The following method overload can use the `readonly` opcode: -- +- ]]> @@ -12529,9 +12529,9 @@ callvirt m The `refanytype` instruction retrieves the type token embedded in the typed reference. See the instruction for information on creating typed references. - The following method overload can use the `refanytype` opcode: + The following method overload can use the `refanytype` opcode: -- +- ]]> @@ -12602,9 +12602,9 @@ callvirt m is thrown if `type` cannot be found. - The following method overload can use the `refanyval` opcode: + The following method overload can use the `refanyval` opcode: -- +- ]]> @@ -12682,9 +12682,9 @@ callvirt m Note that on the Intel-based platforms an is thrown when computing (minint `rem` -1). - The following method overload can use the `rem` opcode: + The following method overload can use the `rem` opcode: -- +- ]]> @@ -12761,9 +12761,9 @@ callvirt m Integral operations throw if `value2` is zero. - The following method overload can use the `rem.un` opcode: + The following method overload can use the `rem.un` opcode: -- +- ]]> @@ -12830,9 +12830,9 @@ callvirt m The `ret` instruction cannot be used to transfer control out of a`try`, `filter`, `catch`, or `finally` block. From within a `try` or `catch`, use the instruction with a destination of a `ret` instruction that is outside all enclosing exception blocks. Because the `filter` and `finally` blocks are logically part of exception handling and not the method in which their code is embedded, correctly generated Microsoft Intermediate Language (MSIL) instructions do not perform a method return from within a `filter` or `finally`. - The following method overload can use the `ret` opcode: + The following method overload can use the `ret` opcode: -- +- ]]> @@ -12891,9 +12891,9 @@ callvirt m The `rethrow` instruction is only permitted within the body of a `catch` handler. It throws the same exception that was caught by this handler. - The following method overload can use the `rethrow` opcode: + The following method overload can use the `rethrow` opcode: -- +- ]]> @@ -12962,9 +12962,9 @@ callvirt m `Shl` inserts a zero bit in the lowest position on each shift. - The following method overload can use the `shl` opcode: + The following method overload can use the `shl` opcode: -- +- ]]> @@ -13033,9 +13033,9 @@ callvirt m `Shr` replicates the high order bit on each shift, preserving the sign of the original value in the `result`. - The following method overload can use the `shr` opcode: + The following method overload can use the `shr` opcode: -- +- ]]> @@ -13104,9 +13104,9 @@ callvirt m `Shr.un` inserts a zero bit in the highest position on each shift. - The following method overload can use the `shr.un` opcode: + The following method overload can use the `shr.un` opcode: -- +- ]]> @@ -13169,9 +13169,9 @@ callvirt m For a reference type, the size returned is the size of a reference value of the corresponding type (4 bytes on 32-bit systems), not the size of the data stored in objects referred to by the reference value. A generic type parameter can be used only in the body of the type or method that defines it. When that type or method is instantiated, the generic type parameter is replaced by a value type or reference type. - The following method overload can use the `sizeof` opcode: + The following method overload can use the `sizeof` opcode: -- +- ]]> @@ -13237,9 +13237,9 @@ callvirt m Performing a store into arguments that hold an integer value smaller than 4 bytes long truncates the value as it moves from the stack to the argument. Floating-point values are rounded from their native size (type `F`) to the size associated with the argument. - The following method overload can use the `starg` opcode: + The following method overload can use the `starg` opcode: -- +- ]]> @@ -13306,9 +13306,9 @@ callvirt m Performing a store into arguments that hold an integer value smaller than 4 bytes long truncates the value as it moves from the stack to the argument. Floating-point values are rounded from their native size (type `F`) to the size associated with the argument. - The following method overload can use the `starg.s` opcode: + The following method overload can use the `starg.s` opcode: -- +- ]]> @@ -13382,9 +13382,9 @@ callvirt m is thrown if `array` does not hold elements of the required type. - The following method overload can use the `stelem` opcode: + The following method overload can use the `stelem` opcode: -- +- ]]> @@ -13459,9 +13459,9 @@ callvirt m is thrown if `array` does not hold elements of the required type. - The following method overload can use the `stelem.i` opcode: + The following method overload can use the `stelem.i` opcode: -- +- ]]> @@ -13536,9 +13536,9 @@ callvirt m is thrown if `array` does not hold elements of the required type. - The following method overload can use the `stelem.i1` opcode: + The following method overload can use the `stelem.i1` opcode: -- +- ]]> @@ -13613,9 +13613,9 @@ callvirt m is thrown if `array` does not hold elements of the required type. - The following method overload can use the `stelem.i2` opcode: + The following method overload can use the `stelem.i2` opcode: -- +- ]]> @@ -13690,9 +13690,9 @@ callvirt m is thrown if `array` does not hold elements of the required type. - The following method overload can use the `stelem.i4` opcode: + The following method overload can use the `stelem.i4` opcode: -- +- ]]> @@ -13767,9 +13767,9 @@ callvirt m is thrown if `array` does not hold elements of the required type. - The following method overload can use the `stelem.i8` opcode: + The following method overload can use the `stelem.i8` opcode: -- +- ]]> @@ -13844,9 +13844,9 @@ callvirt m is thrown if `array` does not hold elements of the required type. - The following method overload can use the `stelem.r4` opcode: + The following method overload can use the `stelem.r4` opcode: -- +- ]]> @@ -13921,9 +13921,9 @@ callvirt m is thrown if `array` does not hold elements of the required type. - The following method overload can use the `stelem.r8` opcode: + The following method overload can use the `stelem.r8` opcode: -- +- ]]> @@ -13992,7 +13992,7 @@ callvirt m Arrays are objects and hence represented by a value of type `O`. The index is type `native int`. - Note that `stelem.ref` implicitly casts the supplied value to the element type of `array` before assigning the value to the array element. This cast can fail, even for verified code. Thus the `stelem.ref` instruction can throw . For one-dimensional arrays that aren't zero-based and for multidimensional arrays, the class provides a method. + Note that `stelem.ref` implicitly casts the supplied value to the element type of `array` before assigning the value to the array element. This cast can fail, even for verified code. Thus the `stelem.ref` instruction can throw . For one-dimensional arrays that aren't zero-based and for multidimensional arrays, the class provides a method. is thrown if `array` is a null reference. @@ -14000,9 +14000,9 @@ callvirt m is thrown if `array` does not hold elements of the required type. - The following method overload can use the `stelem.ref` opcode: + The following method overload can use the `stelem.ref` opcode: -- +- ]]> @@ -14071,9 +14071,9 @@ callvirt m is thrown if `field` is not found in the metadata. This is typically checked when the Microsoft Intermediate Language (MSIL) instruction is converted to native code, not at runtime. - The following method overload can use the `stfld` opcode: + The following method overload can use the `stfld` opcode: -- +- ]]> @@ -14142,9 +14142,9 @@ callvirt m is thrown if `addr` is not naturally aligned for the argument type implied by the instruction suffix. - The following method overload can use the `stind.i` opcode: + The following method overload can use the `stind.i` opcode: -- +- ]]> @@ -14213,9 +14213,9 @@ callvirt m is thrown if `addr` is not naturally aligned for the argument type implied by the instruction suffix. - The following method overload can use the `stind.i1` opcode: + The following method overload can use the `stind.i1` opcode: -- +- ]]> @@ -14284,9 +14284,9 @@ callvirt m is thrown if `addr` is not naturally aligned for the argument type implied by the instruction suffix. - The following method overload can use the `stind.i2` opcode: + The following method overload can use the `stind.i2` opcode: -- +- ]]> @@ -14355,9 +14355,9 @@ callvirt m is thrown if `addr` is not naturally aligned for the argument type implied by the instruction suffix. - The following method overload can use the `stind.i4` opcode: + The following method overload can use the `stind.i4` opcode: -- +- ]]> @@ -14426,9 +14426,9 @@ callvirt m is thrown if `addr` is not naturally aligned for the argument type implied by the instruction suffix. - The following method overload can use the `stind.i8` opcode: + The following method overload can use the `stind.i8` opcode: -- +- ]]> @@ -14497,9 +14497,9 @@ callvirt m is thrown if `addr` is not naturally aligned for the argument type implied by the instruction suffix. - The following method overload can use the `stind.r4` opcode: + The following method overload can use the `stind.r4` opcode: -- +- ]]> @@ -14568,9 +14568,9 @@ callvirt m is thrown if `addr` is not naturally aligned for the argument type implied by the instruction suffix. - The following method overload can use the `stind.r8` opcode: + The following method overload can use the `stind.r8` opcode: -- +- ]]> @@ -14639,9 +14639,9 @@ callvirt m is thrown if `addr` is not naturally aligned for the argument type implied by the instruction suffix. - The following method overload can use the `stind.ref` opcode: + The following method overload can use the `stind.ref` opcode: -- +- ]]> @@ -14706,11 +14706,11 @@ callvirt m Correct Microsoft Intermediate Language (MSIL) instructions require that `index` be a valid local index. For the `stloc` instruction, `index` must lie in the range 0 to 65534 inclusive (specifically, 65535 is not valid). The reason for excluding 65535 is pragmatic: likely implementations will use a 2-byte integer to track both a local's index, as well as the total number of locals for a given method. If an index of 65535 had been made valid, it would require a wider integer to track the number of locals in such a method. - The following method overloads can use the `stloc` opcode: + The following method overloads can use the `stloc` opcode: -- +- -- +- ]]> @@ -14775,9 +14775,9 @@ callvirt m Storing into locals that hold an integer value smaller than 4 bytes long truncates the value as it moves from the stack to the local variable. Floating-point values are rounded from their native size (type `F`) to the size associated with the argument. - The following method overload can use the `stloc.0` opcode: + The following method overload can use the `stloc.0` opcode: -- +- ]]> @@ -14842,9 +14842,9 @@ callvirt m Storing into locals that hold an integer value smaller than 4 bytes long truncates the value as it moves from the stack to the local variable. Floating-point values are rounded from their native size (type `F`) to the size associated with the argument. - The following method overload can use the `stloc.1` opcode: + The following method overload can use the `stloc.1` opcode: -- +- ]]> @@ -14909,9 +14909,9 @@ callvirt m Storing into locals that hold an integer value smaller than 4 bytes long truncates the value as it moves from the stack to the local variable. Floating-point values are rounded from their native size (type `F`) to the size associated with the argument. - The following method overload can use the `stloc.2` opcode: + The following method overload can use the `stloc.2` opcode: -- +- ]]> @@ -14976,9 +14976,9 @@ callvirt m Storing into locals that hold an integer value smaller than 4 bytes long truncates the value as it moves from the stack to the local variable. Floating-point values are rounded from their native size (type `F`) to the size associated with the argument. - The following method overload can use the `stloc.3` opcode: + The following method overload can use the `stloc.3` opcode: -- +- ]]> @@ -15043,11 +15043,11 @@ callvirt m Storing into locals that hold an integer value smaller than 4 bytes long truncates the value as it moves from the stack to the local variable. Floating-point values are rounded from their native size (type `F`) to the size associated with the argument. - The following method overloads can use the `stloc.s` opcode: + The following method overloads can use the `stloc.s` opcode: -- +- -- +- ]]> @@ -15116,9 +15116,9 @@ callvirt m is thrown if class cannot be found. This is typically detected when Microsoft Intermediate Language (MSIL) instructions are converted to native code rather than at run time. - The following method overload can use the `stobj` opcode: + The following method overload can use the `stobj` opcode: -- +- ]]> @@ -15185,9 +15185,9 @@ callvirt m is thrown if field is not found in the metadata. This is typically checked when Microsoft Intermediate Language (MSIL) instructions are converted to native code, not at run time. - The following method overload can use the `stsfld` opcode: + The following method overload can use the `stsfld` opcode: -- +- ]]> @@ -15258,9 +15258,9 @@ callvirt m Floating-point overflow returns `+inf` (`PositiveInfinity`) or `-inf` (`NegativeInfinity`). - The following method overload can use the `sub` opcode: + The following method overload can use the `sub` opcode: -- +- ]]> @@ -15329,9 +15329,9 @@ callvirt m This operation is performed on signed integers; for floating-point values, use . - The following method overload can use the `sub.ovf` opcode: + The following method overload can use the `sub.ovf` opcode: -- +- ]]> @@ -15400,9 +15400,9 @@ callvirt m This operation is performed on signed integers; for floating-point values, use . - The following method overload can use the `sub.ovf.un` opcode: + The following method overload can use the `sub.ovf.un` opcode: -- +- ]]> @@ -15471,9 +15471,9 @@ callvirt m Control transfers into and out of `try`, `catch`, `filter`, and `finally` blocks cannot be performed by this instruction. (Such transfers are severely restricted and must use the leave instruction instead). - The following method overload can use the `switch` opcode. The `Label[]` argument is an array of Labels representing 32-bit offsets. + The following method overload can use the `switch` opcode. The `Label[]` argument is an array of Labels representing 32-bit offsets. -- +- @@ -15544,9 +15544,9 @@ callvirt m The current frame cannot be discarded when control is transferred from untrusted code to trusted code, since this would jeopardize code identity security. The .NET Framework security checks can therefore cause the `tail` to be ignored, leaving a standard instruction. Similarly, in order to allow the exit of a synchronized region to occur after the call returns, the `tail` prefix is ignored when used to exit a method that is marked synchronized. - The following method overload can use the `tail` opcode: + The following method overload can use the `tail` opcode: -- +- ]]> @@ -15681,9 +15681,9 @@ callvirt m is thrown if the object reference is a null reference. - The following method overload can use the `throw` opcode: + The following method overload can use the `throw` opcode: -- +- ]]> @@ -15750,11 +15750,11 @@ callvirt m The `unaligned` and `volatile` prefixes can be combined in either order. They must immediately precede a `ldind`, `stind`, `ldfld`, `stfld`, `ldobj`, `stobj`, `initblk`, or `cpblk` instruction. Only the prefix is allowed for the and instructions. - The following method overloads can use the `unaligned` opcode: + The following method overloads can use the `unaligned` opcode: -- +- -- +- ]]> @@ -15833,9 +15833,9 @@ callvirt m is thrown if the value type `valType` cannot be found. This is typically detected when Microsoft Intermediate Language (MSIL) instructions are converted to native code, rather than at runtime. - The following method overload can use the `unbox` opcode: + The following method overload can use the `unbox` opcode: -- +- ]]> @@ -15907,9 +15907,9 @@ callvirt m is thrown if `obj` is a null reference. - The following method overload can use the `unbox.any` opcode: + The following method overload can use the `unbox.any` opcode: -- +- ]]> @@ -15972,9 +15972,9 @@ callvirt m The and `volatile` prefixes can be combined in either order. They must immediately precede a `ldind`, `stind`, `ldfld`, `stfld`, `ldobj`, `stobj`, `initblk`, or `cpblk` instruction. Only the `volatile` prefix is allowed for the and instructions. - The following method overload can use the `volatile` opcode: + The following method overload can use the `volatile` opcode: -- +- ]]> @@ -16043,9 +16043,9 @@ callvirt m `Xor` is an integer-specific operation. - The following method overload can use the `xor` opcode: + The following method overload can use the `xor` opcode: -- +- ]]> diff --git a/xml/System.Reflection.Emit/ParameterBuilder.xml b/xml/System.Reflection.Emit/ParameterBuilder.xml index 7d2f9d80a3c..b81707f57e0 100644 --- a/xml/System.Reflection.Emit/ParameterBuilder.xml +++ b/xml/System.Reflection.Emit/ParameterBuilder.xml @@ -82,7 +82,7 @@ ## Remarks Parameter attributes need to consistent with the method signature. If you specify `Out` attributes for a parameter, you should ensure that the type of that method parameter is a `ByRef` type. - Some attributes require that you call with viable parameters in order for the Microsoft intermediate language (MSIL) to work correctly at runtime. For example, if you define a with ParameterAttributes.Out for parameter 1 of a `MethodBuilder`, then parameter 1 of must be a reference such as Type.GetType("System.String&"), rather than Type.GetType("System.String"). + Some attributes require that you call with viable parameters in order for the Microsoft intermediate language (MSIL) to work correctly at runtime. For example, if you define a with ParameterAttributes.Out for parameter 1 of a `MethodBuilder`, then parameter 1 of must be a reference such as Type.GetType("System.String&"), rather than Type.GetType("System.String"). diff --git a/xml/System.Reflection.Emit/ParameterToken.xml b/xml/System.Reflection.Emit/ParameterToken.xml index 2b093dbb083..56929f30de9 100644 --- a/xml/System.Reflection.Emit/ParameterToken.xml +++ b/xml/System.Reflection.Emit/ParameterToken.xml @@ -194,7 +194,7 @@ if is equal to ; otherwise, . - .]]> + .]]> @@ -229,7 +229,7 @@ if is not equal to ; otherwise, . - .]]> + .]]> diff --git a/xml/System.Reflection.Emit/PropertyBuilder.xml b/xml/System.Reflection.Emit/PropertyBuilder.xml index c5b6548520f..ce44322dd50 100644 --- a/xml/System.Reflection.Emit/PropertyBuilder.xml +++ b/xml/System.Reflection.Emit/PropertyBuilder.xml @@ -85,7 +85,7 @@ ## Examples - The following code sample demonstrates how to implement properties in a dynamic type using a `PropertyBuilder` obtained via to create the property framework and an associated to implement the IL logic within the property. + The following code sample demonstrates how to implement properties in a dynamic type using a `PropertyBuilder` obtained via to create the property framework and an associated to implement the IL logic within the property. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/PropertyBuilder/Overview/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/PropertyBuilder/Overview/source.vb" id="Snippet1"::: @@ -1673,7 +1673,7 @@ For information on how to format `binaryAttribute`, see the metadata specificati or , retrieve the object from the type, and call . + To set the value of a property, reflect on the property's parent type using or , retrieve the object from the type, and call . ]]> @@ -1736,7 +1736,7 @@ For information on how to format `binaryAttribute`, see the metadata specificati or , retrieve the object from the type, and call . + To set the value of a property, reflect on the property's parent type using or , retrieve the object from the type, and call . ]]> diff --git a/xml/System.Reflection.Emit/PropertyToken.xml b/xml/System.Reflection.Emit/PropertyToken.xml index 9bccef5812d..1b875c4acd6 100644 --- a/xml/System.Reflection.Emit/PropertyToken.xml +++ b/xml/System.Reflection.Emit/PropertyToken.xml @@ -194,7 +194,7 @@ if is equal to ; otherwise, . - .]]> + .]]> @@ -229,7 +229,7 @@ if is not equal to ; otherwise, . - .]]> + .]]> diff --git a/xml/System.Reflection.Emit/SignatureHelper.xml b/xml/System.Reflection.Emit/SignatureHelper.xml index e246d5f3225..09c18b6376d 100644 --- a/xml/System.Reflection.Emit/SignatureHelper.xml +++ b/xml/System.Reflection.Emit/SignatureHelper.xml @@ -76,7 +76,7 @@ class to create a signature blob that can be passed to the method of the class. A object can also be passed to the method overload to insert an instruction and a signature token into a Microsoft intermediate language (MSIL) stream. For information on signature blobs and signature metadata, see the ECMA Partition II Metadata documentation. + Use the class to create a signature blob that can be passed to the method of the class. A object can also be passed to the method overload to insert an instruction and a signature token into a Microsoft intermediate language (MSIL) stream. For information on signature blobs and signature metadata, see the ECMA Partition II Metadata documentation. For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). @@ -140,7 +140,7 @@ For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https: method overload. + To add an argument with optional or required custom modifiers, use the method overload. ]]> @@ -203,7 +203,7 @@ For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https: method overload. + To add an argument with optional or required custom modifiers, use the method overload. ]]> @@ -993,7 +993,7 @@ For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https: ## Remarks This overload creates a signature with a standard calling convention. - To create a method signature with custom modifiers, use the method overload and then use the or method overloads to add arguments with custom modifiers. + To create a method signature with custom modifiers, use the method overload and then use the or method overloads to add arguments with custom modifiers. ]]> @@ -1082,7 +1082,7 @@ For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https: method overload. + To create a signature helper for a property with optional or required custom modifiers, use the method overload. ]]> @@ -1204,7 +1204,7 @@ For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https: ## Remarks See the namespace for classes that represent custom modifiers. - If a property has no custom modifiers, use the method overload. + If a property has no custom modifiers, use the method overload. ]]> @@ -1347,7 +1347,7 @@ For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https: ## Remarks See the namespace for classes that represent custom modifiers. - If a property has no custom modifiers, use the method overload. + If a property has no custom modifiers, use the method overload. > [!NOTE] > This method overload is introduced in the .NET Framework 3.5 or later. diff --git a/xml/System.Reflection.Emit/SignatureToken.xml b/xml/System.Reflection.Emit/SignatureToken.xml index c30f25b2e49..1dd30038951 100644 --- a/xml/System.Reflection.Emit/SignatureToken.xml +++ b/xml/System.Reflection.Emit/SignatureToken.xml @@ -195,7 +195,7 @@ if is equal to ; otherwise, . - .]]> + .]]> @@ -230,7 +230,7 @@ if is not equal to ; otherwise, . - .]]> + .]]> diff --git a/xml/System.Reflection.Emit/StringToken.xml b/xml/System.Reflection.Emit/StringToken.xml index b56d7d155e6..fa5dc4d17ed 100644 --- a/xml/System.Reflection.Emit/StringToken.xml +++ b/xml/System.Reflection.Emit/StringToken.xml @@ -168,7 +168,7 @@ if is equal to ; otherwise, . - .]]> + .]]> @@ -203,7 +203,7 @@ if is not equal to ; otherwise, . - .]]> + .]]> diff --git a/xml/System.Reflection.Emit/TypeBuilder.xml b/xml/System.Reflection.Emit/TypeBuilder.xml index 551fb287014..816c3f851a0 100644 --- a/xml/System.Reflection.Emit/TypeBuilder.xml +++ b/xml/System.Reflection.Emit/TypeBuilder.xml @@ -399,7 +399,7 @@ The following code sample demonstrates how to build a type dynamically by using Read-only. The full name of this type qualified by the display name of the assembly. ) and the display name of the assembly (), separated by a comma and a space. +The format of the returned string is the concatenation of the full name of the type () and the display name of the assembly (), separated by a comma and a space. See for a description of the format of the display name of an assembly. ]]> @@ -567,18 +567,18 @@ See for a description of the format of the method must be called on the enclosing type before it is called on the nested type. + If this type is a nested type, the method must be called on the enclosing type before it is called on the nested type. - If the current type derives from an incomplete type or implements incomplete interfaces, call the method on the parent type and the interface types before calling it on the current type. + If the current type derives from an incomplete type or implements incomplete interfaces, call the method on the parent type and the interface types before calling it on the current type. - If the enclosing type contains a field that is a value type defined as a nested type (for example, a field that is an enumeration defined as a nested type), calling the method on the enclosing type will generate a event. This is because the loader cannot determine the size of the enclosing type until the nested type has been completed. The caller should define a handler for the event to complete the definition of the nested type by calling on the object that represents the nested type. The code example for this topic shows how to define such an event handler. + If the enclosing type contains a field that is a value type defined as a nested type (for example, a field that is an enumeration defined as a nested type), calling the method on the enclosing type will generate a event. This is because the loader cannot determine the size of the enclosing type until the nested type has been completed. The caller should define a handler for the event to complete the definition of the nested type by calling on the object that represents the nested type. The code example for this topic shows how to define such an event handler. - A type is created only once, no matter how many times the method is called. All calls return the same object. + A type is created only once, no matter how many times the method is called. All calls return the same object. ## Examples - The following code example shows how to define an event handler for the event, in order to call the method on a nested type during a call on the enclosing type. + The following code example shows how to define an event handler for the event, in order to call the method on a nested type during a call on the enclosing type. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/TypeBuilder/CreateType/nestedenum.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/TypeBuilder/CreateType/nestedenum.vb" id="Snippet1"::: @@ -876,9 +876,9 @@ See for a description of the format of the If you define a constructor for your dynamic type, a parameterless constructor is not provided. You have the following options for providing a parameterless constructor in addition to the constructor you defined: -- If you want a parameterless constructor that simply calls the parameterless constructor of the base class, you can use the method to create one (and optionally restrict access to it). Do not provide an implementation for this parameterless constructor. If you do, an exception is thrown when you try to use the constructor. No exception is thrown when the method is called. +- If you want a parameterless constructor that simply calls the parameterless constructor of the base class, you can use the method to create one (and optionally restrict access to it). Do not provide an implementation for this parameterless constructor. If you do, an exception is thrown when you try to use the constructor. No exception is thrown when the method is called. -- If you want a parameterless constructor that does something more than simply calling the parameterless constructor of the base class, or that calls another constructor of the base class, or that does something else entirely, you must use the method to create one, and provide your own implementation. +- If you want a parameterless constructor that does something more than simply calling the parameterless constructor of the base class, or that calls another constructor of the base class, or that does something else entirely, you must use the method to create one, and provide your own implementation. @@ -1765,16 +1765,16 @@ See for a description of the format of the method. + Use this method overload when you do not know the method signature at the time you define the method. For example, the parameter types and return type of a generic method might be specified by the method's generic type parameters, which must be defined after the method has been added to the type. The parameters and return type of the method can be set later using the method. - This method overload defines a method with . If you need to define a method without a signature, with a different calling convention, use the method overload. + This method overload defines a method with . If you need to define a method without a signature, with a different calling convention, use the method overload. ## Examples - The following code example defines a generic method named `DemoMethod` whose parameter type and return type are specified by its generic type parameters. The method is defined without a signature, using the standard calling convention. The method is used to make `DemoMethod` a generic method, and the newly defined type parameters are then used for the signature and return type. + The following code example defines a generic method named `DemoMethod` whose parameter type and return type are specified by its generic type parameters. The method is defined without a signature, using the standard calling convention. The method is used to make `DemoMethod` a generic method, and the newly defined type parameters are then used for the signature and return type. - This code example is part of a larger example provided for the method. + This code example is part of a larger example provided for the method. :::code language="csharp" source="~/snippets/csharp/System.Reflection.Emit/MethodBuilder/DefineGenericParameters/source.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection.Emit/MethodBuilder/DefineGenericParameters/source.vb" id="Snippet4"::: @@ -1850,7 +1850,7 @@ See for a description of the format of the method. + Use this method overload when you do not know the method signature at the time you define the method. For example, the parameter types and return type of a generic method might be specified by the method's generic type parameters, which must be defined after the method has been added to the type. The parameters and return type of the method can be set later using the method. ]]> @@ -2160,7 +2160,7 @@ See for a description of the format of the or method overloads to define the method and then use the method to define the parameter and return types with custom modifiers. + Use this overload if you need to specify custom modifiers. If you need to specify custom modifiers after the method has been created, as you would, for example, with a generic method whose parameter types are specified by its generic type parameters, you can use the or method overloads to define the method and then use the method to define the parameter and return types with custom modifiers. > [!NOTE] > For more information on custom modifiers, see [ECMA C# and Common Language Infrastructure Standards](/dotnet/standard/components#applicable-standards) and [Standard ECMA-335 - Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). @@ -2330,7 +2330,7 @@ See for a description of the format of the ## Remarks Do not use this method to emit method overrides or interface implementations. To override a method of a base class or to implement a method of an interface, simply emit a method with the same name and signature as the method to be overridden or implemented, as demonstrated in the code example. - The method is used when a method body and a method declaration have different names. For example, a class might override a base class method and also provide a separate implementation for an interface member with the same name, as demonstrated in the code example. + The method is used when a method body and a method declaration have different names. For example, a class might override a base class method and also provide a separate implementation for an interface member with the same name, as demonstrated in the code example. `DefineMethodOverride` defines a `methodimpl`, which consists of a pair of metadata tokens. One token points to an implementation, and the other token points to a declaration that the body implements. The body must be defined on the type the method impl is defined on, and the body must be virtual (`Overridable` in Visual Basic). The declaration can be made to a method defined on an interface implemented by the type, a method on a derived class, or a method defined in the type. If the declaration is on an interface only, the slot defined for the interface is altered. If the declaration is made to a method on a base type, the slot for the method is overridden and any duplicates for the overridden method are also replaced. The overridden method cannot be the actual method that is declared. If the method is on the same type, the slot is replaced and any duplicates for the replaced methods are overridden. @@ -2338,12 +2338,12 @@ See for a description of the format of the > For more information about method impls, see `MethodImpl` in the ECMA Partition II Metadata documentation at [ECMA C# and Common Language Infrastructure Standards](/dotnet/standard/components#applicable-standards) and [Standard ECMA-335 - Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). > [!IMPORTANT] -> After the method is called, some features of `methodInfoBody` cannot be changed. For example, you cannot apply an attribute to a generic type parameter of `methodInfoBody` by using the method. If you must use the method, do so after all characteristics of `methodInfoBody` have been defined. +> After the method is called, some features of `methodInfoBody` cannot be changed. For example, you cannot apply an attribute to a generic type parameter of `methodInfoBody` by using the method. If you must use the method, do so after all characteristics of `methodInfoBody` have been defined. ## Examples The following code example contains an interface `I` with a method `M()`, a base class `A` that implements the interface, and a derived class `C` that overrides the base class implementation of `M()` and also provides a separate explicit implementation of `I.M()`. - The `main()` method of the code example shows how to emit the derived class `C`. The override of `A.M()` is accomplished simply by emitting a method `M()` with the same signature. However, to provide a separate implementation of `I.M()`, you must define a method body and then use the method to associate that method body with a representing `I.M()`. The name of the method body does not matter. + The `main()` method of the code example shows how to emit the derived class `C`. The override of `A.M()` is accomplished simply by emitting a method `M()` with the same signature. However, to provide a separate implementation of `I.M()`, you must define a method body and then use the method to associate that method body with a representing `I.M()`. The name of the method body does not matter. The code example creates an instance of the emitted class. It obtains a object for `I.M()`, and uses it to invoke the emitted class's explicit interface implementation. It then obtains a object for `A.M()`, and uses it to invoke the emitted class's override of that method. @@ -2458,11 +2458,11 @@ See for a description of the format of the method has been called on the enclosing type. + This method can be used to create nested types even after the method has been called on the enclosing type. - The nested type needs to be complete before you can reflect on it using , , or . + The nested type needs to be complete before you can reflect on it using , , or . - See the description of for the order in which nested types and nesting types should be completed. + See the description of for the order in which nested types and nesting types should be completed. A duplicate name is not necessarily created if `name` is identical to the name of a previously defined type or nested type. To be duplicates, the full names must be the same, including the namespace and all nesting types. @@ -2532,11 +2532,11 @@ See for a description of the format of the method has been called on the enclosing type. + This method can be used to create nested types even after the method has been called on the enclosing type. - The nested type needs to be complete before you can reflect on it using , , or . + The nested type needs to be complete before you can reflect on it using , , or . - See the description of for the order in which nested types and nesting types should be completed. + See the description of for the order in which nested types and nesting types should be completed. A duplicate name is not necessarily created if `name` is identical to the name of a previously defined type or nested type. To be duplicates, the full names must be the same, including the namespace and all nesting types. @@ -2636,11 +2636,11 @@ See for a description of the format of the method has been called on the enclosing type. + This method can be used to create nested types even after the method has been called on the enclosing type. - The nested type needs to be complete before you can reflect on it using , , or . + The nested type needs to be complete before you can reflect on it using , , or . - See the description of for the order in which nested types and nesting types should be completed. + See the description of for the order in which nested types and nesting types should be completed. A duplicate name is not necessarily created if `name` is identical to the name of a previously defined type or nested type. To be duplicates, the full names must be the same, including the namespace and all nesting types. @@ -2742,11 +2742,11 @@ See for a description of the format of the method has been called on the enclosing type. + This method can be used to create nested types even after the method has been called on the enclosing type. - The nested type needs to be complete before you can reflect on it using , , or . + The nested type needs to be complete before you can reflect on it using , , or . - See the description of for the order in which nested types and nesting types should be completed. + See the description of for the order in which nested types and nesting types should be completed. A duplicate name is not necessarily created if `name` is identical to the name of a previously defined type or nested type. To be duplicates, the full names must be the same, including the namespace and all nesting types. @@ -2848,11 +2848,11 @@ See for a description of the format of the method has been called on the enclosing type. + This method can be used to create nested types even after the method has been called on the enclosing type. - The nested type needs to be complete before you can reflect on it using , , or . + The nested type needs to be complete before you can reflect on it using , , or . - See the description of for the order in which nested types and nesting types should be completed. + See the description of for the order in which nested types and nesting types should be completed. A duplicate name is not necessarily created if `name` is identical to the name of a previously defined type or nested type. To be duplicates, the full names must be the same, including the namespace and all nesting types. @@ -2965,11 +2965,11 @@ See for a description of the format of the method has been called on the enclosing type. + This method can be used to create nested types even after the method has been called on the enclosing type. - The nested type needs to be complete before you can reflect on it using , , or . + The nested type needs to be complete before you can reflect on it using , , or . - See the description of for the order in which nested types and nesting types should be completed. + See the description of for the order in which nested types and nesting types should be completed. A duplicate name is not necessarily created if `name` is identical to the name of a previously defined type or nested type. To be duplicates, the full names must be the same, including the namespace and all nesting types. @@ -3232,7 +3232,7 @@ See for a description of the format of the ## Examples - The following example demonstrates how to use the method to create a `PInvoke` method, and how to add the flag to the method implementation flags after you create the , by using the and methods. + The following example demonstrates how to use the method to create a `PInvoke` method, and how to add the flag to the method implementation flags after you create the , by using the and methods. > [!IMPORTANT] > To get a non-zero return value, you must add the flag. @@ -3359,7 +3359,7 @@ See for a description of the format of the ## Examples - The following code example demonstrates how to use the method to create a `PInvoke` method, and how to add the flag to the method implementation flags after you create the , by using the and methods. + The following code example demonstrates how to use the method to create a `PInvoke` method, and how to add the flag to the method implementation flags after you create the , by using the and methods. > [!IMPORTANT] > To get a non-zero return value, you must add the flag. @@ -3522,7 +3522,7 @@ See for a description of the format of the > For more information on custom modifiers, see [ECMA C# and Common Language Infrastructure Standards](/dotnet/standard/components#applicable-standards) and [Standard ECMA-335 - Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). ## Examples - The following code example demonstrates how to use the method to create a `PInvoke` method, and how to add the flag to the method implementation flags after you create the , by using the and methods. + The following code example demonstrates how to use the method to create a `PInvoke` method, and how to add the flag to the method implementation flags after you create the , by using the and methods. The example creates a dynamic assembly with one dynamic module and a single type, `MyType`, that contains the `PInvoke` method. The `PInvoke` method represents the Win32 `GetTickCount` function. @@ -4712,16 +4712,16 @@ See for a description of the format of the method provides a way to get a object that represents a constructor of a constructed generic type whose generic type definition is represented by a object. + The method provides a way to get a object that represents a constructor of a constructed generic type whose generic type definition is represented by a object. - For example, suppose you have a object that represents the type `G` in C# syntax (`G(Of T)` in Visual Basic) and a object that represents a constructor of `G`. Suppose that `G` has a generic method with type parameter `U` that creates an instance of the constructed type `G`. In order to emit the code to create an instance of the constructed type, you need a object that represents the constructor of this constructed type - in other words, that creates an instance of `G`. To do this, first call the method on the object, specifying the object that represents `U` as the type argument. Then call the method with the return value of the method as parameter `type` and the object that represents the constructor of `G` as parameter `constructor`. The return value is the object you need to emit the function call. The code example demonstrates this scenario. + For example, suppose you have a object that represents the type `G` in C# syntax (`G(Of T)` in Visual Basic) and a object that represents a constructor of `G`. Suppose that `G` has a generic method with type parameter `U` that creates an instance of the constructed type `G`. In order to emit the code to create an instance of the constructed type, you need a object that represents the constructor of this constructed type - in other words, that creates an instance of `G`. To do this, first call the method on the object, specifying the object that represents `U` as the type argument. Then call the method with the return value of the method as parameter `type` and the object that represents the constructor of `G` as parameter `constructor`. The return value is the object you need to emit the function call. The code example demonstrates this scenario. ## Examples The following code example contains source code for a generic class named `Sample` that has a type parameter named `T`. The class has a field named `Field`, of type `T`, and a generic method named `GM` with its own type parameter, named `U`. Method `GM` creates an instance of `Sample`, substituting its own type parameter `U` for the type parameter of `Sample`, and stores its input parameter in `Field`. This source code is compiled but not used; you can view it with the [Ildasm.exe (IL Disassembler)](/dotnet/framework/tools/ildasm-exe-il-disassembler) and compare it to the code emitted by class `Example`. - The code in class `Example` demonstrates the use of the method to emit generic code. The `Main` method of class `Example` creates a dynamic assembly containing a class named `Sample` and uses the method to make it generic by adding a type parameter named `T`. A parameterless constructor and a field named `Field`, of type `T`, are added to class `Sample`. A method `GM` is added and turned into a generic method by using the method. The type parameter of `GM` is named `U`. After the type parameter is defined, the signature of `GM` is added by using the method. There is no return type and no required or custom modifiers, so all the parameters of this method are `null` except `parameterTypes`; `parameterTypes` sets the type of the method's only parameter to `U`, the method's generic type parameter. The body of the method creates an instance of the constructed type `Sample` (`Sample(Of U)` in Visual Basic), assigns the method's parameter to `Field`, and then prints the value of `Field`. The method is used to create a that represents the parameterless constructor of the constructed generic type `Sample` in the instruction that creates the instance. + The code in class `Example` demonstrates the use of the method to emit generic code. The `Main` method of class `Example` creates a dynamic assembly containing a class named `Sample` and uses the method to make it generic by adding a type parameter named `T`. A parameterless constructor and a field named `Field`, of type `T`, are added to class `Sample`. A method `GM` is added and turned into a generic method by using the method. The type parameter of `GM` is named `U`. After the type parameter is defined, the signature of `GM` is added by using the method. There is no return type and no required or custom modifiers, so all the parameters of this method are `null` except `parameterTypes`; `parameterTypes` sets the type of the method's only parameter to `U`, the method's generic type parameter. The body of the method creates an instance of the constructed type `Sample` (`Sample(Of U)` in Visual Basic), assigns the method's parameter to `Field`, and then prints the value of `Field`. The method is used to create a that represents the parameterless constructor of the constructed generic type `Sample` in the instruction that creates the instance. A dummy type is defined to hold the entry-point method `Main`. In the body of `Main`, the static `GM` method is invoked on the constructed generic type `Sample` (`Sample(Of Integer)` in Visual Basic), with type substituted for `U`. @@ -4884,7 +4884,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -5054,7 +5054,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -5122,7 +5122,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -5188,7 +5188,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -5247,7 +5247,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -5325,7 +5325,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -5380,16 +5380,16 @@ See for a description of the format of the method provides a way to get a object that represents a field of a constructed generic type whose generic type definition is represented by a object. + The method provides a way to get a object that represents a field of a constructed generic type whose generic type definition is represented by a object. - For example, suppose you have a object that represents the type `G` in C# syntax (`G(Of T)` in Visual Basic) and a object that represents a field `public T F` in C# syntax (`Public F As T` in Visual Basic) that's defined by `G`. Suppose that `G` has a generic method with type parameter `U` that creates an instance of the constructed type `G` and calls field `F` on that instance. In order to emit the function call, you need a object that represents `F` on the constructed type - in other words, that is of type `U` rather than type `T`. To do this, first call the method on the object, specifying the object that represents `U` as the type argument. Then call the method with the return value of the method as parameter `type` and the object that represents `F` as parameter `field`. The return value is the object you need to emit the function call. The code example demonstrates this scenario. + For example, suppose you have a object that represents the type `G` in C# syntax (`G(Of T)` in Visual Basic) and a object that represents a field `public T F` in C# syntax (`Public F As T` in Visual Basic) that's defined by `G`. Suppose that `G` has a generic method with type parameter `U` that creates an instance of the constructed type `G` and calls field `F` on that instance. In order to emit the function call, you need a object that represents `F` on the constructed type - in other words, that is of type `U` rather than type `T`. To do this, first call the method on the object, specifying the object that represents `U` as the type argument. Then call the method with the return value of the method as parameter `type` and the object that represents `F` as parameter `field`. The return value is the object you need to emit the function call. The code example demonstrates this scenario. ## Examples The following code example contains source code for a generic class named Sample that has a type parameter named `T`. The class has a field named `Field`, of type `T`, and a generic method named `GM` with its own type parameter, named `U`. Method `GM` creates an instance of `Sample`, substituting its own type parameter `U` for the type parameter of `Sample`, and stores its input parameter in `Field`. This source code is compiled but not used; you can view it with the [Ildasm.exe (IL Disassembler)](/dotnet/framework/tools/ildasm-exe-il-disassembler) and compare it to the code emitted by class `Example`. - The code in class `Example` demonstrates the use of the method to emit generic code. The `Main` method of class `Example` creates a dynamic assembly containing a class named `Sample`, and uses the method to make it generic by adding a type parameter named `T`. A parameterless constructor and a field named `Field`, of type `T`, are added to class `Sample`. A method `GM` is added and turned into a generic method by using the method. The type parameter of `GM` is named `U`. After the type parameter is defined, the signature of `GM` is added by using the method. There is no return type and no required or custom modifiers, so all the parameters of this method are `null` except `parameterTypes`; `parameterTypes` sets the type of the method's only parameter to `U`, the method's generic type parameter. The body of the method creates an instance of the constructed type `Sample` (`Sample(Of U)` in Visual Basic), assigns the method's parameter to `Field`, and then prints the value of `Field`. The method is used to create a that represents the field of the constructed generic type `Sample` in the and instructions. + The code in class `Example` demonstrates the use of the method to emit generic code. The `Main` method of class `Example` creates a dynamic assembly containing a class named `Sample`, and uses the method to make it generic by adding a type parameter named `T`. A parameterless constructor and a field named `Field`, of type `T`, are added to class `Sample`. A method `GM` is added and turned into a generic method by using the method. The type parameter of `GM` is named `U`. After the type parameter is defined, the signature of `GM` is added by using the method. There is no return type and no required or custom modifiers, so all the parameters of this method are `null` except `parameterTypes`; `parameterTypes` sets the type of the method's only parameter to `U`, the method's generic type parameter. The body of the method creates an instance of the constructed type `Sample` (`Sample(Of U)` in Visual Basic), assigns the method's parameter to `Field`, and then prints the value of `Field`. The method is used to create a that represents the field of the constructed generic type `Sample` in the and instructions. A dummy type is defined to hold the entry-point method `Main`. In the body of `Main`, the static `GM` method is invoked on the constructed generic type `Sample` (`Sample(Of Integer)` in Visual Basic), with type substituted for `U`. @@ -5468,9 +5468,9 @@ See for a description of the format of the method does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned, because that order can vary. + The method does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned, because that order can vary. - Retrieve the type using or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -5521,7 +5521,7 @@ See for a description of the format of the ## Remarks The elements of the returned array are in the order in which they appear in the list of type parameters for the generic type definition. - A object represents a generic type definition if the method has been used to give it generic type parameters. This method retrieves the objects that represent the generic type parameters. + A object represents a generic type definition if the method has been used to give it generic type parameters. This method retrieves the objects that represent the generic type parameters. For more information on generic types in reflection and a list of the invariant conditions for terms used in generic reflection, see the property. @@ -5605,9 +5605,9 @@ See for a description of the format of the method on a object for which the property returns `true`, the property returns the current instance. A that represents a generic type is always a generic type definition. + If you call the method on a object for which the property returns `true`, the property returns the current instance. A that represents a generic type is always a generic type definition. - If you used the method to construct a generic type from a object that represents a generic type definition, using the method on the constructed type gets back the object that represents the generic type definition. + If you used the method to construct a generic type from a object that represents a generic type definition, using the method on the constructed type gets back the object that represents the generic type definition. ]]> @@ -5682,7 +5682,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -5748,7 +5748,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -5863,7 +5863,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -5926,7 +5926,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -5981,16 +5981,16 @@ See for a description of the format of the method provides a way to get a object that represents a method of a constructed generic type whose generic type definition is represented by a object. + The method provides a way to get a object that represents a method of a constructed generic type whose generic type definition is represented by a object. - For example, suppose you have a object that represents the type `G` in C# syntax (`G(Of T)` in Visual Basic) and a object that represents a method `T M()` in C# syntax (`Function M() As T` in Visual Basic) that is defined by `G`. Suppose that `G` has a generic method with type parameter `U` that creates an instance of the constructed type `G` and calls method `M` on that instance. In order to emit the function call, you need a object that represents `M` on the constructed type - in other words, that returns type `U` rather than type `T`. To do this, first call the method on the object, specifying the object that represents `U` as the type argument. Then call the method with the return value of the method as parameter `type` and the object that represents `T M()` as parameter `method`. The return value is the object you need to emit the function call. The code example demonstrates a scenario similar to this. + For example, suppose you have a object that represents the type `G` in C# syntax (`G(Of T)` in Visual Basic) and a object that represents a method `T M()` in C# syntax (`Function M() As T` in Visual Basic) that is defined by `G`. Suppose that `G` has a generic method with type parameter `U` that creates an instance of the constructed type `G` and calls method `M` on that instance. In order to emit the function call, you need a object that represents `M` on the constructed type - in other words, that returns type `U` rather than type `T`. To do this, first call the method on the object, specifying the object that represents `U` as the type argument. Then call the method with the return value of the method as parameter `type` and the object that represents `T M()` as parameter `method`. The return value is the object you need to emit the function call. The code example demonstrates a scenario similar to this. ## Examples The following code example contains source code for a generic class named `Sample` that has a type parameter named `T`. The class has a field named `Field`, of type `T`, and a generic method named `GM` with its own type parameter, named `U`. Method `GM` creates an instance of `Sample`, substituting its own type parameter `U` for the type parameter of `Sample`, and stores its input parameter in `Field`. This source code is compiled but not used; you can view it with the [Ildasm.exe (IL Disassembler)](/dotnet/framework/tools/ildasm-exe-il-disassembler) and compare it to the code emitted by class `Example`. - The code in class `Example` demonstrates the use of the method to emit generic code. The `Main` method of class `Example` creates a dynamic assembly containing a class named `Sample` and uses the method to make it generic by adding a type parameter named `T`. A parameterless constructor and a field named `Field`, of type `T`, are added to class `Sample`. A method `GM` is added and turned into a generic method by using the method. The type parameter of `GM` is named `U`. After the type parameter is defined, the signature of `GM` is added by using the method. There is no return type and no required or custom modifiers, so all the parameters of this method are `null` except `parameterTypes`; `parameterTypes` sets the type of the method's only parameter to `U`, the method's generic type parameter. The body of the method creates an instance of the constructed type `Sample` (`Sample(Of U)` in Visual Basic), assigns the method's parameter to `Field`, and then prints the value of `Field`. A dummy type is defined to hold the entry-point method `Main`. In the body of `Main`, the static `GM` method is invoked on the constructed generic type `Sample` (`Sample(Of Integer)` in Visual Basic), with type substituted for `U`. The method is used to create a for the static `GM` method of the constructed generic type `Sample`, and the method is then used to create a that can emitted in a method call. + The code in class `Example` demonstrates the use of the method to emit generic code. The `Main` method of class `Example` creates a dynamic assembly containing a class named `Sample` and uses the method to make it generic by adding a type parameter named `T`. A parameterless constructor and a field named `Field`, of type `T`, are added to class `Sample`. A method `GM` is added and turned into a generic method by using the method. The type parameter of `GM` is named `U`. After the type parameter is defined, the signature of `GM` is added by using the method. There is no return type and no required or custom modifiers, so all the parameters of this method are `null` except `parameterTypes`; `parameterTypes` sets the type of the method's only parameter to `U`, the method's generic type parameter. The body of the method creates an instance of the constructed type `Sample` (`Sample(Of U)` in Visual Basic), assigns the method's parameter to `Field`, and then prints the value of `Field`. A dummy type is defined to hold the entry-point method `Main`. In the body of `Main`, the static `GM` method is invoked on the constructed generic type `Sample` (`Sample(Of Integer)` in Visual Basic), with type substituted for `U`. The method is used to create a for the static `GM` method of the constructed generic type `Sample`, and the method is then used to create a that can emitted in a method call. When the code example is run, it saves the emitted assembly as TypeBuilderGetFieldExample.exe. You can run TypeBuilderGetFieldExample.exe, and you can use the [Ildasm.exe (IL Disassembler)](/dotnet/framework/tools/ildasm-exe-il-disassembler) to compare the emitted code with the code for the `Sample` class that is compiled into the code example itself. @@ -6163,7 +6163,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -6235,7 +6235,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. If this type is complete, for example, if `CreateType` has been called on this type, but there are nested types that are not complete, then `GetNestedTypes` will only return those nested types for which `CreateType` has been called. @@ -6298,7 +6298,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. If this type is complete, for example, if `CreateType` has been called on this type, but there are nested types that are not complete, then `GetNestedTypes` will only return those nested types for which `CreateType` has been called. @@ -6359,7 +6359,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -6499,7 +6499,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -6641,7 +6641,7 @@ See for a description of the format of the > [!NOTE] > Access restrictions are ignored for fully trusted code. That is, private constructors, methods, fields, and properties can be accessed and invoked using Reflection whenever the code is fully trusted. - This method is not currently supported. You can retrieve the type using or and use reflection on the retrieved type. + This method is not currently supported. You can retrieve the type using or and use reflection on the retrieved type. ]]> @@ -7006,7 +7006,7 @@ See for a description of the format of the method has been called, the type represented by the object is complete. Exceptions are thrown on any further attempts to add members or change other characteristics of the type. + After the method has been called, the type represented by the object is complete. Exceptions are thrown on any further attempts to add members or change other characteristics of the type. ]]> @@ -7096,7 +7096,7 @@ See for a description of the format of the or and use reflection on the retrieved type. + This method is not supported for incomplete generic type parameters. Retrieve the type using or and use reflection on the retrieved type. ]]> @@ -7228,7 +7228,7 @@ See for a description of the format of the object represents a generic type definition if the method has been used to give it generic type parameters. An instance of the class that is generic is always a generic type definition. + A object represents a generic type definition if the method has been used to give it generic type parameters. An instance of the class that is generic is always a generic type definition. For more information on generic types in reflection and a list of the invariant conditions for terms used in generic reflection, see the property. @@ -7282,9 +7282,9 @@ See for a description of the format of the object represents a generic type definition if the method has been used to give it generic type parameters. An instance of the class that is generic is always a generic type definition. + A object represents a generic type definition if the method has been used to give it generic type parameters. An instance of the class that is generic is always a generic type definition. - A can be used to build generic type definitions, but not constructed generic types. To get a constructed generic type, call the method on a that represents a generic type definition. + A can be used to build generic type definitions, but not constructed generic types. To get a constructed generic type, call the method on a that represents a generic type definition. For more information on generic types in reflection and a list of the invariant conditions for terms used in generic reflection, see the property. @@ -7423,7 +7423,7 @@ See for a description of the format of the , , and properties report the transparency level of the type, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: + The , , and properties report the transparency level of the type, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: |Security level|IsSecurityCritical|IsSecuritySafeCritical|IsSecurityTransparent| |--------------------|------------------------|----------------------------|---------------------------| @@ -7435,7 +7435,7 @@ See for a description of the format of the The runtime begins evaluating transparency levels at the assembly. For example, if the dynamic assembly is security-critical, annotations on types are ignored, and all types are security-critical. - By default, a dynamic assembly inherits the transparency of the assembly that emits it. You can override this default by using the , , or method overload and specifying security attributes. You cannot elevate security levels by doing this; that is, transparent code cannot emit security-critical or security-safe-critical code. Attributes must be specified when the dynamic assembly is created, or they do not take effect until the assembly has been saved to disk and reloaded. + By default, a dynamic assembly inherits the transparency of the assembly that emits it. You can override this default by using the , , or method overload and specifying security attributes. You cannot elevate security levels by doing this; that is, transparent code cannot emit security-critical or security-safe-critical code. Attributes must be specified when the dynamic assembly is created, or they do not take effect until the assembly has been saved to disk and reloaded. > [!NOTE] > Default inheritance is limited to the runtime's evaluation of transparency. No attributes are applied to the dynamic assembly. If you want to add security attributes, you must apply them yourself. @@ -7494,7 +7494,7 @@ See for a description of the format of the , , and properties report the transparency level of the type, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: + The , , and properties report the transparency level of the type, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: |Security level|IsSecurityCritical|IsSecuritySafeCritical|IsSecurityTransparent| |--------------------|------------------------|----------------------------|---------------------------| @@ -7506,7 +7506,7 @@ See for a description of the format of the The runtime begins evaluating transparency levels at the assembly. For example, if the dynamic assembly is security-critical, annotations on types are ignored, and all types are security-critical. - By default, a dynamic assembly inherits the transparency of the assembly that emits it. You can override this default by using the , , or method overload and specifying security attributes. You cannot elevate security levels by doing this; that is, transparent code cannot emit security-critical or security-safe-critical code. Attributes must be specified when the dynamic assembly is created, or they do not take effect until the assembly has been saved to disk and reloaded. + By default, a dynamic assembly inherits the transparency of the assembly that emits it. You can override this default by using the , , or method overload and specifying security attributes. You cannot elevate security levels by doing this; that is, transparent code cannot emit security-critical or security-safe-critical code. Attributes must be specified when the dynamic assembly is created, or they do not take effect until the assembly has been saved to disk and reloaded. > [!NOTE] > Default inheritance is limited to the runtime's evaluation of transparency. No attributes are applied to the dynamic assembly. If you want to add security attributes, you must apply them yourself. @@ -7565,7 +7565,7 @@ See for a description of the format of the , , and properties report the transparency level of the type, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: + The , , and properties report the transparency level of the type, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: |Security level|IsSecurityCritical|IsSecuritySafeCritical|IsSecurityTransparent| |--------------------|------------------------|----------------------------|---------------------------| @@ -7577,7 +7577,7 @@ See for a description of the format of the The runtime begins evaluating transparency levels at the assembly. For example, if the dynamic assembly is security-critical, annotations on types are ignored, and all types are security-critical. - By default, a dynamic assembly inherits the transparency of the assembly that emits it. You can override this default by using the , , or method overload and specifying security attributes. You cannot elevate security levels by doing this; that is, transparent code cannot emit security-critical or security-safe-critical code. Attributes must be specified when the dynamic assembly is created, or they do not take effect until the assembly has been saved to disk and reloaded. + By default, a dynamic assembly inherits the transparency of the assembly that emits it. You can override this default by using the , , or method overload and specifying security attributes. You cannot elevate security levels by doing this; that is, transparent code cannot emit security-critical or security-safe-critical code. Attributes must be specified when the dynamic assembly is created, or they do not take effect until the assembly has been saved to disk and reloaded. > [!NOTE] > Default inheritance is limited to the runtime's evaluation of transparency. No attributes are applied to the dynamic assembly. If you want to add security attributes, you must apply them yourself. @@ -7829,7 +7829,7 @@ See for a description of the format of the method provides a way to generate an array type with any possible element type, including generic types. + The method provides a way to generate an array type with any possible element type, including generic types. @@ -7897,7 +7897,7 @@ See for a description of the format of the method provides a way to generate an array type with any possible element type, including generic types. + The method provides a way to generate an array type with any possible element type, including generic types. @@ -7958,7 +7958,7 @@ See for a description of the format of the method provides a way to generate `ref` types (`ByRef` in Visual Basic) for parameter lists. + The method provides a way to generate `ref` types (`ByRef` in Visual Basic) for parameter lists. > [!NOTE] > Using Microsoft intermediate language (MSIL) syntax, if the current represents `MyType`, then the type returned by this method would be `MyType&`. @@ -8044,11 +8044,11 @@ See for a description of the format of the method before calling the method on a that represents a generic type definition. If the current does not represent the definition of a generic type, an is thrown. + Use this method when your emitted code requires a type constructed from the current generic type definition. It is not necessary to call the method before calling the method on a that represents a generic type definition. If the current does not represent the definition of a generic type, an is thrown. The object returned by this method functions as a placeholder for a constructed generic type in your emitted code. It is an instance of a class derived from that has limited capabilities. In particular: -- To get methods, fields, and constructors for these constructed generic types, use the , , and method overloads. +- To get methods, fields, and constructors for these constructed generic types, use the , , and method overloads. - Two instances that represent the same constructed type do not compare as equal. For example, in the following code `t1.Equals(t2)` returns `false`: @@ -8114,7 +8114,7 @@ See for a description of the format of the method provides a way to generate pointer types for parameter lists. + The method provides a way to generate pointer types for parameter lists. > [!NOTE] > Using Microsoft intermediate language (MSIL) syntax, if the current represents `MyType`, then the type returned by this method would be `MyType*`. @@ -8655,9 +8655,9 @@ For more information on how to format `binaryAttribute`, see [ECMA C# and Common ## Remarks If `parent` is `null`, is used as the base type. - In the .NET Framework versions 1.0 and 1.1, no exception is thrown if `parent` is an interface type, but a is thrown when the method is called. + In the .NET Framework versions 1.0 and 1.1, no exception is thrown if `parent` is an interface type, but a is thrown when the method is called. - The method does not check for most invalid parent types. For example, it does not reject a parent type that has no parameterless constructor when the current type has a parameterless constructor, it does not reject sealed types, and it does not reject the type. In all these cases, exceptions are thrown by the method. + The method does not check for most invalid parent types. For example, it does not reject a parent type that has no parameterless constructor when the current type has a parameterless constructor, it does not reject sealed types, and it does not reject the type. In all these cases, exceptions are thrown by the method. ]]> @@ -9063,7 +9063,7 @@ For more information on how to format `binaryAttribute`, see [ECMA C# and Common or and use reflection on the retrieved type. + Retrieve the type using or and use reflection on the retrieved type. ]]> diff --git a/xml/System.Reflection.Emit/TypeToken.xml b/xml/System.Reflection.Emit/TypeToken.xml index 7b9ac9e4556..f8fc7f57184 100644 --- a/xml/System.Reflection.Emit/TypeToken.xml +++ b/xml/System.Reflection.Emit/TypeToken.xml @@ -201,7 +201,7 @@ if is equal to ; otherwise, . - .]]> + .]]> @@ -236,7 +236,7 @@ if is not equal to ; otherwise, . - .]]> + .]]> diff --git a/xml/System.Reflection.Metadata/MethodBodyBlock.xml b/xml/System.Reflection.Metadata/MethodBodyBlock.xml index 63e220fa4d0..9d79e3ec94a 100644 --- a/xml/System.Reflection.Metadata/MethodBodyBlock.xml +++ b/xml/System.Reflection.Metadata/MethodBodyBlock.xml @@ -33,7 +33,7 @@ method to get a `MethodBodyBlock` instance for the specified method. +The method body contains Common Intermediate Language (CIL) instructions that make up a method and information about its local variables and exception regions. You can use the method to get a `MethodBodyBlock` instance for the specified method. The format of CIL instructions and metadata is defined by the ECMA-335 specification. For more information, see [Standard ECMA-335 - Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/) on the Ecma International Web site. diff --git a/xml/System.Reflection.Metadata/MethodDebugInformation.xml b/xml/System.Reflection.Metadata/MethodDebugInformation.xml index d6b6f761656..cb8c418d76b 100644 --- a/xml/System.Reflection.Metadata/MethodDebugInformation.xml +++ b/xml/System.Reflection.Metadata/MethodDebugInformation.xml @@ -213,9 +213,9 @@ See [MethodDebugInformation Table: 0x31](https://github.com/dotnet/runtime/blob/ A blob encoding sequence points, or a handle whose property is if the method doesn't have sequence points. - method to decode the blob. + Use the method to decode the blob. ]]> diff --git a/xml/System.Reflection.PortableExecutable/CodeViewDebugDirectoryData.xml b/xml/System.Reflection.PortableExecutable/CodeViewDebugDirectoryData.xml index ab76e7ca68e..dfc11c99e78 100644 --- a/xml/System.Reflection.PortableExecutable/CodeViewDebugDirectoryData.xml +++ b/xml/System.Reflection.PortableExecutable/CodeViewDebugDirectoryData.xml @@ -45,7 +45,7 @@ ## Remarks -This structure is returned by a call to the method. +This structure is returned by a call to the method. ]]> diff --git a/xml/System.Reflection/AmbiguousMatchException.xml b/xml/System.Reflection/AmbiguousMatchException.xml index b3f12b3a222..1cad21a3f02 100644 --- a/xml/System.Reflection/AmbiguousMatchException.xml +++ b/xml/System.Reflection/AmbiguousMatchException.xml @@ -89,7 +89,7 @@ ## Remarks `AmbiguousMatchException` uses the HRESULT COR_E_AMBIGUOUSMATCH, which has the value 0x8000211D. - An `AmbiguousMatchException` is thrown when a member is invoked late-bound and multiple overloads satisfy the binding criteria, or when more than one member matches the binding criteria passed to a reflection method that can return only a single result (for example, or ). + An `AmbiguousMatchException` is thrown when a member is invoked late-bound and multiple overloads satisfy the binding criteria, or when more than one member matches the binding criteria passed to a reflection method that can return only a single result (for example, or ). ]]> @@ -158,8 +158,8 @@ |Property|Value| |--------------|-----------| -||`null`| -||The empty string ("").| +||`null`| +||The empty string ("").| ]]> @@ -221,8 +221,8 @@ |Property|Value| |--------------|-----------| -||`null`| -||The `message` string.| +||`null`| +||The `message` string.| ]]> @@ -286,8 +286,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| diff --git a/xml/System.Reflection/Assembly.xml b/xml/System.Reflection/Assembly.xml index 91f9c5e179d..14a2e8399da 100644 --- a/xml/System.Reflection/Assembly.xml +++ b/xml/System.Reflection/Assembly.xml @@ -122,29 +122,29 @@ ## Remarks Use the class to load assemblies, to explore the metadata and constituent parts of assemblies, to discover the types contained in assemblies, and to create instances of those types. - To get an array of objects representing the assemblies currently loaded into an application domain (for example, the default application domain of a simple project), use the method. + To get an array of objects representing the assemblies currently loaded into an application domain (for example, the default application domain of a simple project), use the method. To load assemblies dynamically, the class provides the following static methods (`Shared` methods in Visual Basic). Assemblies are loaded into the application domain where the load operation occurs. -- The recommended way to load assemblies is to use the method, which identifies the assembly to be loaded by its display name (for example, "System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"). The search for the assembly follows the rules described in [How the Runtime Locates Assemblies](/dotnet/framework/deployment/how-the-runtime-locates-assemblies). +- The recommended way to load assemblies is to use the method, which identifies the assembly to be loaded by its display name (for example, "System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"). The search for the assembly follows the rules described in [How the Runtime Locates Assemblies](/dotnet/framework/deployment/how-the-runtime-locates-assemblies). -- The and methods enable you to load an assembly for reflection, but not for execution. For example, an assembly that targets a 64-bit platform can be examined by code that is running on a 32-bit platform. +- The and methods enable you to load an assembly for reflection, but not for execution. For example, an assembly that targets a 64-bit platform can be examined by code that is running on a 32-bit platform. -- The and methods are provided for rare scenarios in which an assembly must be identified by path. +- The and methods are provided for rare scenarios in which an assembly must be identified by path. - To get an object for the currently executing assembly, use the method. + To get an object for the currently executing assembly, use the method. Many members of the class provide information about an assembly. For example: -- The method returns an object that provides access to the parts of the assembly display name. +- The method returns an object that provides access to the parts of the assembly display name. -- The method lists the attributes applied to the assembly. +- The method lists the attributes applied to the assembly. -- The method provides access to the files in the assembly manifest. +- The method provides access to the files in the assembly manifest. -- The method provides the names of the resources in the assembly manifest. +- The method provides the names of the resources in the assembly manifest. - The method lists all the types in the assembly. The method lists the types that are visible to callers outside the assembly. The method can be used to search for a particular type in the assembly. The method can be used to search for and create instances of types in the assembly. + The method lists all the types in the assembly. The method lists the types that are visible to callers outside the assembly. The method can be used to search for a particular type in the assembly. The method can be used to search for and create instances of types in the assembly. For more information on assemblies, see the "Application Domains and Assemblies" section in the [Application Domains](/dotnet/framework/app-domains/application-domains) topic. @@ -153,7 +153,7 @@ ## Examples The following code example shows how to obtain the currently executing assembly, create an instance of a type contained in that assembly, and invoke one of the type's methods with late binding. For this purpose, the code example defines a class named `Example`, with a method named `SampleMethod`. The constructor of the class accepts an integer, which is used to compute the return value of the method. - The code example also demonstrates the use of the method to obtain an object that can be used to parse the full name of the assembly. The example displays the version number of the assembly, the property, and the property. + The code example also demonstrates the use of the method to obtain an object that can be used to parse the full name of the assembly. The example displays the version number of the assembly, the property, and the property. :::code language="csharp" source="~/snippets/csharp/System.Reflection/Assembly/Overview/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/Assembly/Overview/source.vb" id="Snippet1"::: @@ -283,7 +283,7 @@ ## Remarks To get the absolute path to the loaded manifest-containing file, use the property instead. - If the assembly was loaded as a byte array, using an overload of the method that takes an array of bytes, this property returns the location of the caller of the method, not the location of the loaded assembly. + If the assembly was loaded as a byte array, using an overload of the method that takes an array of bytes, this property returns the location of the caller of the method, not the location of the loaded assembly. In .NET 5 and later versions, for bundled assemblies, this property throws an exception. @@ -381,14 +381,14 @@ In .NET 5 and later versions, for bundled assemblies, this property throws an ex - You haven't specified the fully qualified name of the type. -- You've specified the fully qualified type name, but its case doesn't match the case of the type's property. For a case-insensitive comparison of `typeName` with the type's full name, call the overload and specify `true` for the `ignoreCase` argument. +- You've specified the fully qualified type name, but its case doesn't match the case of the type's property. For a case-insensitive comparison of `typeName` with the type's full name, call the overload and specify `true` for the `ignoreCase` argument. - The type doesn't exist in the current instance. ## Examples - The following example defines a `Person` class and calls the method to instantiate it. + The following example defines a `Person` class and calls the method to instantiate it. :::code language="csharp" source="~/snippets/csharp/System.Reflection/Assembly/CreateInstance/createinstance1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/Assembly/CreateInstance/createinstance1.vb" id="Snippet1"::: @@ -499,7 +499,7 @@ In .NET 5 and later versions, for bundled assemblies, this property throws an ex ## Examples - The following example defines a `Person` class. It then calls the method to instantiate it, but because the casing of the `typeName` argument doesn't match that of the type's property, the method returns `null`. When the example passes the same string to the overload and specifies that the comparison should be case-insensitive, the `Person` class is found, and a `Person` object is successfully instantiated. + The following example defines a `Person` class. It then calls the method to instantiate it, but because the casing of the `typeName` argument doesn't match that of the type's property, the method returns `null`. When the example passes the same string to the overload and specifies that the comparison should be case-insensitive, the `Person` class is found, and a `Person` object is successfully instantiated. :::code language="csharp" source="~/snippets/csharp/System.Reflection/Assembly/CreateInstance/createinstance2.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/Assembly/CreateInstance/createinstance2.vb" id="Snippet2"::: @@ -710,7 +710,7 @@ In .NET 5 and later versions, for bundled assemblies, this property throws an ex See for a description of the format of the display name of an assembly. - To accommodate changes in versions of the common language runtime, use this method rather than constructing the qualified name yourself. For information about qualified assembly names, see . + To accommodate changes in versions of the common language runtime, use this method rather than constructing the qualified name yourself. For information about qualified assembly names, see . ]]> @@ -818,7 +818,7 @@ In .NET 5 and later versions, for bundled assemblies, this property throws an ex property is comparable to the method, except that the property returns a collection of objects, and the method returns an array of objects. + The property is comparable to the method, except that the property returns a collection of objects, and the method returns an array of objects. The returned array includes nested types. @@ -940,7 +940,7 @@ In .NET 5 and later versions, for bundled assemblies, this property throws an ex method performs a test for reference equality to determine whether the current instance and `o` are equal. + The method performs a test for reference equality to determine whether the current instance and `o` are equal. ]]> @@ -1170,9 +1170,9 @@ In .NET 5 and later versions, for bundled assemblies, this property throws an ex See for a description of the format of the display name of an assembly. > [!NOTE] -> Writing your own code to parse display names is not recommended. Instead, pass the display name to the constructor, which parses it and populates the appropriate fields of the new . +> Writing your own code to parse display names is not recommended. Instead, pass the display name to the constructor, which parses it and populates the appropriate fields of the new . - In the .NET Framework version 2.0, processor architecture is added to assembly identity, and can be specified as part of assembly name strings. However, it is not included in the string returned by the property, for compatibility reasons. See . + In the .NET Framework version 2.0, processor architecture is added to assembly identity, and can be specified as part of assembly name strings. However, it is not included in the string returned by the property, for compatibility reasons. See . @@ -1315,17 +1315,17 @@ In .NET 5 and later versions, for bundled assemblies, this property throws an ex method is expanded inline by the just-in-time (JIT) compiler, or if its caller is expanded inline, the assembly that is returned by may differ unexpectedly. For example, consider the following methods and assemblies: + If the method that calls the method is expanded inline by the just-in-time (JIT) compiler, or if its caller is expanded inline, the assembly that is returned by may differ unexpectedly. For example, consider the following methods and assemblies: -- Method `M1` in assembly `A1` calls . +- Method `M1` in assembly `A1` calls . - Method `M2` in assembly `A2` calls `M1`. - Method `M3` in assembly `A3` calls `M2`. - When `M1` is not inlined, returns `A2`. When `M1` is inlined, returns `A3`. Similarly, when `M2` is not inlined, returns `A2`. When `M2` is inlined, returns `A3`. + When `M1` is not inlined, returns `A2`. When `M1` is inlined, returns `A3`. Similarly, when `M2` is not inlined, returns `A2`. When `M2` is inlined, returns `A3`. - This effect also occurs when `M1` executes as a tail call from `M2`, or when `M2` executes as a tail call from `M3`. You can prevent the JIT compiler from inlining the method that calls , by applying the attribute with the flag, but there is no similar mechanism for preventing tail calls. + This effect also occurs when `M1` executes as a tail call from `M2`, or when `M2` executes as a tail call from `M3`. You can prevent the JIT compiler from inlining the method that calls , by applying the attribute with the flag, but there is no similar mechanism for preventing tail calls. @@ -1560,7 +1560,7 @@ In .NET 5 and later versions, for bundled assemblies, this property throws an ex and cannot be used in such cases, because they create instances of the attributes. Code in the reflection-only context cannot be executed. For more information and for example code, see the class. + Use this method to examine the custom attributes of code in the reflection-only context, in cases where the custom attributes themselves are defined in code that is loaded into the reflection-only context. Methods like and cannot be used in such cases, because they create instances of the attributes. Code in the reflection-only context cannot be executed. For more information and for example code, see the class. ]]> @@ -1622,9 +1622,9 @@ In .NET 5 and later versions, for bundled assemblies, this property throws an ex ## Remarks - **.NET Framework only:** In the default application domain, this method returns the process executable. In other application domains, this method returns the first executable that was executed by . + **.NET Framework only:** In the default application domain, this method returns the process executable. In other application domains, this method returns the first executable that was executed by . - The method can return `null` when a managed assembly has been loaded from an unmanaged application. For example, if an unmanaged application creates an instance of a COM component written in C#, a call to the method from the C# component returns null, because the entry point for the process was unmanaged code rather than a managed assembly. + The method can return `null` when a managed assembly has been loaded from an unmanaged application. For example, if an unmanaged application creates an instance of a COM component written in C#, a call to the method from the C# component returns null, because the entry point for the process was unmanaged code rather than a managed assembly. ]]> @@ -1688,12 +1688,12 @@ In .NET 5 and later versions, for bundled assemblies, this property throws an ex :::code language="csharp" source="~/snippets/csharp/System.Reflection/Assembly/GetExecutingAssembly/assembly1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/Assembly/GetExecutingAssembly/assembly1.vb" id="Snippet1"::: - To get the assembly that contains the method that called the currently executing code, use . + To get the assembly that contains the method that called the currently executing code, use . ## Examples - The following example uses the property to get the currently executing assembly based on a type contained in that assembly. It also calls the method to show that it returns an object that represents the same assembly. + The following example uses the property to get the currently executing assembly based on a type contained in that assembly. It also calls the method to show that it returns an object that represents the same assembly. :::code language="csharp" source="~/snippets/csharp/System.Reflection/Assembly/GetExecutingAssembly/getexecutingassembly1.cs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/Assembly/GetExecutingAssembly/getexecutingassembly1.vb" id="Snippet5"::: @@ -1758,10 +1758,10 @@ In .NET 5 and later versions, for bundled assemblies, this property throws an ex method. + The only types visible outside an assembly are public types and public types nested within other public types. To retrieve all types within an assembly, including those that are non-public, use the method. ## Examples - The following code sample defines a number of classes with various access levels, and calls to display the ones that are visible from outside the assembly. + The following code sample defines a number of classes with various access levels, and calls to display the ones that are visible from outside the assembly. :::code language="csharp" source="~/snippets/csharp/System.Reflection/Assembly/GetExportedTypes/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/Assembly/GetExportedTypes/source.vb" id="Snippet1"::: @@ -1923,7 +1923,7 @@ In .NET 5 and later versions, for bundled assemblies, this method throws an exce ## Remarks This method works on public and private resource files. - This overload is equivalent to calling the overload and specifying `false`. + This overload is equivalent to calling the overload and specifying `false`. ]]> @@ -2337,13 +2337,13 @@ In .NET 5 and later versions, for bundled assemblies, this method throws an exce ## Remarks You can use each resource name in the array returned by this method as follows: -- You can pass the resource name to the method to get additional information about the resource. +- You can pass the resource name to the method to get additional information about the resource. -- If the name identifies a binary .resources file, you can remove its .resources file extension and pass it to the constructor to instantiate the resource manager. +- If the name identifies a binary .resources file, you can remove its .resources file extension and pass it to the constructor to instantiate the resource manager. -- You can pass the resource name to the method to retrieve a object that you can then pass to the constructor. +- You can pass the resource name to the method to retrieve a object that you can then pass to the constructor. -- You can pass the resource name to the method to retrieve a object that you can then pass to the constructor. +- You can pass the resource name to the method to retrieve a object that you can then pass to the constructor. Resource information is returned only if the resource is visible to the caller, or the caller has . @@ -2427,7 +2427,7 @@ In .NET 5 and later versions, for bundled assemblies, this method throws an exce > [!NOTE] > This method returns `null` if a private resource in another assembly is accessed and the caller does not have with the flag. - If the assembly manifest lists a resource file, returns a object even if the resource file cannot be found on disk at the time. If the resource file is not found, passing the resulting object to the constructor causes an . + If the assembly manifest lists a resource file, returns a object even if the resource file cannot be found on disk at the time. If the resource file is not found, passing the resulting object to the constructor causes an . ]]> @@ -2517,7 +2517,7 @@ Note: In .NET for Win > [!NOTE] > This method returns `null` if a private resource in another assembly is accessed and the caller does not have with the flag. - If the assembly manifest lists a resource file, returns a object even if the resource file cannot be found on disk at the time. If the resource file is not found, passing the resulting object to the constructor causes an . + If the assembly manifest lists a resource file, returns a object even if the resource file cannot be found on disk at the time. If the resource file is not found, passing the resulting object to the constructor causes an . ]]> @@ -2599,7 +2599,7 @@ Note: In .NET for Win Classes in the `Reflection.Emit` namespace emit the scope name for a dynamic module. The scope name can be determined by the property. Pass the kind of module you want to `Assembly.GetModule`. For example, if you want the module that contains the assembly manifest, pass the scope name of the module to `GetModule`. Otherwise, pass the file name of the module. Assemblies loaded by one of the `Load` methods that have a byte[] parameter have only one module, and that is the manifest module. Always seek these modules using the scope name. - A type can be retrieved from a specific module using . Calling `Module.GetType` on the module containing the manifest will not initiate a search of the entire assembly. To retrieve a type from an assembly, regardless of which module it is in, you must call . + A type can be retrieved from a specific module using . Calling `Module.GetType` on the module containing the manifest will not initiate a search of the entire assembly. To retrieve a type from an assembly, regardless of which module it is in, you must call . ]]> @@ -3004,7 +3004,7 @@ Note: In .NET for Win ## Examples - The following code example demonstrates calling the method. This code example is part of a larger example provided for the class. + The following code example demonstrates calling the method. This code example is part of a larger example provided for the class. :::code language="csharp" source="~/snippets/csharp/System.Reflection/Assembly/GetReferencedAssemblies/Reflection.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/Assembly/GetReferencedAssemblies/Reflection.vb" id="Snippet1"::: @@ -3158,7 +3158,7 @@ Note: In .NET for Win ## Remarks Satellite assemblies contain localized resources, as distinct from main application assemblies, which contain non-localizable executable code and resources for a single culture that serve as the default or neutral culture. - Call the overload to use your current assembly version. + Call the overload to use your current assembly version. If `version` is `null`, the current assembly version is used if both the resource and main assemblies are signed. @@ -3283,15 +3283,15 @@ Note: In .NET for Win method overload, which can optionally include an assembly display name as part of the type name. + This method only searches the current assembly instance. The `name` parameter includes the namespace but not the assembly. To search other assemblies for a type, use the method overload, which can optionally include an assembly display name as part of the type name. - In .NET Core/.NET 5+, if there are assembly-qualified generic type parameters in the type name string, those assembly references will be loaded by the of the method that called Assembly.GetType, or by the context if it's set. + In .NET Core/.NET 5+, if there are assembly-qualified generic type parameters in the type name string, those assembly references will be loaded by the of the method that called Assembly.GetType, or by the context if it's set. > [!NOTE] > If the type has been forwarded to another assembly, it is still returned by this method. For information on type forwarding, see [Type Forwarding in the Common Language Runtime](/dotnet/standard/assembly/type-forwarding). ## Examples - The following example defines an abstract `MeansOfTransportation` class in the `Transportation` namespace. It calls the method to retrieve its object, calls the method to get an array of objects that represent the type's properties, and then displays information on the type's abstract properties. Note that the call to the method uses the type's fully qualified name (that is, its namespace along with its type name). + The following example defines an abstract `MeansOfTransportation` class in the `Transportation` namespace. It calls the method to retrieve its object, calls the method to get an array of objects that represent the type's properties, and then displays information on the type's abstract properties. Note that the call to the method uses the type's fully qualified name (that is, its namespace along with its type name). :::code language="csharp" source="~/snippets/csharp/System.Reflection/Assembly/GetType/gettype1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/Assembly/GetType/gettype1.vb" id="Snippet1"::: @@ -3390,9 +3390,9 @@ Note: In .NET for Win method overload, which can optionally include an assembly display name as part of the type name. + This method only searches the current assembly instance. The `name` parameter includes the namespace but not the assembly. To search other assemblies for a type, use the method overload, which can optionally include an assembly display name as part of the type name. - In .NET Core/.NET 5+, if there are assembly-qualified generic type parameters in the type name string, those assembly references will be loaded by the of the method that called Assembly.GetType, or by the context if it's set. + In .NET Core/.NET 5+, if there are assembly-qualified generic type parameters in the type name string, those assembly references will be loaded by the of the method that called Assembly.GetType, or by the context if it's set. > [!NOTE] > If the type has been forwarded to another assembly, it is still returned by this method. For information on type forwarding, see [Type Forwarding in the Common Language Runtime](/dotnet/standard/assembly/type-forwarding). @@ -3498,9 +3498,9 @@ Note: In .NET for Win method overload, which can optionally include an assembly display name as part of the type name. + This method only searches the current assembly instance. The `name` parameter includes the namespace but not the assembly. To search other assemblies for a type, use the method overload, which can optionally include an assembly display name as part of the type name. - In .NET Core/.NET 5+, if there are assembly-qualified generic type parameters in the type name string, those assembly references will be loaded by the of the method that called Assembly.GetType, or by the context if it's set. + In .NET Core/.NET 5+, if there are assembly-qualified generic type parameters in the type name string, those assembly references will be loaded by the of the method that called Assembly.GetType, or by the context if it's set. > [!NOTE] > If the type has been forwarded to another assembly, it is still returned by this method. For information on type forwarding, see [Type Forwarding in the Common Language Runtime](/dotnet/standard/assembly/type-forwarding). @@ -3588,9 +3588,9 @@ Note: In .NET for Win method. + The returned array includes nested and non-public types. To retrieve only public types, use the method. - If the method is called on an assembly and a type in that assembly is dependent on a type in an assembly that has not been loaded (for example, if it derives from a type in the second assembly), a is thrown. For example, this can happen if the first assembly was loaded with the or methods, and the second assembly was not loaded. It can also happen with assemblies loaded using the and methods if the second assembly cannot be located when the method is called. + If the method is called on an assembly and a type in that assembly is dependent on a type in an assembly that has not been loaded (for example, if it derives from a type in the second assembly), a is thrown. For example, this can happen if the first assembly was loaded with the or methods, and the second assembly was not loaded. It can also happen with assemblies loaded using the and methods if the second assembly cannot be located when the method is called. > [!NOTE] > If a type has been forwarded to another assembly, it is not included in the returned array. For information on type forwarding, see [Type Forwarding in the Common Language Runtime](/dotnet/standard/assembly/type-forwarding). @@ -3784,7 +3784,7 @@ This property is marked obsolete starting in .NET 5, and generates a compile-tim ## Remarks For example, the value for the .NET Framework version 1.1 would be v1.1.4322. The binary files for that version would be located in the path %windir%\Microsoft.NET\Framework\v1.1.4322. - By default, is set to the version of the CLR used to build the assembly. However, it might have been set to another value at compile time. + By default, is set to the version of the CLR used to build the assembly. However, it might have been set to another value at compile time. ]]> @@ -3893,7 +3893,7 @@ This property is marked obsolete starting in .NET 5, and generates a compile-tim attribute to an assembly and then uses to indicate whether it was applied. It also tests an attribute that was not applied. + The following code example applies the attribute to an assembly and then uses to indicate whether it was applied. It also tests an attribute that was not applied. :::code language="csharp" source="~/snippets/csharp/System.Reflection/Assembly/IsDefined/isdefined.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/Assembly/IsDefined/isdefined.vb" id="Snippet1"::: @@ -4088,7 +4088,7 @@ This property is marked obsolete starting in .NET 5, and generates a compile-tim This method overload always creates a new object in its own isolated load context. - **.NET Framework only:** The trust level of an assembly that is loaded by using this method is the same as the trust level of the calling assembly. To load an assembly from a byte array with the trust level of the application domain, use the method overload. For more information about the use of evidence with overloads of the method that take byte arrays, see the method overload. + **.NET Framework only:** The trust level of an assembly that is loaded by using this method is the same as the trust level of the calling assembly. To load an assembly from a byte array with the trust level of the application domain, use the method overload. For more information about the use of evidence with overloads of the method that take byte arrays, see the method overload. ]]> @@ -4159,16 +4159,16 @@ This property is marked obsolete starting in .NET 5, and generates a compile-tim ## Remarks - In .NET Core/.NET 5+, the target assembly will be loaded into the current or into the context if it's set. For more information on assembly loading, see [Managed assembly loading algorithm](/dotnet/core/dependency-loading/loading-managed#algorithm). + In .NET Core/.NET 5+, the target assembly will be loaded into the current or into the context if it's set. For more information on assembly loading, see [Managed assembly loading algorithm](/dotnet/core/dependency-loading/loading-managed#algorithm). > [!NOTE] > **.NET Framework only:** For information about loading assemblies from remote locations, see [``](/dotnet/framework/configure-apps/file-schema/runtime/loadfromremotesources-element). > [!NOTE] -> **.NET Framework only:** Do not use an with only the property set. The property does not supply any elements of the assembly identity (such as name or version), so loading does not occur according to load-by-identity rules, as you would expect from the method. Instead, the assembly is loaded using load-from rules. For information about the disadvantages of using the load-from context, see the method overload or [Best Practices for Assembly Loading](/dotnet/framework/deployment/best-practices-for-assembly-loading). +> **.NET Framework only:** Do not use an with only the property set. The property does not supply any elements of the assembly identity (such as name or version), so loading does not occur according to load-by-identity rules, as you would expect from the method. Instead, the assembly is loaded using load-from rules. For information about the disadvantages of using the load-from context, see the method overload or [Best Practices for Assembly Loading](/dotnet/framework/deployment/best-practices-for-assembly-loading). > [!NOTE] -> **.NET Framework only:** If both the property and the property are set, the first attempt to load the assembly uses the display name (including version, culture, and so on, as returned by the property). If the file is not found, is used to search for the assembly. If the assembly is found using , the display name is matched against the assembly. If the match fails, a is thrown. +> **.NET Framework only:** If both the property and the property are set, the first attempt to load the assembly uses the display name (including version, culture, and so on, as returned by the property). If the file is not found, is used to search for the assembly. If the assembly is found using , the display name is matched against the assembly. If the match fails, a is thrown. ## Examples The following example instantiates an object and uses it to load the `sysglobal.dll` assembly. The example then displays the full name of the assembly's public types. @@ -4254,7 +4254,7 @@ Note: In .NET for Win ## Remarks - In .NET Core/.NET 5+, the target assembly will be loaded into the current or into the context if it's set. For more information on assembly loading, see [Managed assembly loading algorithm](/dotnet/core/dependency-loading/loading-managed#algorithm). + In .NET Core/.NET 5+, the target assembly will be loaded into the current or into the context if it's set. For more information on assembly loading, see [Managed assembly loading algorithm](/dotnet/core/dependency-loading/loading-managed#algorithm). To load the correct assembly, it's recommended to call the `Load` method by passing the long form of the assembly name. The long form of an assembly name consists of its simple name (such as "System" for the System.dll assembly) along with its version, culture, public key token, and optionally its processor architecture. It corresponds to the assembly's property. The following example illustrates the use of a long name to load the System.dll assembly for .NET Framework 4: @@ -4263,7 +4263,7 @@ To load the correct assembly, it's recommended to call the `Load` method by pass is thrown if `assemblyString` specifies the full assembly name, and the first assembly that matches the simple name has a different version, culture, or public key token. The loader does not continue probing for other assemblies that match the simple name. - In the .NET Framework version 2.0, processor architecture is added to assembly identity, and can be specified as part of assembly name strings. For example, "ProcessorArchitecture=msil". However, the recommended way to specify an assembly name is to create an object and pass it to an appropriate overload of the method. See . + In the .NET Framework version 2.0, processor architecture is added to assembly identity, and can be specified as part of assembly name strings. For example, "ProcessorArchitecture=msil". However, the recommended way to specify an assembly name is to create an object and pass it to an appropriate overload of the method. See . @@ -4365,7 +4365,7 @@ In .NET Core/5+, the target assembly is loaded into the current object in its own isolated load context. - **.NET Framework only:** The trust level of an assembly that is loaded by using this method is the same as the trust level of the calling assembly. To load an assembly from a byte array with the trust level of the application domain, use the method overload. For more information about the use of evidence with overloads of the method that take byte arrays, see the method overload. + **.NET Framework only:** The trust level of an assembly that is loaded by using this method is the same as the trust level of the calling assembly. To load an assembly from a byte array with the trust level of the application domain, use the method overload. For more information about the use of evidence with overloads of the method that take byte arrays, see the method overload. ]]> @@ -4430,22 +4430,22 @@ In .NET Core/5+, the target assembly is loaded into the current `](/dotnet/framework/configure-apps/file-schema/runtime/loadfromremotesources-element) for loading assemblies from remote locations. > [!NOTE] -> Do not use an with only the property set. The property does not supply any elements of the assembly identity (such as name or version), so loading does not occur according to load-by-identity rules, as you would expect from the method. Instead, the assembly is loaded using load-from rules. For information about the disadvantages of using the load-from context, see the method overload or [Best Practices for Assembly Loading](/dotnet/framework/deployment/best-practices-for-assembly-loading). +> Do not use an with only the property set. The property does not supply any elements of the assembly identity (such as name or version), so loading does not occur according to load-by-identity rules, as you would expect from the method. Instead, the assembly is loaded using load-from rules. For information about the disadvantages of using the load-from context, see the method overload or [Best Practices for Assembly Loading](/dotnet/framework/deployment/best-practices-for-assembly-loading). Whether certain permissions are granted or not granted to an assembly is based on evidence. The rules for assembly and security evidence merging are as follows: -- When you use a method with no parameter, the assembly is loaded with the evidence that the loader supplies. +- When you use a method with no parameter, the assembly is loaded with the evidence that the loader supplies. -- When you use a method with an parameter, pieces of evidence are merged. Pieces of evidence supplied as an argument to the method supersede pieces of evidence supplied by the loader. +- When you use a method with an parameter, pieces of evidence are merged. Pieces of evidence supplied as an argument to the method supersede pieces of evidence supplied by the loader. -- When you use a method overload with a `Byte[]` parameter to load a common object file format (COFF) image, evidence is inherited from the calling assembly. +- When you use a method overload with a `Byte[]` parameter to load a common object file format (COFF) image, evidence is inherited from the calling assembly. -- When you use a method with a `Byte[]` parameter and to load a COFF image, only the supplied evidence is used. Evidence of the calling assembly and evidence of the COFF image is ignored. +- When you use a method with a `Byte[]` parameter and to load a COFF image, only the supplied evidence is used. Evidence of the calling assembly and evidence of the COFF image is ignored. > [!NOTE] -> If both the property and the property are set, the first attempt to load the assembly uses the display name (including version, culture, and so on, as returned by the property). If the file is not found, is used to search for the assembly. If the assembly is found using , the display name is matched against the assembly. If the match fails, a is thrown. +> If both the property and the property are set, the first attempt to load the assembly uses the display name (including version, culture, and so on, as returned by the property). If the file is not found, is used to search for the assembly. If the assembly is found using , the display name is matched against the assembly. If the match fails, a is thrown. - If you call the method more than once on the same assembly but with a different evidence specified, the common language runtime does not throw a because the equality and integrity of the different evidence specifications cannot be determined. The evidence that first succeeds is the evidence that is used. + If you call the method more than once on the same assembly but with a different evidence specified, the common language runtime does not throw a because the equality and integrity of the different evidence specifications cannot be determined. The evidence that first succeeds is the evidence that is used. ]]> @@ -4518,17 +4518,17 @@ In .NET Core/5+, the target assembly is loaded into the current method with no parameter, the assembly is loaded with the evidence that the loader supplies. +- When you use a method with no parameter, the assembly is loaded with the evidence that the loader supplies. -- When you use a method with an parameter, pieces of evidence are merged. Pieces of evidence supplied as an argument to the method supersede pieces of evidence supplied by the loader. +- When you use a method with an parameter, pieces of evidence are merged. Pieces of evidence supplied as an argument to the method supersede pieces of evidence supplied by the loader. -- When you use a method overload with a `Byte[]` parameter to load a common object file format (COFF) image, evidence is inherited from the calling assembly. +- When you use a method overload with a `Byte[]` parameter to load a common object file format (COFF) image, evidence is inherited from the calling assembly. -- When you use a method with a `Byte[]` parameter and to load a COFF image, only the supplied evidence is used. Evidence of the calling assembly and evidence of the COFF image is ignored. +- When you use a method with a `Byte[]` parameter and to load a COFF image, only the supplied evidence is used. Evidence of the calling assembly and evidence of the COFF image is ignored. If you call this method more than once on the same assembly but with a different evidence specified, the common language runtime does not throw a because the equality and integrity of the different evidence specifications cannot be determined. The evidence that first succeeds is the evidence that is used. - In the .NET Framework version 2.0, processor architecture is added to assembly identity, and can be specified as part of assembly name strings. For example, "ProcessorArchitecture=msil". However, the recommended way to specify an assembly name is to create an object and pass it to an appropriate overload of the method. See . + In the .NET Framework version 2.0, processor architecture is added to assembly identity, and can be specified as part of assembly name strings. For example, "ProcessorArchitecture=msil". However, the recommended way to specify an assembly name is to create an object and pass it to an appropriate overload of the method. See . ]]> @@ -4606,15 +4606,15 @@ The assembly is loaded using the supplied evidence. The raw bytes representing t Whether certain permissions are granted or not granted to an assembly is based on evidence. The rules for assembly and security evidence merging are as follows: -- When you use a method with no parameter, the assembly is loaded with the evidence that the loader supplies. +- When you use a method with no parameter, the assembly is loaded with the evidence that the loader supplies. -- When you use a method with an parameter, pieces of evidence are merged. Pieces of evidence supplied as an argument to the method supersede pieces of evidence supplied by the loader. +- When you use a method with an parameter, pieces of evidence are merged. Pieces of evidence supplied as an argument to the method supersede pieces of evidence supplied by the loader. -- When you use a method overload with a `Byte[]` parameter to load a COFF image, evidence is inherited from the calling assembly. +- When you use a method overload with a `Byte[]` parameter to load a COFF image, evidence is inherited from the calling assembly. -- When you use a method with a `Byte[]` parameter and to load a COFF image, only the supplied evidence is used. Evidence of the calling assembly and evidence of the COFF image are ignored. +- When you use a method with a `Byte[]` parameter and to load a COFF image, only the supplied evidence is used. Evidence of the calling assembly and evidence of the COFF image are ignored. - If you call the method more than once on the same assembly but with a different evidence specified, the common language runtime does not throw a because the equality and integrity of the different evidence specifications cannot be determined. The evidence that first succeeds is the evidence that is used. + If you call the method more than once on the same assembly but with a different evidence specified, the common language runtime does not throw a because the equality and integrity of the different evidence specifications cannot be determined. The evidence that first succeeds is the evidence that is used. ]]> @@ -4760,7 +4760,7 @@ The assembly is loaded using the supplied evidence. The raw bytes representing t The assembly is loaded into a new AssemblyLoadContext created for this purpose. For more information on assembly loading, see [Managed assembly loading algorithm](/dotnet/core/dependency-loading/loading-managed#algorithm"). - Use the method to load and examine assemblies that have the same identity, but are located in different paths. does not load files into the load-from context, and does not resolve dependencies using the load path, as the method does. is useful in this limited scenario because cannot be used to load assemblies that have the same identities but different paths; it will load only the first such assembly. + Use the method to load and examine assemblies that have the same identity, but are located in different paths. does not load files into the load-from context, and does not resolve dependencies using the load path, as the method does. is useful in this limited scenario because cannot be used to load assemblies that have the same identities but different paths; it will load only the first such assembly. **.NET Framework only:** See [``](/dotnet/framework/configure-apps/file-schema/runtime/loadfromremotesources-element) for loading assemblies from remote locations. @@ -4828,7 +4828,7 @@ The assembly is loaded into a new AssemblyLoadContext created for this purpose. method to load and examine assemblies that have the same identity, but are located in different paths. does not load files into the context, and does not resolve dependencies using the load path, as the method does. is useful in this limited scenario because cannot be used to load assemblies that have the same identities but different paths; it will load only the first such assembly. + Use the method to load and examine assemblies that have the same identity, but are located in different paths. does not load files into the context, and does not resolve dependencies using the load path, as the method does. is useful in this limited scenario because cannot be used to load assemblies that have the same identities but different paths; it will load only the first such assembly. See [``](/dotnet/framework/configure-apps/file-schema/runtime/loadfromremotesources-element) for loading assemblies from remote locations. @@ -4942,29 +4942,29 @@ The assembly is loaded into the default AssemblyLoadContext. For more informatio **.NET Framework only:** Assemblies can be loaded into one of three contexts, or can be loaded without context: -- The load context contains assemblies found by probing: in the GAC, in a host assembly store if the runtime is hosted, or in the and of the application domain. Most overloads of the method load assemblies into this context. +- The load context contains assemblies found by probing: in the GAC, in a host assembly store if the runtime is hosted, or in the and of the application domain. Most overloads of the method load assemblies into this context. -- The load-from context contains assemblies for which the user provided a path not included in the directories searched by probing. It also allows dependencies on that path to be found and loaded because the path information is maintained by the context. , , and are examples of methods that load by path. +- The load-from context contains assemblies for which the user provided a path not included in the directories searched by probing. It also allows dependencies on that path to be found and loaded because the path information is maintained by the context. , , and are examples of methods that load by path. See [``](/dotnet/framework/configure-apps/file-schema/runtime/loadfromremotesources-element) for loading assemblies from remote locations. -- The reflection-only context contains assemblies loaded with the and methods; code in these contexts cannot be executed. +- The reflection-only context contains assemblies loaded with the and methods; code in these contexts cannot be executed. -- If the user generated or found the assembly, it is not in any context. This applies to assemblies loaded using overloads of the method that specify a byte array containing an assembly, and to transient dynamic assemblies created with reflection emit and not saved to disk. +- If the user generated or found the assembly, it is not in any context. This applies to assemblies loaded using overloads of the method that specify a byte array containing an assembly, and to transient dynamic assemblies created with reflection emit and not saved to disk. - The method has the following disadvantages. Consider using instead. + The method has the following disadvantages. Consider using instead. -- If an assembly with the same identity is already loaded in the load-from context, returns the loaded assembly even if a different path was specified. +- If an assembly with the same identity is already loaded in the load-from context, returns the loaded assembly even if a different path was specified. - An assembly can be loaded in the load-from context even though an assembly with the same identity exists in the load context. Interoperability between the two assemblies will not work, leading to errors such as , , or other unexpected behavior. -- Calling with a location that's in the probing path will load the assembly in the load context and not in the load-from context. +- Calling with a location that's in the probing path will load the assembly in the load context and not in the load-from context. -- If an assembly file whose identity is goverened by a binding redirect policy is passed to , the policy will be applied and the assembly will be loaded from the probing path in the load context. +- If an assembly file whose identity is goverened by a binding redirect policy is passed to , the policy will be applied and the assembly will be loaded from the probing path in the load context. - If an assembly is loaded in the load-from context, and later an assembly in the load context attempts to load the same assembly by display name, the load attempt fails. This can occur when an assembly is deserialized. -- demands and , or , on the specified path. +- demands and , or , on the specified path. - If a native image exists for `assemblyFile`, it is not used. The assembly cannot be loaded as domain neutral. @@ -5051,41 +5051,41 @@ The assembly is loaded into the default AssemblyLoadContext. For more informatio Assemblies can be loaded into one of three contexts, or can be loaded without context: -- The load context contains assemblies found by probing: in the GAC, in a host assembly store if the runtime is hosted, or in the and of the application domain. Most overloads of the method load assemblies into this context. +- The load context contains assemblies found by probing: in the GAC, in a host assembly store if the runtime is hosted, or in the and of the application domain. Most overloads of the method load assemblies into this context. -- The load-from context contains assemblies for which the user provided a path not included in the directories searched by probing. , , and are examples of methods that load by path. +- The load-from context contains assemblies for which the user provided a path not included in the directories searched by probing. , , and are examples of methods that load by path. See [``](/dotnet/framework/configure-apps/file-schema/runtime/loadfromremotesources-element) for loading assemblies from remote locations. -- The reflection-only context contains assemblies loaded with the and methods; code in these contexts cannot be executed. +- The reflection-only context contains assemblies loaded with the and methods; code in these contexts cannot be executed. -- If the user generated or found the assembly, it is not in any context. This applies to assemblies loaded using overloads of the method that specify a byte array containing an assembly, and to transient dynamic assemblies created with reflection emit and not saved to disk. +- If the user generated or found the assembly, it is not in any context. This applies to assemblies loaded using overloads of the method that specify a byte array containing an assembly, and to transient dynamic assemblies created with reflection emit and not saved to disk. The load-from context allows an assembly to be loaded from a path not included in probing, and yet allows dependencies on that path to be found and loaded because the path information is maintained by the context. - The method has the following disadvantages. Consider using instead. + The method has the following disadvantages. Consider using instead. -- If an assembly with the same identity is already loaded, returns the loaded assembly even if a different path was specified. +- If an assembly with the same identity is already loaded, returns the loaded assembly even if a different path was specified. -- If an assembly is loaded with , and later an assembly in the load context attempts to load the same assembly by display name, the load attempt fails. This can occur when an assembly is deserialized. +- If an assembly is loaded with , and later an assembly in the load context attempts to load the same assembly by display name, the load attempt fails. This can occur when an assembly is deserialized. -- If an assembly is loaded with , and the probing path includes an assembly with the same identity but a different location, an , , or other unexpected behavior can occur. +- If an assembly is loaded with , and the probing path includes an assembly with the same identity but a different location, an , , or other unexpected behavior can occur. -- demands and , or , on the specified path. +- demands and , or , on the specified path. - If a native image exists for `assemblyFile`, it is not used. The assembly cannot be loaded as domain neutral. Whether certain permissions are granted or not granted to an assembly is based on evidence. The rules for assembly and security evidence merging are as follows: -- When you use a method with no parameter, the assembly is loaded with the evidence that the loader supplies. +- When you use a method with no parameter, the assembly is loaded with the evidence that the loader supplies. -- When you use a method with an parameter, pieces of evidence are merged. Pieces of evidence supplied as an argument to the method supersede pieces of evidence supplied by the loader. +- When you use a method with an parameter, pieces of evidence are merged. Pieces of evidence supplied as an argument to the method supersede pieces of evidence supplied by the loader. - If you call this method more than once on the same assembly but with a different evidence specified, the common language runtime does not throw a because the equality and integrity of the different evidence specifications cannot be determined. The evidence that first succeeds is the evidence that is used. -- When you use a method with a `Byte[]` parameter to load a common object file format (COFF) image, evidence is combined. `Zone`, `Url` and `Site` are inherited from the calling assembly, and `Hash` and `StrongName` are taken from the COFF assembly. +- When you use a method with a `Byte[]` parameter to load a common object file format (COFF) image, evidence is combined. `Zone`, `Url` and `Site` are inherited from the calling assembly, and `Hash` and `StrongName` are taken from the COFF assembly. -- When you use a method with a `Byte[]` parameter and to load a COFF image, only the supplied evidence is used. Evidence of the calling assembly and evidence of the COFF image is ignored. +- When you use a method with a `Byte[]` parameter and to load a COFF image, only the supplied evidence is used. Evidence of the calling assembly and evidence of the COFF image is ignored. ]]> @@ -5186,7 +5186,7 @@ The assembly is loaded into the default AssemblyLoadContext. For more informatio ## Remarks - This API is not supported in .NET Core/.NET 5+. This method throws when called. Use instead. + This API is not supported in .NET Core/.NET 5+. This method throws when called. Use instead. The `assemblyFile` parameter must refer to a URI without escape characters. This method supplies escape characters for all invalid characters in the URI. @@ -5197,27 +5197,27 @@ The assembly is loaded into the default AssemblyLoadContext. For more informatio Assemblies can be loaded into one of three contexts, or can be loaded without context: -- The load context contains assemblies found by probing: in the global assembly cache, in a host assembly store if the runtime is hosted, or in the and of the application domain. Most overloads of the method load assemblies into this context. +- The load context contains assemblies found by probing: in the global assembly cache, in a host assembly store if the runtime is hosted, or in the and of the application domain. Most overloads of the method load assemblies into this context. -- The load-from context contains assemblies for which the user provided a path that is not included in probing. , , and are examples of methods that load by path. +- The load-from context contains assemblies for which the user provided a path that is not included in probing. , , and are examples of methods that load by path. See [``](/dotnet/framework/configure-apps/file-schema/runtime/loadfromremotesources-element) for loading assemblies from remote locations. -- The reflection-only context contains assemblies loaded with the and methods; code in these contexts cannot be executed. +- The reflection-only context contains assemblies loaded with the and methods; code in these contexts cannot be executed. -- If the user generated or found the assembly, it is not in any context. This applies to assemblies loaded using overloads of the method that specify a byte array containing an assembly, and to transient dynamic assemblies created with reflection emit and not saved to disk. +- If the user generated or found the assembly, it is not in any context. This applies to assemblies loaded using overloads of the method that specify a byte array containing an assembly, and to transient dynamic assemblies created with reflection emit and not saved to disk. The load-from context allows an assembly to be loaded from a path that is not included in probing, and yet allows dependencies on that path to be found and loaded because the path information is maintained by the context. - The method has the following disadvantages. Consider using instead. + The method has the following disadvantages. Consider using instead. -- If an assembly with the same identity is already loaded, returns the loaded assembly even if a different path was specified. +- If an assembly with the same identity is already loaded, returns the loaded assembly even if a different path was specified. -- If an assembly is loaded with , and later an assembly in the load context attempts to load the same assembly by display name, the load attempt fails. This can occur when an assembly is deserialized. +- If an assembly is loaded with , and later an assembly in the load context attempts to load the same assembly by display name, the load attempt fails. This can occur when an assembly is deserialized. -- If an assembly is loaded with , and the probing path includes an assembly with the same identity but a different location, an , , or other unexpected behavior can occur. +- If an assembly is loaded with , and the probing path includes an assembly with the same identity but a different location, an , , or other unexpected behavior can occur. -- demands and , or , on the specified path. +- demands and , or , on the specified path. - If a native image exists for `assemblyFile`, it is not used. The assembly cannot be loaded as domain-neutral. @@ -5305,41 +5305,41 @@ The assembly is loaded into the default AssemblyLoadContext. For more informatio Assemblies can be loaded into one of three contexts, or can be loaded without context: -- The load context contains assemblies found by probing: in the GAC, in a host assembly store if the runtime is hosted, or in the and of the application domain. Most overloads of the method load assemblies into this context. +- The load context contains assemblies found by probing: in the GAC, in a host assembly store if the runtime is hosted, or in the and of the application domain. Most overloads of the method load assemblies into this context. -- The load-from context contains assemblies for which the user provided a path not included in the directories searched by probing. , , and are examples of methods that load by path. +- The load-from context contains assemblies for which the user provided a path not included in the directories searched by probing. , , and are examples of methods that load by path. See [``](/dotnet/framework/configure-apps/file-schema/runtime/loadfromremotesources-element) for loading assemblies from remote locations. -- The reflection-only context contains assemblies loaded with the and methods; code in these contexts cannot be executed. +- The reflection-only context contains assemblies loaded with the and methods; code in these contexts cannot be executed. -- If the user generated or found the assembly, it is not in any context. This applies to assemblies loaded using overloads of the method that specify a byte array containing an assembly, and to transient dynamic assemblies created with reflection emit and not saved to disk. +- If the user generated or found the assembly, it is not in any context. This applies to assemblies loaded using overloads of the method that specify a byte array containing an assembly, and to transient dynamic assemblies created with reflection emit and not saved to disk. The load-from context allows an assembly to be loaded from a path not included in probing, and yet allows dependencies on that path to be found and loaded because the path information is maintained by the context. - The method has the following disadvantages. Consider using instead. + The method has the following disadvantages. Consider using instead. -- If an assembly with the same identity is already loaded, returns the loaded assembly even if a different path was specified. +- If an assembly with the same identity is already loaded, returns the loaded assembly even if a different path was specified. -- If an assembly is loaded with , and later an assembly in the load context attempts to load the same assembly by display name, the load attempt fails. This can occur when an assembly is deserialized. +- If an assembly is loaded with , and later an assembly in the load context attempts to load the same assembly by display name, the load attempt fails. This can occur when an assembly is deserialized. -- If an assembly is loaded with , and the probing path includes an assembly with the same identity but a different location, an , , or other unexpected behavior can occur. +- If an assembly is loaded with , and the probing path includes an assembly with the same identity but a different location, an , , or other unexpected behavior can occur. -- demands and , or , on the specified path. +- demands and , or , on the specified path. - If a native image exists for `assemblyFile`, it is not used. The assembly cannot be loaded as domain neutral. Whether certain permissions are granted or not granted to an assembly is based on evidence. The rules for assembly and security evidence merging are as follows: -- When you use a method with no parameter, the assembly is loaded with the evidence that the loader supplies. +- When you use a method with no parameter, the assembly is loaded with the evidence that the loader supplies. -- When you use a method with an parameter, pieces of evidence are merged. Pieces of evidence supplied as an argument to the method supersede pieces of evidence supplied by the loader. +- When you use a method with an parameter, pieces of evidence are merged. Pieces of evidence supplied as an argument to the method supersede pieces of evidence supplied by the loader. - If you call this method more than once on the same assembly but with a different evidence specified, the common language runtime does not throw a because the equality and integrity of the different evidence specifications cannot be determined. The evidence that first succeeds is the evidence that is used. -- When you use a method with a `Byte[]` parameter to load a common object file format (COFF) image, evidence is combined. `Zone`, `Url` and `Site` are inherited from the calling assembly, and `Hash` and `StrongName` are taken from the COFF assembly. +- When you use a method with a `Byte[]` parameter to load a common object file format (COFF) image, evidence is combined. `Zone`, `Url` and `Site` are inherited from the calling assembly, and `Hash` and `StrongName` are taken from the COFF assembly. -- When you use a method with a `Byte[]` parameter and to load a COFF image, only the supplied evidence is used. Evidence of the calling assembly and evidence of the COFF image is ignored. +- When you use a method with a `Byte[]` parameter and to load a COFF image, only the supplied evidence is used. Evidence of the calling assembly and evidence of the COFF image is ignored. ]]> @@ -5552,7 +5552,7 @@ The assembly is loaded into the default AssemblyLoadContext. For more informatio ## Remarks > [!IMPORTANT] -> The overloads of the method are obsolete and have been retained for backward compatibility. The non-obsolete alternative is . +> The overloads of the method are obsolete and have been retained for backward compatibility. The non-obsolete alternative is . ]]> @@ -5635,13 +5635,13 @@ The assembly is loaded into the default AssemblyLoadContext. For more informatio ## Remarks > [!IMPORTANT] -> The method is obsolete and has been retained for backward compatibility. The non-obsolete alternative is . +> The method is obsolete and has been retained for backward compatibility. The non-obsolete alternative is . - Applications that load assemblies with this method will be affected by upgrades of those assemblies. Therefore, do not use this method; redesign the application to use the method overload or the method overload. + Applications that load assemblies with this method will be affected by upgrades of those assemblies. Therefore, do not use this method; redesign the application to use the method overload or the method overload. - In .NET Core/5+, the target assembly is loaded into the current or the if it's set. + In .NET Core/5+, the target assembly is loaded into the current or the if it's set. - This method first calls . If the assembly is not found, this method returns the assembly from the global assembly cache that has the same simple name, and the highest version number. + This method first calls . If the assembly is not found, this method returns the assembly from the global assembly cache that has the same simple name, and the highest version number. ]]> @@ -5704,13 +5704,13 @@ The assembly is loaded into the default AssemblyLoadContext. For more informatio ## Remarks > [!IMPORTANT] -> The method is obsolete and has been retained for backward compatibility. The non-obsolete alternative is . +> The method is obsolete and has been retained for backward compatibility. The non-obsolete alternative is . Evidence is the set of information that constitutes input to security policy decisions, such as what permissions can be granted to code. - Applications that load assemblies with this method will be affected by upgrades of those assemblies. Therefore, do not use this method; redesign the application to use the method or the method. + Applications that load assemblies with this method will be affected by upgrades of those assemblies. Therefore, do not use this method; redesign the application to use the method or the method. - This method first calls . If the assembly is not found, this method returns the assembly from the global assembly cache that has the same simple name, and the highest version number. + This method first calls . If the assembly is not found, this method returns the assembly from the global assembly cache that has the same simple name, and the highest version number. ]]> @@ -6163,7 +6163,7 @@ In .NET 5 and later versions, for bundled assemblies, the value returned is an e method, you cannot execute code in the assembly. To execute code, the assembly must be loaded into the execution context. + If an assembly has been loaded into the reflection-only context, using the method, you cannot execute code in the assembly. To execute code, the assembly must be loaded into the execution context. ]]> @@ -6242,7 +6242,7 @@ In .NET 5 and later versions, for bundled assemblies, the value returned is an e method. + You cannot execute code from an assembly loaded into the reflection-only context. To execute code, the assembly must be loaded into the execution context as well, using the method. The reflection-only context is no different from other contexts. Assemblies that are loaded into the context can be unloaded only by unloading the application domain. @@ -6323,7 +6323,7 @@ In .NET 5 and later versions, for bundled assemblies, the value returned is an e ## Remarks Dependencies are not automatically loaded into the reflection-only context. - You cannot execute code from an assembly loaded into the reflection-only context. To execute code, the assembly must be loaded into the execution context as well, using the method. + You cannot execute code from an assembly loaded into the reflection-only context. To execute code, the assembly must be loaded into the execution context as well, using the method. The reflection-only context is no different from other contexts. Assemblies that are loaded into the context can be unloaded only by unloading the application domain. @@ -6408,7 +6408,7 @@ In .NET 5 and later versions, for bundled assemblies, the value returned is an e ## Remarks Dependencies are not automatically loaded into the reflection-only context. To automatically load dependencies, handle the event and load the dependency in the event handler. - You cannot execute code from an assembly that has been loaded into the reflection-only context. To execute the code, load the assembly with the method. + You cannot execute code from an assembly that has been loaded into the reflection-only context. To execute the code, load the assembly with the method. The `assemblyFile` parameter must refer to a URI without escape characters. This method supplies escape characters for all invalid characters in the URI. @@ -6792,7 +6792,7 @@ In .NET 5 and later versions, for bundled assemblies, the value returned is an e > [!CAUTION] > If you use either of these solutions, you must be certain that it is safe to load `assemblyFile` with full trust. - For a discussion of load contexts, including the load-from context, see the method overload. + For a discussion of load contexts, including the load-from context, see the method overload. ]]> diff --git a/xml/System.Reflection/AssemblyFlagsAttribute.xml b/xml/System.Reflection/AssemblyFlagsAttribute.xml index 47e8ffbf52e..094aa13f392 100644 --- a/xml/System.Reflection/AssemblyFlagsAttribute.xml +++ b/xml/System.Reflection/AssemblyFlagsAttribute.xml @@ -72,7 +72,7 @@ To access the flags that have been specified for an assembly, use the property to obtain an object, then use the property to obtain an value. - To specify flags for a dynamic assembly, set the property of the object that you pass to the method. + To specify flags for a dynamic assembly, set the property of the object that you pass to the method. diff --git a/xml/System.Reflection/AssemblyName.xml b/xml/System.Reflection/AssemblyName.xml index bced6a8e924..c82eb0b1652 100644 --- a/xml/System.Reflection/AssemblyName.xml +++ b/xml/System.Reflection/AssemblyName.xml @@ -135,31 +135,31 @@ A "++" becomes "\\+\\+", and a "\\" becomes "\\\\". - This qualified name can be persisted and later used to load the . To search for and load a , use either with the type name only or with the assembly qualified type name. with the type name only will look for the in the caller's assembly and then in the System assembly. with the assembly qualified type name will look for the in any assembly. + This qualified name can be persisted and later used to load the . To search for and load a , use either with the type name only or with the assembly qualified type name. with the type name only will look for the in the caller's assembly and then in the System assembly. with the assembly qualified type name will look for the in any assembly. A fully specified must have the name, culture, public key or public key token, major version, minor version, build number, and revision number parameters. The last four are packaged in the type. - To create a simple name, create an object using the parameterless constructor and set the . The other properties are optional. + To create a simple name, create an object using the parameterless constructor and set the . The other properties are optional. - To create a full strong name, create an object using the parameterless constructor and set the and . The other properties are optional. Use and to set the public key and the strong name. The strong name signing always uses the hash algorithm. + To create a full strong name, create an object using the parameterless constructor and set the and . The other properties are optional. Use and to set the public key and the strong name. The strong name signing always uses the hash algorithm. To ensure that the names are constructed correctly, use the following properties: -- -- -- +- +- +- You can also get the name by using the `/l` option with the [Gacutil.exe (Global Assembly Cache Tool)](/dotnet/framework/tools/gacutil-exe-gac-tool). For a partially specified strong name, create an object using the parameterless constructor and set the name and public key. An assembly created using such an can be signed later using the Assembly Linker (Al.exe). - It is possible to specify a public key and a with inconsistent values. This can be useful in developer scenarios. In this case, the public key retrieved with specifies the correct public key, while the specifies the public and private keys used during development. When the runtime detects a mismatch between the and the public key, it looks up in the registry the correct key that matches the public key. + It is possible to specify a public key and a with inconsistent values. This can be useful in developer scenarios. In this case, the public key retrieved with specifies the correct public key, while the specifies the public and private keys used during development. When the runtime detects a mismatch between the and the public key, it looks up in the registry the correct key that matches the public key. The format of the display name of an is a comma-delimited Unicode string that begins with the name, as follows: `Name <,Culture = CultureInfo> <,Version = Major.Minor.Build.Revision> <, StrongName> <,PublicKeyToken> '\0'` - `Name` is the textual name of the assembly. `CultureInfo` is the RFC1766-format-defined culture. `Major`, `Minor`, `Build`, and `Revision` are the major version, minor version, build number, and revision number of the assembly. `StrongName` is the hexadecimal-encoded low-order 64 bits of the hash value of the public key generated using the SHA-1 hashing algorithm and the public key specified by . `PublicKeyToken` is the hexadecimal-encoded public key specified by . + `Name` is the textual name of the assembly. `CultureInfo` is the RFC1766-format-defined culture. `Major`, `Minor`, `Build`, and `Revision` are the major version, minor version, build number, and revision number of the assembly. `StrongName` is the hexadecimal-encoded low-order 64 bits of the hash value of the public key generated using the SHA-1 hashing algorithm and the public key specified by . `PublicKeyToken` is the hexadecimal-encoded public key specified by . Hexadecimal encoding is defined as the conversion of each byte of a binary object to two hexadecimal characters, progressing from least to most significant byte. Additional display values will be added as deemed necessary. @@ -456,10 +456,10 @@ Note: In .NET for Win ## Remarks When an assembly is loaded, this value can also be obtained using the property. - If the assembly was loaded as a byte array, this property returns the location of the caller of the method overload, not the location of the loaded assembly. + If the assembly was loaded as a byte array, this property returns the location of the caller of the method overload, not the location of the loaded assembly. > [!NOTE] -> Do not use an with only the property set. The property does not supply any elements of the assembly identity (such as name or version), so loading does not occur according to load-by-identity rules, as you would expect from the method. Instead, the assembly is loaded using load-from rules. For information about the disadvantages of using the load-from context, see the method overload or [Best Practices for Assembly Loading](/dotnet/framework/deployment/best-practices-for-assembly-loading). +> Do not use an with only the property set. The property does not supply any elements of the assembly identity (such as name or version), so loading does not occur according to load-by-identity rules, as you would expect from the method. Instead, the assembly is loaded using load-from rules. For information about the disadvantages of using the load-from context, see the method overload or [Best Practices for Assembly Loading](/dotnet/framework/deployment/best-practices-for-assembly-loading). @@ -815,14 +815,14 @@ Note: In .NET for Win mylib, Version=1.2.1900.0, Culture=neutral, PublicKeyToken=a14f3033def15840 ``` - Writing your own code to parse display names is not recommended. Instead, pass the display name to the constructor, which parses it and populates the appropriate fields of the new . + Writing your own code to parse display names is not recommended. Instead, pass the display name to the constructor, which parses it and populates the appropriate fields of the new . When an assembly is loaded, this value can also be obtained using the property. ## Examples - The following example emits a dynamic assembly and saves it to the current directory. When the assembly is created, the code example sets the , , , and properties, which together comprise an assembly's full name, or display name. The property is then used to retrieve the display name. + The following example emits a dynamic assembly and saves it to the current directory. When the assembly is created, the code example sets the , , , and properties, which together comprise an assembly's full name, or display name. The property is then used to retrieve the display name. :::code language="csharp" source="~/snippets/csharp/System.Reflection/AssemblyName/CodeBase/assemblyname_codebase.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/AssemblyName/CodeBase/assemblyname_codebase.vb" id="Snippet4"::: @@ -1032,7 +1032,7 @@ mylib, Version=1.2.1900.0, Culture=neutral, PublicKeyToken=a14f3033def15840 method is used to give the assembly a public key. The method is then used to retrieve the public key, which is displayed to the console. + The following example emits a dynamic assembly and saves it to the current directory. When the assembly is created, the method is used to give the assembly a public key. The method is then used to retrieve the public key, which is displayed to the console. :::code language="csharp" source="~/snippets/csharp/System.Reflection/AssemblyName/Flags/assemblyname_keypair.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/AssemblyName/Flags/assemblyname_keypair.vb" id="Snippet2"::: @@ -1099,7 +1099,7 @@ mylib, Version=1.2.1900.0, Culture=neutral, PublicKeyToken=a14f3033def15840 method is used to set the assembly's public key token. The method is then used to retrieve the public key token, which is displayed to the console. + The following example emits a dynamic assembly and saves it to the current directory. When the assembly is created, the method is used to set the assembly's public key token. The method is then used to retrieve the public key token, which is displayed to the console. :::code language="csharp" source="~/snippets/csharp/System.Reflection/AssemblyName/Flags/assemblyname_keypair.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/AssemblyName/Flags/assemblyname_keypair.vb" id="Snippet3"::: @@ -1162,7 +1162,7 @@ mylib, Version=1.2.1900.0, Culture=neutral, PublicKeyToken=a14f3033def15840 ## Remarks > [!IMPORTANT] -> Starting with the .NET Framework 4, the property of an object that is returned by the method is if there is no hash algorithm for the referenced assembly, or if the hash algorithm of the referenced assembly is not identified by the enumeration. In previous versions of the .NET Framework, the property returned in this situation. +> Starting with the .NET Framework 4, the property of an object that is returned by the method is if there is no hash algorithm for the referenced assembly, or if the hash algorithm of the referenced assembly is not identified by the enumeration. In previous versions of the .NET Framework, the property returned in this situation. @@ -1541,12 +1541,12 @@ mylib, Version=1.2.1900.0, Culture=neutral, PublicKeyToken=a14f3033def15840 method to provide a public key token. Otherwise, a is thrown when the method is called. + You must also use the method to provide a public key token. Otherwise, a is thrown when the method is called. ## Examples - The following example emits a dynamic assembly and saves it to the current directory. When the assembly is created, the method is used to give the assembly a public key. The method is then used to retrieve the public key, which is displayed to the console. + The following example emits a dynamic assembly and saves it to the current directory. When the assembly is created, the method is used to give the assembly a public key. The method is then used to retrieve the public key, which is displayed to the console. :::code language="csharp" source="~/snippets/csharp/System.Reflection/AssemblyName/SetPublicKey/assemblyname_setpublickey.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/AssemblyName/SetPublicKey/assemblyname_setpublickey.vb" id="Snippet1"::: @@ -1608,12 +1608,12 @@ mylib, Version=1.2.1900.0, Culture=neutral, PublicKeyToken=a14f3033def15840 method, you must also use the method to provide a public key token. Otherwise, a is thrown when the method is called. + When you set the public key by calling the method, you must also use the method to provide a public key token. Otherwise, a is thrown when the method is called. ## Examples - The following example emits a dynamic assembly and saves it to the current directory. When the assembly is created, the method is used to set the assembly's public key token. The method is then used to retrieve the public key token, which is displayed to the console. + The following example emits a dynamic assembly and saves it to the current directory. When the assembly is created, the method is used to set the assembly's public key token. The method is then used to retrieve the public key token, which is displayed to the console. :::code language="csharp" source="~/snippets/csharp/System.Reflection/AssemblyName/SetPublicKey/assemblyname_setpublickey.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/AssemblyName/SetPublicKey/assemblyname_setpublickey.vb" id="Snippet2"::: @@ -1887,7 +1887,7 @@ mylib, Version=1.2.1900.0, Culture=neutral, PublicKeyToken=a14f3033def15840 ## Examples - The following example gets an object for a hypothetical `MyAssembly.exe` assembly, and then uses the method to retrieve the full assembly name, or display name. + The following example gets an object for a hypothetical `MyAssembly.exe` assembly, and then uses the method to retrieve the full assembly name, or display name. :::code language="csharp" source="~/snippets/csharp/System.Reflection/AssemblyName/GetAssemblyName/assemblyname_getassemblyname.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/AssemblyName/GetAssemblyName/assemblyname_getassemblyname.vb" id="Snippet2"::: @@ -2023,9 +2023,9 @@ mylib, Version=1.2.1900.0, Culture=neutral, PublicKeyToken=a14f3033def15840 information indicates, for example, that the assembly cannot execute side-by-side with other versions due to conflicts over a device driver. + information indicates, for example, that the assembly cannot execute side-by-side with other versions due to conflicts over a device driver. - Currently, always returns , and is not used by the loader. This property is reserved for a future feature. + Currently, always returns , and is not used by the loader. This property is reserved for a future feature. ]]> diff --git a/xml/System.Reflection/AssemblyVersionAttribute.xml b/xml/System.Reflection/AssemblyVersionAttribute.xml index 5f7df368e7b..b95cc9663f1 100644 --- a/xml/System.Reflection/AssemblyVersionAttribute.xml +++ b/xml/System.Reflection/AssemblyVersionAttribute.xml @@ -111,14 +111,14 @@ You can mitigate some of these issues by limiting the use of time-based versions The assembly major and minor versions are used as the type library version number when the assembly is exported. Some COM hosts do not accept type libraries with the version number 0.0. Therefore, if you want to expose an assembly to COM clients, set the assembly version explicitly to 1.0 in the `AssemblyVersionAttribute` page for projects created outside Visual Studio 2005 and with no `AssemblyVersionAttribute` specified. Do this even when the assembly version is 0.0. All projects created in Visual Studio 2005 have a default assembly version of 1.0.*. - To get the name of an assembly you have loaded, call on the assembly to get an , and then get the property. To get the name of an assembly you have not loaded, call from your client application to check the assembly version that your application uses. + To get the name of an assembly you have loaded, call on the assembly to get an , and then get the property. To get the name of an assembly you have not loaded, call from your client application to check the assembly version that your application uses. The attribute can only be applied once. Some Visual Studio project templates already include the attribute. In those projects, adding the attribute in code causes a compiler error. ## Examples - The following example uses the attribute to assign a version number to an assembly. At compile time, this version information is stored with the assembly's metadata. At run time, the example retrieves the value of the property on a type found in the assembly to get a reference to the executing assembly, and it retrieves the assembly's version information from the property of the object returned by the method. + The following example uses the attribute to assign a version number to an assembly. At compile time, this version information is stored with the assembly's metadata. At run time, the example retrieves the value of the property on a type found in the assembly to get a reference to the executing assembly, and it retrieves the assembly's version information from the property of the object returned by the method. :::code language="csharp" source="~/snippets/csharp/System/Version/Overview/example1.cs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System/Version/Overview/example1.vb" id="Snippet6"::: diff --git a/xml/System.Reflection/Binder.xml b/xml/System.Reflection/Binder.xml index 07d19d8a756..a9caf7c3932 100644 --- a/xml/System.Reflection/Binder.xml +++ b/xml/System.Reflection/Binder.xml @@ -68,7 +68,7 @@ class are used by methods such as , which selects from a set of possible members to execute, based on a set of parameter types and argument values; , which selects a method based on parameter types; and so on. + Implementations of the class are used by methods such as , which selects from a set of possible members to execute, based on a set of parameter types and argument values; , which selects a method based on parameter types; and so on. A default implementation of the class is provided by the property. @@ -193,9 +193,9 @@ , the default binder implementation provided by simply returns the first element of `match`. No selection is done. + If `bindingAttr` does not include , the default binder implementation provided by simply returns the first element of `match`. No selection is done. - This method controls the binding provided by . + This method controls the binding provided by . If a binder implementation allows coercion of string values to numeric types, the `culture` parameter is necessary to convert a string that represents 1000 to a value, because 1000 is represented differently by different cultures. The default binder does not do such string coercions. @@ -300,9 +300,9 @@ ## Remarks The default binder takes into account both parameters that have values and `params` arrays (`ParamArray` arrays in Visual Basic). Thus, it is possible to find a match in cases where `args` and `match` do not contain the same number of elements. - The binder enables a client to map the array of arguments back to its original form if the argument array has been manipulated by . Use this remap capability to get back by-reference arguments when such arguments are present. When you pass arguments by name, the binder reorders the argument array. The `state` parameter keeps track of argument reordering, thus enabling the binder's method to reorder the argument array to its original form. + The binder enables a client to map the array of arguments back to its original form if the argument array has been manipulated by . Use this remap capability to get back by-reference arguments when such arguments are present. When you pass arguments by name, the binder reorders the argument array. The `state` parameter keeps track of argument reordering, thus enabling the binder's method to reorder the argument array to its original form. - The method is used by the method. + The method is used by the method. If a binder implementation allows coercion of string values to numeric types, the `culture` parameter is necessary to convert a string that represents 1000 to a value, because 1000 is represented differently by different cultures. The default binder does not do such string coercions. diff --git a/xml/System.Reflection/BindingFlags.xml b/xml/System.Reflection/BindingFlags.xml index b2347942dbe..dbb26b4d540 100644 --- a/xml/System.Reflection/BindingFlags.xml +++ b/xml/System.Reflection/BindingFlags.xml @@ -92,39 +92,39 @@ ## Remarks These `BindingFlags` control binding for a great many classes in the `System`, `System.Reflection`, and `System.Runtime` namespaces that invoke, create, get, set, and find members and types. - `BindingFlags` are used in the following methods and other places such as : + `BindingFlags` are used in the following methods and other places such as : -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- -- +- `InvokeMember` and `GetMethod` are especially important. @@ -137,7 +137,7 @@ > [!NOTE] > You must specify `Instance` or `Static` along with `Public` or `NonPublic` or no members will be returned. - The following table lists the coercions performed by the default . This table applies especially to the `BindingFlags.ExactBinding` binding flag. The general principle is that should perform only widening coercions, which never lose data. An example of a widening coercion is coercing a value that is a 32-bit signed integer to a value that is a 64-bit signed integer. This is distinguished from a narrowing coercion, which may lose data. An example of a narrowing coercion is coercing a 64-bit signed integer to a 32-bit signed integer. + The following table lists the coercions performed by the default . This table applies especially to the `BindingFlags.ExactBinding` binding flag. The general principle is that should perform only widening coercions, which never lose data. An example of a widening coercion is coercing a value that is a 32-bit signed integer to a value that is a 64-bit signed integer. This is distinguished from a narrowing coercion, which may lose data. An example of a narrowing coercion is coercing a 64-bit signed integer to a 32-bit signed integer. |Source Type|Target Type| |-----------------|-----------------| diff --git a/xml/System.Reflection/ConstructorInfo.xml b/xml/System.Reflection/ConstructorInfo.xml index 2734ebef483..ffd8f4368bf 100644 --- a/xml/System.Reflection/ConstructorInfo.xml +++ b/xml/System.Reflection/ConstructorInfo.xml @@ -97,15 +97,15 @@ on a `ConstructorInfo` returned by either the or method of a object. + `ConstructorInfo` is used to discover the attributes of a constructor as well as to invoke a constructor. Objects are created by calling on a `ConstructorInfo` returned by either the or method of a object. > [!NOTE] -> inherits from several members, such as , that can be used to examine generic methods. In the .NET Framework version 2.0 constructors cannot be generic, so these members return `false` or `null`. +> inherits from several members, such as , that can be used to examine generic methods. In the .NET Framework version 2.0 constructors cannot be generic, so these members return `false` or `null`. ## Examples - The following example uses `ConstructorInfo` with and to find the constructors that match the specified search criteria. + The following example uses `ConstructorInfo` with and to find the constructors that match the specified search criteria. :::code language="csharp" source="~/snippets/csharp/System/Type/GetConstructor/type_getconstructor3.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/GetConstructor/type_getconstructor3.vb" id="Snippet1"::: @@ -442,7 +442,7 @@ Access restrictions are ignored for fully trusted code. That is, private constructors, methods, fields, and properties can be accessed and invoked using reflection whenever the code is fully trusted. > [!NOTE] -> To create an instance of a value type that has no instance constructors, use the method. +> To create an instance of a value type that has no instance constructors, use the method. This method is a convenience method for the following overloaded version, using default values. This method cannot be overridden. @@ -537,7 +537,7 @@ Note: In .NET for Win Access restrictions are ignored for fully trusted code. That is, private constructors, methods, fields, and properties can be accessed and invoked using reflection whenever the code is fully trusted. > [!NOTE] -> To create an instance of a value type that has no instance constructors, use the method. +> To create an instance of a value type that has no instance constructors, use the method. > [!NOTE] > This method can be used to access non-public members if the caller has been granted with the flag and if the grant set of the non-public members is restricted to the caller's grant set, or 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. @@ -615,7 +615,7 @@ Note: In .NET for Win . Therefore, when you examine a set of objects - for example, the array returned by - the property returns only when a given member is a constructor. + This property overrides . Therefore, when you examine a set of objects - for example, the array returned by - the property returns only when a given member is a constructor. diff --git a/xml/System.Reflection/CustomAttributeData.xml b/xml/System.Reflection/CustomAttributeData.xml index 518ad51de86..4fc65e692a3 100644 --- a/xml/System.Reflection/CustomAttributeData.xml +++ b/xml/System.Reflection/CustomAttributeData.xml @@ -84,7 +84,7 @@ , , and so on. If the code for the attribute type itself is loaded into the reflection-only context, it cannot be executed. + Code that is being examined in the reflection-only context cannot be executed, so it is not always possible to examine custom attributes by creating instances of them and then examining their properties, using methods like , , and so on. If the code for the attribute type itself is loaded into the reflection-only context, it cannot be executed. The class allows examination of custom attributes in the reflection-only context by providing an abstraction for attributes. The members of this class can be used to obtain the positional arguments and named arguments of the attribute. Use the property to get a list of structures that represent the positional arguments, and use the property to get a list of structures that represent the named arguments. @@ -94,15 +94,15 @@ When you have a structure for an argument, whether named or positional, use the property to get the type and the property to get the value. > [!NOTE] -> For an array argument, the property returns a generic of objects. Each object in the collection represents the corresponding element of the array. +> For an array argument, the property returns a generic of objects. Each object in the collection represents the corresponding element of the array. - can be used in the execution context as well as in the reflection-only context. For example, you might want to avoid loading the assembly that contains the code for a custom attribute. Using the class is different from using methods like : + can be used in the execution context as well as in the reflection-only context. For example, you might want to avoid loading the assembly that contains the code for a custom attribute. Using the class is different from using methods like : - The properties and methods of only provide you with the values that were specified for the attribute instance, not the semantics of the constructor. For example, a string argument of an attribute might be converted internally to some other representation, and returned in a canonical form; or a property might have side effects when the actual attribute code is executed. - The properties and methods of do not allow you to retrieve the custom attributes inherited from base classes. - To create instances of the class, use the `static` (`Shared` in Visual Basic) factory methods. + To create instances of the class, use the `static` (`Shared` in Visual Basic) factory methods. @@ -362,7 +362,7 @@ ## Remarks This method gets the positional arguments that were specified for the custom attribute instance without executing any of the custom attribute code. Thus, it can be used in the reflection-only context. - Use the method to get the named arguments specified for the attribute instance. + Use the method to get the named arguments specified for the attribute instance. @@ -500,7 +500,7 @@ method that can always be used in the Reflection-only context. + This method provides an alternative to the method that can always be used in the Reflection-only context. @@ -511,7 +511,7 @@ The attribute that is applied to the type demonstrates array properties, with both positional and named arguments. - The method is used in `Main()` to get the custom attributes applied to the assembly. The return value of the method is passed to the `ShowAttributeData` method. + The method is used in `Main()` to get the custom attributes applied to the assembly. The return value of the method is passed to the `ShowAttributeData` method. :::code language="csharp" source="~/snippets/csharp/System.Reflection/CustomAttributeData/Overview/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/CustomAttributeData/Overview/source.vb" id="Snippet1"::: @@ -591,7 +591,7 @@ The attribute that is applied to the type demonstrates array properties, with both positional and named arguments. - The method is used in `Main()` to get the custom attributes that were applied to a type and to a test method ( derives from ). The return value of is passed to the `ShowAttributeData` method. + The method is used in `Main()` to get the custom attributes that were applied to a type and to a test method ( derives from ). The return value of is passed to the `ShowAttributeData` method. :::code language="csharp" source="~/snippets/csharp/System.Reflection/CustomAttributeData/Overview/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/CustomAttributeData/Overview/source.vb" id="Snippet1"::: @@ -718,7 +718,7 @@ method that can always be used in the Reflection-only context. + This method provides an alternative to the method that can always be used in the Reflection-only context. @@ -729,7 +729,7 @@ The attribute that is applied to the type demonstrates array properties, with both positional and named arguments. - The method is used in `Main()` to retrieve the custom attributes applied to a parameter of a test method. The return value of is passed to the `ShowAttributeData` method. + The method is used in `Main()` to retrieve the custom attributes applied to a parameter of a test method. The return value of is passed to the `ShowAttributeData` method. :::code language="csharp" source="~/snippets/csharp/System.Reflection/CustomAttributeData/Overview/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/CustomAttributeData/Overview/source.vb" id="Snippet1"::: @@ -843,7 +843,7 @@ The list that is returned contains only the named arguments that were specified for the attribute instance. - Use the method to get the positional arguments that were specified for the attribute instance. + Use the method to get the positional arguments that were specified for the attribute instance. @@ -923,7 +923,7 @@ The attribute that is applied to the type demonstrates array properties, with both positional and named arguments. - In this example, the method is used in the `ShowAttributeData` method, to identify the attribute whose data is being displayed. + In this example, the method is used in the `ShowAttributeData` method, to identify the attribute whose data is being displayed. :::code language="csharp" source="~/snippets/csharp/System.Reflection/CustomAttributeData/Overview/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/CustomAttributeData/Overview/source.vb" id="Snippet1"::: diff --git a/xml/System.Reflection/CustomAttributeExtensions.xml b/xml/System.Reflection/CustomAttributeExtensions.xml index b7e61f363f6..e9ac77523d4 100644 --- a/xml/System.Reflection/CustomAttributeExtensions.xml +++ b/xml/System.Reflection/CustomAttributeExtensions.xml @@ -125,11 +125,11 @@ Retrieves a custom attribute of a specified type that is applied to a specified assembly. A custom attribute that matches , or if no such attribute is found. - extension method if you expect more than one value to be returned, or will be thrown. - + extension method if you expect more than one value to be returned, or will be thrown. + ]]> @@ -188,11 +188,11 @@ Retrieves a custom attribute of a specified type that is applied to a specified member. A custom attribute that matches , or if no such attribute is found. - extension method if you expect more than one value to be returned, or will be thrown. - + extension method if you expect more than one value to be returned, or will be thrown. + ]]> @@ -254,11 +254,11 @@ Retrieves a custom attribute of a specified type that is applied to a specified module. A custom attribute that matches , or if no such attribute is found. - extension method if you expect more than one value to be returned, or will be thrown. - + extension method if you expect more than one value to be returned, or will be thrown. + ]]> @@ -317,11 +317,11 @@ Retrieves a custom attribute of a specified type that is applied to a specified parameter. A custom attribute that matches , or if no such attribute is found. - extension method if you expect more than one value to be returned, or will be thrown. - + extension method if you expect more than one value to be returned, or will be thrown. + ]]> @@ -384,11 +384,11 @@ Retrieves a custom attribute of a specified type that is applied to a specified member, and optionally inspects the ancestors of that member. A custom attribute that matches , or if no such attribute is found. - extension method if you expect more than one value to be returned, or will be thrown. - + extension method if you expect more than one value to be returned, or will be thrown. + ]]> @@ -453,11 +453,11 @@ Retrieves a custom attribute of a specified type that is applied to a specified parameter, and optionally inspects the ancestors of that parameter. A custom attribute matching , or if no such attribute is found. - extension method if you expect more than one value to be returned, or will be thrown. - + extension method if you expect more than one value to be returned, or will be thrown. + ]]> @@ -529,11 +529,11 @@ Retrieves a custom attribute of a specified type that is applied to a specified assembly. A custom attribute that matches , or if no such attribute is found. - extension method if you expect more than one value to be returned, or will be thrown. - + extension method if you expect more than one value to be returned, or will be thrown. + ]]> @@ -602,11 +602,11 @@ Retrieves a custom attribute of a specified type that is applied to a specified member. A custom attribute that matches , or if no such attribute is found. - extension method if you expect more than one value to be returned, or will be thrown. - + extension method if you expect more than one value to be returned, or will be thrown. + ]]> @@ -678,11 +678,11 @@ Retrieves a custom attribute of a specified type that is applied to a specified module. A custom attribute that matches , or if no such attribute is found. - extension method if you expect more than one value to be returned, or will be thrown. - + extension method if you expect more than one value to be returned, or will be thrown. + ]]> @@ -751,11 +751,11 @@ Retrieves a custom attribute of a specified type that is applied to a specified parameter. A custom attribute that matches , or if no such attribute is found. - extension method if you expect more than one value to be returned, or will be thrown. - + extension method if you expect more than one value to be returned, or will be thrown. + ]]> @@ -830,11 +830,11 @@ Retrieves a custom attribute of a specified type that is applied to a specified member, and optionally inspects the ancestors of that member. A custom attribute that matches , or if no such attribute is found. - extension method if you expect more than one value to be returned, or will be thrown. - + extension method if you expect more than one value to be returned, or will be thrown. + ]]> @@ -909,11 +909,11 @@ Retrieves a custom attribute of a specified type that is applied to a specified parameter, and optionally inspects the ancestors of that parameter. A custom attribute that matches , or if no such attribute is found. - extension method if you expect more than one value to be returned, or will be thrown. - + extension method if you expect more than one value to be returned, or will be thrown. + ]]> diff --git a/xml/System.Reflection/CustomAttributeFormatException.xml b/xml/System.Reflection/CustomAttributeFormatException.xml index f5abb016e49..247a95b158c 100644 --- a/xml/System.Reflection/CustomAttributeFormatException.xml +++ b/xml/System.Reflection/CustomAttributeFormatException.xml @@ -130,8 +130,8 @@ |Property|Value| |--------------|-----------| -||null| -||The empty string ("").| +||null| +||The empty string ("").| ]]> @@ -185,7 +185,7 @@ |Property|Value| |--------------|-----------| -||`null`| +||`null`| ]]> @@ -303,8 +303,8 @@ |Property|Value| |--------------|-----------| -||The `inner` exception.| -||The error message string.| +||The `inner` exception.| +||The error message string.| ]]> diff --git a/xml/System.Reflection/CustomAttributeNamedArgument.xml b/xml/System.Reflection/CustomAttributeNamedArgument.xml index 78e316b1ad6..7d3111e85ca 100644 --- a/xml/System.Reflection/CustomAttributeNamedArgument.xml +++ b/xml/System.Reflection/CustomAttributeNamedArgument.xml @@ -93,14 +93,14 @@ , , and so on. If the code for the attribute type itself is loaded into the reflection-only context, it cannot be executed. + Code that is being examined in the reflection-only context cannot be executed, so it is not always possible to examine custom attributes by creating instances of them and then examining their properties, using methods like , , and so on. If the code for the attribute type itself is loaded into the reflection-only context, it cannot be executed. The structure is used by the class to provide access to a named argument specified for a custom attribute instance, without executing the code of the corresponding property of the custom attribute type. The property returns a structure that contains the type and value of the named argument. > [!IMPORTANT] > Whether an argument is named or positional, you must access its type and value by using the structure. - To create instances of the class, use the `static` factory method. + To create instances of the class, use the `static` factory method. @@ -589,7 +589,7 @@ if the two structures are equal; otherwise, . - .]]> + .]]> @@ -643,7 +643,7 @@ if the two structures are different; otherwise, . - .]]> + .]]> diff --git a/xml/System.Reflection/CustomAttributeTypedArgument.xml b/xml/System.Reflection/CustomAttributeTypedArgument.xml index 8467c8a06e4..3f502dfec79 100644 --- a/xml/System.Reflection/CustomAttributeTypedArgument.xml +++ b/xml/System.Reflection/CustomAttributeTypedArgument.xml @@ -93,15 +93,15 @@ , , and so on. If the code for the attribute type itself is loaded into the reflection-only context, it cannot be executed. + Code that is being examined in the reflection-only context cannot be executed, so it is not always possible to examine custom attributes by creating instances of them and then examining their properties, using methods like , , and so on. If the code for the attribute type itself is loaded into the reflection-only context, it cannot be executed. The structure is used by the class to provide access to the type and value of a positional argument specified for a custom attribute instance, without executing the attribute constructor. It also provides access to the type and value of a named argument without executing the code of the corresponding property of the custom attribute type. The types and values of all the positional and named arguments of an attribute instance are provided by structures. The positional attributes returned by the property are directly represented by structures, but the named arguments returned by the property are represented by structures; to get the structure for a named argument, use the property. - If an argument is an array of values, the property of the that represents the argument returns a generic of objects. Each object in the collection represents the corresponding element of the array. + If an argument is an array of values, the property of the that represents the argument returns a generic of objects. Each object in the collection represents the corresponding element of the array. - To create instances of the class, use the `static` factory method. + To create instances of the class, use the `static` factory method. @@ -176,7 +176,7 @@ constructor. + The `value` parameter cannot be `null` for this constructor, because the argument type is inferred from the type of `value`. To specify a `null` value, use the constructor. This constructor is for use by inheritors of the class. It is not intended for use in application code. @@ -522,7 +522,7 @@ if the two structures are equal; otherwise, . - .]]> + .]]> @@ -576,7 +576,7 @@ if the two structures are different; otherwise, . - .]]> + .]]> @@ -683,7 +683,7 @@ ## Remarks If the represents an array argument, this property returns a `ReadOnlyCollection` (`ReadOnlyCollection(Of CustomAttributeTypedArgument)` in Visual Basic). Each element of the collection represents the corresponding element of the array argument. - The type of the value can be obtained by using the property. gets the actual type of the value returned by the property for simple arguments or for elements of array arguments. It returns the array type for array arguments. + The type of the value can be obtained by using the property. gets the actual type of the value returned by the property for simple arguments or for elements of array arguments. It returns the array type for array arguments. @@ -699,7 +699,7 @@ :::code language="csharp" source="~/snippets/csharp/System.Reflection/CustomAttributeData/Overview/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/CustomAttributeData/Overview/source.vb" id="Snippet1"::: - | + | ]]> diff --git a/xml/System.Reflection/EventInfo.xml b/xml/System.Reflection/EventInfo.xml index 083085ec963..c95dba567d4 100644 --- a/xml/System.Reflection/EventInfo.xml +++ b/xml/System.Reflection/EventInfo.xml @@ -98,7 +98,7 @@ class to inspect events and to hook up event handlers, as shown in the example code for the method. + Use the class to inspect events and to hook up event handlers, as shown in the example code for the method. > [!NOTE] > is not intended to be used to raise events. An object raises events as dictated by its internal state. @@ -109,7 +109,7 @@ The event model works equally well for single-cast and multicast delegates. When the delegate's invoke method is called, only a single object will have a method called on it. A multicast modifier can be applied to a delegate declaration, which allows multiple methods to be called when the invoke method of the delegate is called. - Calling on `EventInfo` when the `inherit` parameter of `GetCustomAttributes` is `true` does not walk the type hierarchy. Use to inherit custom attributes. + Calling on `EventInfo` when the `inherit` parameter of `GetCustomAttributes` is `true` does not walk the type hierarchy. Use to inherit custom attributes. @@ -243,11 +243,11 @@ You might use the `AddEventHandler` method when you load a type after the progra ## Examples The following example creates an instance of the class, creates an event handler using a dynamic assembly, and hooks up the dynamic event handler. All actions are performed using late binding. - The instance is stored in a variable of type , and all code that accesses the does so late-bound. The example uses the method to get the event, and the property to get the delegate type for the event. + The instance is stored in a variable of type , and all code that accesses the does so late-bound. The example uses the method to get the event, and the property to get the delegate type for the event. The example gets a for the `Invoke` method of the delegate type and obtains the signature of the delegate from the instance. The example then creates a dynamic assembly with one module containing a single type named `Handler` and gives the type a `static` method (`Shared` method in Visual Basic) named `DynamicHandler` that handles the event. - After the dynamic type is created, the example gets a for the finished method and uses it to create a delegate instance. This instance is passed to the method to hook up the event. The program then pauses to allow the event to be raised. + After the dynamic type is created, the example gets a for the finished method and uses it to create a delegate instance. This instance is passed to the method to hook up the event. The program then pauses to allow the event to be raised. :::code language="csharp" source="~/snippets/csharp/System.Reflection/EventInfo/AddEventHandler/source.cs"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/EventInfo/AddEventHandler/source.vb"::: @@ -321,7 +321,7 @@ Note: In with a value of `true`. + This property is the equivalent of calling the with a value of `true`. ]]> @@ -773,13 +773,13 @@ add_( handler) ## Remarks The metadata for an event can associate four kinds of methods with the event: -- The `.addon` directive specifies the method used to add event handlers. Use the method to retrieve an for that method. +- The `.addon` directive specifies the method used to add event handlers. Use the method to retrieve an for that method. -- The `.removeon` directive specifies the method used to detach event handlers. Use the method to retrieve an for that method. +- The `.removeon` directive specifies the method used to detach event handlers. Use the method to retrieve an for that method. -- The `.fire` directive specifies the method used to raise the event. Use the method to retrieve an for that method. +- The `.fire` directive specifies the method used to raise the event. Use the method to retrieve an for that method. -- The `.other` directive specifies any other methods associated with the event. Use the method to retrieve an array of objects for those methods. +- The `.other` directive specifies any other methods associated with the event. Use the method to retrieve an array of objects for those methods. The methods associated with an event using the `.other` directive have no special significance to the runtime. The C# and Visual Basic compilers do not use the `.other` directive. @@ -839,13 +839,13 @@ add_( handler) ## Remarks The metadata for an event can associate four kinds of methods with the event: -- The `.addon` directive specifies the method used to add event handlers. Use the method to retrieve an for that method. +- The `.addon` directive specifies the method used to add event handlers. Use the method to retrieve an for that method. -- The `.removeon` directive specifies the method used to detach event handlers. Use the method to retrieve an for this method. +- The `.removeon` directive specifies the method used to detach event handlers. Use the method to retrieve an for this method. -- The `.fire` directive specifies the method used to raise the event. Use the method to retrieve an for this method. +- The `.fire` directive specifies the method used to raise the event. Use the method to retrieve an for this method. -- The `.other` directive specifies any other methods associated with the event. Use the method to retrieve an array of objects for those methods. +- The `.other` directive specifies any other methods associated with the event. Use the method to retrieve an array of objects for those methods. The methods associated with an event using the `.other` directive have no special significance to the runtime. The C# and Visual Basic compilers do not use the `.other` directive. @@ -1335,7 +1335,7 @@ remove_( handler) . Therefore, when you examine a set of objects - for example, the array returned by - the property returns only when a given member is an event. + This property overrides . Therefore, when you examine a set of objects - for example, the array returned by - the property returns only when a given member is an event. ]]> @@ -1492,7 +1492,7 @@ remove_( handler) with a value of `true`. + This property is the equivalent of calling the with a value of `true`. ]]> @@ -1637,7 +1637,7 @@ Note: In with a value of `true`. + This property is the equivalent of calling the with a value of `true`. ]]> diff --git a/xml/System.Reflection/ExceptionHandlingClause.xml b/xml/System.Reflection/ExceptionHandlingClause.xml index b8934305a71..90746e1b9b0 100644 --- a/xml/System.Reflection/ExceptionHandlingClause.xml +++ b/xml/System.Reflection/ExceptionHandlingClause.xml @@ -62,13 +62,13 @@ class provides information about the clauses in a `try`…`catch`…`finally` block (`Try`…`Catch`…`Finally` in Visual Basic). To get a list of exception-handling clauses in a method, obtain a that represents the method. Use the method to obtain a object, and then use the property to get the list of clauses. + The class provides information about the clauses in a `try`…`catch`…`finally` block (`Try`…`Catch`…`Finally` in Visual Basic). To get a list of exception-handling clauses in a method, obtain a that represents the method. Use the method to obtain a object, and then use the property to get the list of clauses. > [!NOTE] > Working with exception-handling clauses requires a thorough understanding of metadata and Microsoft intermediate language (MSIL) instruction formats. Information can be found in the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), especially "Partition II: Metadata Definition and Semantics". ## Examples - The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. + The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. You can use Ildasm.exe to examine the MSIL for the compiled code example, to see how the offsets and lengths are calculated. @@ -185,7 +185,7 @@ > Working with exception-handling clauses requires a thorough understanding of metadata and Microsoft intermediate language (MSIL) instruction formats. Information can be found in the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), especially "Partition II: Metadata Definition and Semantics". ## Examples - The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. + The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. This code is part of a larger example located in the class topic. @@ -309,7 +309,7 @@ > Working with exception-handling clauses requires a thorough understanding of metadata and Microsoft intermediate language (MSIL) instruction formats. Information can be found in the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), especially "Partition II: Metadata Definition and Semantics". ## Examples - The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. + The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. This code is part of a larger example located in the class topic. @@ -378,7 +378,7 @@ > Working with exception-handling clauses requires a thorough understanding of metadata and Microsoft intermediate language (MSIL) instruction formats. Information can be found in the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), especially "Partition II: Metadata Definition and Semantics". ## Examples - The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. + The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. This code is part of a larger example located in the class topic. @@ -446,7 +446,7 @@ > Working with exception-handling clauses requires a thorough understanding of metadata and Microsoft intermediate language (MSIL) instruction formats. Information can be found in the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), especially "Partition II: Metadata Definition and Semantics". ## Examples - The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. + The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. This code is part of a larger example located in the class topic. @@ -557,7 +557,7 @@ > Working with exception-handling clauses requires a thorough understanding of metadata and Microsoft intermediate language (MSIL) instruction formats. Information can be found in the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), especially "Partition II: Metadata Definition and Semantics". ## Examples - The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. + The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. This code is part of a larger example located in the class topic. @@ -625,7 +625,7 @@ > Working with exception-handling clauses requires a thorough understanding of metadata and Microsoft intermediate language (MSIL) instruction formats. Information can be found in the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), especially "Partition II: Metadata Definition and Semantics". ## Examples - The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. + The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. This code is part of a larger example located in the class topic. diff --git a/xml/System.Reflection/ExceptionHandlingClauseOptions.xml b/xml/System.Reflection/ExceptionHandlingClauseOptions.xml index 0380ee90a81..703085068b0 100644 --- a/xml/System.Reflection/ExceptionHandlingClauseOptions.xml +++ b/xml/System.Reflection/ExceptionHandlingClauseOptions.xml @@ -57,13 +57,13 @@ object and call the method to obtain the method body. Use the property to obtain a list of objects. + To examine the exception-handling clauses in a method, obtain a object and call the method to obtain the method body. Use the property to obtain a list of objects. > [!NOTE] > Working with exception-handling clauses requires a thorough understanding of metadata and Microsoft intermediate language (MSIL) instruction formats. Information can be found in the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), especially "Partition II: Metadata Definition and Semantics". ## Examples - The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. + The following code example defines a test method named `MethodBodyExample`, and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their properties. This code is part of a larger example provided for the class. diff --git a/xml/System.Reflection/FieldInfo.xml b/xml/System.Reflection/FieldInfo.xml index 64a76607ba8..ffc55d6c820 100644 --- a/xml/System.Reflection/FieldInfo.xml +++ b/xml/System.Reflection/FieldInfo.xml @@ -97,14 +97,14 @@ class does not have a public constructor. objects are obtained by calling either the or method of a `Type` object. + The field information is obtained from metadata. The class does not have a public constructor. objects are obtained by calling either the or method of a `Type` object. Fields are variables defined in the class. provides access to the metadata for a field within a class and provides dynamic set and get functionality for the field. The class is not loaded into memory until invoke or get is called on the object. ## Examples - The following example uses the method to get the field-related information from the class, and then displays field attributes. + The following example uses the method to get the field-related information from the class, and then displays field attributes. :::code language="csharp" source="~/snippets/csharp/System.Reflection/FieldInfo/Overview/fieldinfo.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/FieldInfo/Overview/fieldinfo.vb" id="Snippet1"::: @@ -406,7 +406,7 @@ ## Examples - The following example creates a field, gets its type and , and displays its . + The following example creates a field, gets its type and , and displays its . :::code language="csharp" source="~/snippets/csharp/System.Reflection/FieldInfo/FieldType/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/FieldInfo/FieldType/source.vb" id="Snippet1"::: @@ -492,7 +492,7 @@ ## Examples - The following code example uses the method to get objects for the fields of a type, gets a structure for each field, and then retrieves the objects from the handles using this overload of the method. + The following code example uses the method to get objects for the fields of a type, gets a structure for each field, and then retrieves the objects from the handles using this overload of the method. :::code language="csharp" source="~/snippets/csharp/System.Reflection/FieldInfo/GetFieldFromHandle/fieldinfo_getfieldfromhandle.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/FieldInfo/GetFieldFromHandle/fieldinfo_getfieldfromhandle.vb" id="Snippet1"::: @@ -573,14 +573,14 @@ Implementations are compatible in some cases. For example, a single implementation is shared by all types that are constructed from a particular generic type definition by using reference types for the generic type arguments. For example, `MyType`, `MyType`, and `MyType` all share the same implementation. In this situation, the object that is returned represents a field on the type that `declaringType` specifies, regardless of the original source of `handle`. This practice is not recommended, because it works only if the generic type arguments of the constructed type are reference types. - If a generic argument is a value type, the runtime type handle of the constructed type is not compatible with runtime field handles from constructions that have a reference type in the same generic parameter position, or that have a different value type in that position. In that case, the only way to use the overload is to ensure that `declaringType` is the runtime type handle for the constructed type that `handle` belongs to. + If a generic argument is a value type, the runtime type handle of the constructed type is not compatible with runtime field handles from constructions that have a reference type in the same generic parameter position, or that have a different value type in that position. In that case, the only way to use the overload is to ensure that `declaringType` is the runtime type handle for the constructed type that `handle` belongs to. ## Examples The following example shows how to retrieve objects for fields on constructed generic classes. The example defines the generic type `Test` (`Test(Of T)` in Visual Basic) with a single field named `TestField`, of type `T`. The example gets the and for the case where `T` is , and demonstrates the following: -- An exception is thrown if the method overload is used. This is true even if the field is not of type `T`. +- An exception is thrown if the method overload is used. This is true even if the field is not of type `T`. - A is retrieved successfully if the runtime type handle is from the same construction as the runtime field handle, in this case `Test`. @@ -686,9 +686,9 @@ , , and , which are used to obtain custom modifiers from a function pointer. + A modified type supports , , and , which are used to obtain custom modifiers from a function pointer. - To obtain the normal, unmodified type from a modified type, use . + To obtain the normal, unmodified type from a modified type, use . This method is provided for designers of managed compilers. For more information on custom modifiers, see classes in the namespace. Also see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). @@ -747,7 +747,7 @@ and methods are provided for designers of managed compilers. For more information on custom modifiers, see and related classes in the namespace. Also see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). + The and methods are provided for designers of managed compilers. For more information on custom modifiers, see and related classes in the namespace. Also see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). ]]> @@ -864,7 +864,7 @@ and methods are provided for designers of managed compilers. For more information on custom modifiers, see and related classes in the namespace. Also see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). + The and methods are provided for designers of managed compilers. For more information on custom modifiers, see and related classes in the namespace. Also see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). ]]> @@ -972,12 +972,12 @@ > To use this functionality, your application should target .NET Framework 3.5 or later. ## Examples - The following example uses the method to retrieve the value of a static field. Note that the value of the `obj` argument is `null`. + The following example uses the method to retrieve the value of a static field. Note that the value of the `obj` argument is `null`. :::code language="csharp" source="~/snippets/csharp/System.Reflection/FieldInfo/GetValue/getfldval.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/FieldInfo/GetValue/getfldval.vb" id="Snippet1"::: - The following example retrieves an array of objects that represents the fields of the `FieldsClass` type, and then calls the to display the value of each field for the `fieldsInst` object. + The following example retrieves an array of objects that represents the fields of the `FieldsClass` type, and then calls the to display the value of each field for the `fieldsInst` object. :::code language="csharp" source="~/snippets/csharp/System.Reflection/FieldInfo/GetValue/fieldinfo_getvalue.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/FieldInfo/GetValue/fieldinfo_getvalue.vb" id="Snippet1"::: @@ -1114,7 +1114,7 @@ Note: In .NET for Win The visibility of a field is exactly described by if the only visibility modifier is `internal` (`Friend` in Visual Basic). This property is `false` for fields that are `protected internal` in C# (`Protected Friend` in Visual Basic); use the property to identify such fields. ## Examples - The following code example defines fields with varying levels of visibility, and displays the values of their , , , and properties. + The following code example defines fields with varying levels of visibility, and displays the values of their , , , and properties. :::code language="csharp" source="~/snippets/csharp/System.Reflection/FieldInfo/IsAssembly/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/FieldInfo/IsAssembly/source.vb" id="Snippet1"::: @@ -1183,7 +1183,7 @@ Note: In .NET for Win The visibility of a field is exactly described by if the only visibility modifier is `protected`. This property is `false` for fields that are `protected internal` in C# (`Protected Friend` in Visual Basic); use the property to identify such fields. ## Examples - The following code example defines fields with varying levels of visibility, and displays the values of their , , , and properties. + The following code example defines fields with varying levels of visibility, and displays the values of their , , , and properties. :::code language="csharp" source="~/snippets/csharp/System.Reflection/FieldInfo/IsAssembly/source.cs" id="Snippet1"::: @@ -1256,7 +1256,7 @@ Note: In .NET for Win The visibility of a field is exactly described by if the visibility modifier is `private protected` in C# or `Private Protected` in Visual Basic. ## Examples - The following code example defines fields with varying levels of visibility, and displays the values of their , , , and properties. + The following code example defines fields with varying levels of visibility, and displays the values of their , , , and properties. :::code language="csharp" source="~/snippets/csharp/System.Reflection/FieldInfo/IsAssembly/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/FieldInfo/IsAssembly/source.vb" id="Snippet1"::: @@ -1329,7 +1329,7 @@ Note: In .NET for Win The visibility of a field is exactly described by if the visibility modifier is `protected internal` in C# (`Protected Friend` in Visual Basic). ## Examples - The following code example defines fields with varying levels of visibility, and displays the values of their , , , and properties. + The following code example defines fields with varying levels of visibility, and displays the values of their , , , and properties. :::code language="csharp" source="~/snippets/csharp/System.Reflection/FieldInfo/IsAssembly/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/FieldInfo/IsAssembly/source.vb" id="Snippet1"::: @@ -1807,7 +1807,7 @@ Myfieldb - B readonly field, IsInitOnly = True , , and properties report the transparency level of the field at its current trust level, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: + The , , and properties report the transparency level of the field at its current trust level, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: |Security level|IsSecurityCritical|IsSecuritySafeCritical|IsSecurityTransparent| |--------------------|------------------------|----------------------------|---------------------------| @@ -1818,7 +1818,7 @@ Myfieldb - B readonly field, IsInitOnly = True Using these properties is much simpler than examining the security annotations of an assembly and its types and members, checking the current trust level, and attempting to duplicate the runtime's rules. > [!IMPORTANT] -> For partial-trust assemblies, the value of this property depends on the current trust level of the assembly. If the assembly is loaded into a partially trusted application domain (for example, into a sandboxed application domain), then the runtime ignores the security annotations of the assembly. The assembly and all its types are treated as transparent. The runtime pays attention to the security annotations of a partial-trust assembly only when that assembly is loaded into a fully trusted application domain (for example, into the default application domain of a desktop application). By contrast, a trusted assembly (that is, a strong-named assembly that is installed in the global assembly cache) is always loaded with full trust regardless of the trust level of the application domain, so its current trust level is always fully trusted. You can determine the current trust levels of assemblies and application domains by using the and properties. +> For partial-trust assemblies, the value of this property depends on the current trust level of the assembly. If the assembly is loaded into a partially trusted application domain (for example, into a sandboxed application domain), then the runtime ignores the security annotations of the assembly. The assembly and all its types are treated as transparent. The runtime pays attention to the security annotations of a partial-trust assembly only when that assembly is loaded into a fully trusted application domain (for example, into the default application domain of a desktop application). By contrast, a trusted assembly (that is, a strong-named assembly that is installed in the global assembly cache) is always loaded with full trust regardless of the trust level of the application domain, so its current trust level is always fully trusted. You can determine the current trust levels of assemblies and application domains by using the and properties. For more information about reflection and transparency, see [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection). For information about transparency, see [Security Changes](/dotnet/framework/security/security-changes). @@ -1873,7 +1873,7 @@ Myfieldb - B readonly field, IsInitOnly = True , , and properties report the transparency level of the field at its current trust level, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: + The , , and properties report the transparency level of the field at its current trust level, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: |Security level|IsSecurityCritical|IsSecuritySafeCritical|IsSecurityTransparent| |--------------------|------------------------|----------------------------|---------------------------| @@ -1884,7 +1884,7 @@ Myfieldb - B readonly field, IsInitOnly = True Using these properties is much simpler than examining the security annotations of an assembly and its types and members, checking the current trust level, and attempting to duplicate the runtime's rules. > [!IMPORTANT] -> For partial-trust assemblies, the value of this property depends on the current trust level of the assembly. If the assembly is loaded into a partially trusted application domain (for example, into a sandboxed application domain), then the runtime ignores the security annotations of the assembly. The assembly and all its types are treated as transparent. The runtime pays attention to the security annotations of a partial-trust assembly only when that assembly is loaded into a fully trusted application domain (for example, into the default application domain of a desktop application). By contrast, a trusted assembly (that is, a strong-named assembly that is installed in the global assembly cache) is always loaded with full trust regardless of the trust level of the application domain, so its current trust level is always fully trusted. You can determine the current trust levels of assemblies and application domains by using the and properties. +> For partial-trust assemblies, the value of this property depends on the current trust level of the assembly. If the assembly is loaded into a partially trusted application domain (for example, into a sandboxed application domain), then the runtime ignores the security annotations of the assembly. The assembly and all its types are treated as transparent. The runtime pays attention to the security annotations of a partial-trust assembly only when that assembly is loaded into a fully trusted application domain (for example, into the default application domain of a desktop application). By contrast, a trusted assembly (that is, a strong-named assembly that is installed in the global assembly cache) is always loaded with full trust regardless of the trust level of the application domain, so its current trust level is always fully trusted. You can determine the current trust levels of assemblies and application domains by using the and properties. For more information about reflection and transparency, see [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection). For information about transparency, see [Security Changes](/dotnet/framework/security/security-changes). @@ -1939,7 +1939,7 @@ Myfieldb - B readonly field, IsInitOnly = True , , and properties report the transparency level of the field at its current trust level, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: + The , , and properties report the transparency level of the field at its current trust level, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: |Security level|IsSecurityCritical|IsSecuritySafeCritical|IsSecurityTransparent| |--------------------|------------------------|----------------------------|---------------------------| @@ -1950,7 +1950,7 @@ Myfieldb - B readonly field, IsInitOnly = True Using these properties is much simpler than examining the security annotations of an assembly and its types and members, checking the current trust level, and attempting to duplicate the runtime's rules. > [!IMPORTANT] -> For partial-trust assemblies, the value of this property depends on the current trust level of the assembly. If the assembly is loaded into a partially trusted application domain (for example, into a sandboxed application domain), then the runtime ignores the security annotations of the assembly. The assembly and all its types are treated as transparent. The runtime pays attention to the security annotations of a partial-trust assembly only when that assembly is loaded into a fully trusted application domain (for example, into the default application domain of a desktop application). By contrast, a trusted assembly (that is, a strong-named assembly that is installed in the global assembly cache) is always loaded with full trust regardless of the trust level of the application domain, so its current trust level is always fully trusted. You can determine the current trust levels of assemblies and application domains by using the and properties. +> For partial-trust assemblies, the value of this property depends on the current trust level of the assembly. If the assembly is loaded into a partially trusted application domain (for example, into a sandboxed application domain), then the runtime ignores the security annotations of the assembly. The assembly and all its types are treated as transparent. The runtime pays attention to the security annotations of a partial-trust assembly only when that assembly is loaded into a fully trusted application domain (for example, into the default application domain of a desktop application). By contrast, a trusted assembly (that is, a strong-named assembly that is installed in the global assembly cache) is always loaded with full trust regardless of the trust level of the application domain, so its current trust level is always fully trusted. You can determine the current trust levels of assemblies and application domains by using the and properties. For more information about reflection and transparency, see [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection). For information about transparency, see [Security Changes](/dotnet/framework/security/security-changes). @@ -2162,7 +2162,7 @@ Myfieldb - B static field; IsStatic - True . Therefore, when you examine a set of objects - for example, the array returned by - the property returns only when a given member is a field. + This property overrides . Therefore, when you examine a set of objects - for example, the array returned by - the property returns only when a given member is a field. diff --git a/xml/System.Reflection/GenericParameterAttributes.xml b/xml/System.Reflection/GenericParameterAttributes.xml index 7575bf1765a..3d354d85eac 100644 --- a/xml/System.Reflection/GenericParameterAttributes.xml +++ b/xml/System.Reflection/GenericParameterAttributes.xml @@ -73,7 +73,7 @@ ## Examples - The following code example defines a generic type `Test` with two type parameters. The second type parameter has a base class constraint and a reference type constraint. When the program executes, the constraints are examined using the property and the method. + The following code example defines a generic type `Test` with two type parameters. The second type parameter has a base class constraint and a reference type constraint. When the program executes, the constraints are examined using the property and the method. :::code language="csharp" source="~/snippets/csharp/System/Type/GenericParameterAttributes/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/GenericParameterAttributes/source.vb" id="Snippet1"::: diff --git a/xml/System.Reflection/ICustomAttributeProvider.xml b/xml/System.Reflection/ICustomAttributeProvider.xml index 176db36a0dd..12334c3116c 100644 --- a/xml/System.Reflection/ICustomAttributeProvider.xml +++ b/xml/System.Reflection/ICustomAttributeProvider.xml @@ -133,7 +133,7 @@ on or when the `inherit` parameter of `GetCustomAttributes` is `true` does not walk the type hierarchy. Use to inherit custom attributes. + Calling on or when the `inherit` parameter of `GetCustomAttributes` is `true` does not walk the type hierarchy. Use to inherit custom attributes. This method returns custom attributes defined directly on a non-inherited member only. @@ -199,7 +199,7 @@ This method returns custom attributes defined directly on a non-inherited member only. - Calling on or when the `inherit` parameter of `GetCustomAttributes` is `true` does not walk the type hierarchy. Use to inherit custom attributes. + Calling on or when the `inherit` parameter of `GetCustomAttributes` is `true` does not walk the type hierarchy. Use to inherit custom attributes. ]]> diff --git a/xml/System.Reflection/IReflect.xml b/xml/System.Reflection/IReflect.xml index a1dc3ff8114..a0193b341de 100644 --- a/xml/System.Reflection/IReflect.xml +++ b/xml/System.Reflection/IReflect.xml @@ -251,7 +251,7 @@ On .NET Framework, the interface is used to in method retrieves an array of objects by using the name and binding attribute that correspond to all public members or to all members that match a specified name. The case of the specified name is observed or ignored, as specified by . + The method retrieves an array of objects by using the name and binding attribute that correspond to all public members or to all members that match a specified name. The case of the specified name is observed or ignored, as specified by . ]]> @@ -847,9 +847,9 @@ On .NET Framework, the interface is used to in A method is invoked if the number of parameters in the method declaration equals the number of arguments in the specified argument list, and the type of each argument can be converted by the binder to the type of the parameter. > [!NOTE] -> The array of parameter modifiers passed to the method must contain a single parameter modifier. Only the first parameter modifier is considered when determining which argument needs to be passed by reference when exposed to COM. +> The array of parameter modifiers passed to the method must contain a single parameter modifier. Only the first parameter modifier is considered when determining which argument needs to be passed by reference when exposed to COM. - The binder finds all matching methods, in accordance with the type of binding requested (, , and so on). The set of methods is filtered by the name, number of arguments, and a set of search modifiers defined in the binder. After the method is selected, it is invoked, and accessibility is checked at that point. The search may control which set of methods is searched based upon the accessibility attribute associated with the method. selects the method to be invoked. The default binder selects the most specific match. + The binder finds all matching methods, in accordance with the type of binding requested (, , and so on). The set of methods is filtered by the name, number of arguments, and a set of search modifiers defined in the binder. After the method is selected, it is invoked, and accessibility is checked at that point. The search may control which set of methods is searched based upon the accessibility attribute associated with the method. selects the method to be invoked. The default binder selects the most specific match. Access restrictions are ignored for fully trusted code. That is, private constructors, methods, fields, and properties can be accessed and invoked through reflection whenever the code is fully trusted. diff --git a/xml/System.Reflection/ImageFileMachine.xml b/xml/System.Reflection/ImageFileMachine.xml index 04c95f79add..063afeda242 100644 --- a/xml/System.Reflection/ImageFileMachine.xml +++ b/xml/System.Reflection/ImageFileMachine.xml @@ -55,14 +55,14 @@ Identifies the platform targeted by an executable. - method. - + method. + > [!NOTE] -> The values in this enumeration correspond to the constants IMAGE_FILE_MACHINE_I386, IMAGE_FILE_MACHINE_IA64, and IMAGE_FILE_MACHINE_AMD64 in the unmanaged Windows API, which are accessed by the unmanaged `GetPEKind` function. - +> The values in this enumeration correspond to the constants IMAGE_FILE_MACHINE_I386, IMAGE_FILE_MACHINE_IA64, and IMAGE_FILE_MACHINE_AMD64 in the unmanaged Windows API, which are accessed by the unmanaged `GetPEKind` function. + ]]> diff --git a/xml/System.Reflection/InterfaceMapping.xml b/xml/System.Reflection/InterfaceMapping.xml index 6cf66a76132..7605da9b1f0 100644 --- a/xml/System.Reflection/InterfaceMapping.xml +++ b/xml/System.Reflection/InterfaceMapping.xml @@ -71,13 +71,13 @@ Retrieves the mapping of an interface into the actual methods on a class that implements that interface. - structure when a type implements interface methods that use method names other than those specified by the interface, or when a type implements multiple interfaces which have a method with the same name. - - To obtain an structure, use the method. - + structure when a type implements interface methods that use method names other than those specified by the interface, or when a type implements multiple interfaces which have a method with the same name. + + To obtain an structure, use the method. + ]]> @@ -134,11 +134,11 @@ Shows the methods that are defined on the interface. - array. That is, the elements are in the same array indexing order. - + array. That is, the elements are in the same array indexing order. + ]]> @@ -245,11 +245,11 @@ Shows the methods that implement the interface. - array match their counterpart elements returned from the `TargetMethods` array. That is, the elements are in the same array indexing order. - + array match their counterpart elements returned from the `TargetMethods` array. That is, the elements are in the same array indexing order. + ]]> @@ -304,11 +304,11 @@ Represents the type that was used to create the interface mapping. - field is the instance of whose method returned the current structure. - + field is the instance of whose method returned the current structure. + ]]> diff --git a/xml/System.Reflection/InvalidFilterCriteriaException.xml b/xml/System.Reflection/InvalidFilterCriteriaException.xml index d357a49345a..21a2d786ad3 100644 --- a/xml/System.Reflection/InvalidFilterCriteriaException.xml +++ b/xml/System.Reflection/InvalidFilterCriteriaException.xml @@ -152,8 +152,8 @@ |Property|Value| |--------------|-----------| -||null| -||The empty string ("").| +||null| +||The empty string ("").| ]]> @@ -213,8 +213,8 @@ |Property|Value| |--------------|-----------| -||`null`| -||The error message string.| +||`null`| +||The error message string.| ]]> @@ -337,8 +337,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> diff --git a/xml/System.Reflection/LocalVariableInfo.xml b/xml/System.Reflection/LocalVariableInfo.xml index f963255a72e..4a28c2187b6 100644 --- a/xml/System.Reflection/LocalVariableInfo.xml +++ b/xml/System.Reflection/LocalVariableInfo.xml @@ -75,7 +75,7 @@ property. Use the method to obtain the for a object. + To get a list of local variables in a method, use the property. Use the method to obtain the for a object. > [!NOTE] > Local variable names are not persisted in metadata. In Microsoft intermediate language (MSIL), local variables are accessed by their position in the local variable signature. @@ -83,7 +83,7 @@ ## Examples - The following example defines a test method named `MethodBodyExample`, and displays its local variable information. The method is used to obtain a object for the test method. The property is then used to obtain a list of objects and to display their types and index order. + The following example defines a test method named `MethodBodyExample`, and displays its local variable information. The method is used to obtain a object for the test method. The property is then used to obtain a list of objects and to display their types and index order. This code example is part of a larger example provided for the class. diff --git a/xml/System.Reflection/MemberFilter.xml b/xml/System.Reflection/MemberFilter.xml index aef31a9b41f..31776558ed4 100644 --- a/xml/System.Reflection/MemberFilter.xml +++ b/xml/System.Reflection/MemberFilter.xml @@ -89,13 +89,13 @@ to include the member in the filtered list; otherwise . - and has a constructor and an `Invoke` method. (See the code example in `Delegate`.) - - The method uses this delegate to filter the list of members that it returns. - + and has a constructor and an `Invoke` method. (See the code example in `Delegate`.) + + The method uses this delegate to filter the list of members that it returns. + ]]> diff --git a/xml/System.Reflection/MemberInfo.xml b/xml/System.Reflection/MemberInfo.xml index ddf22b8f669..8c44710816e 100644 --- a/xml/System.Reflection/MemberInfo.xml +++ b/xml/System.Reflection/MemberInfo.xml @@ -283,7 +283,7 @@ - If the `Type` object from which this `MemberInfo` object was obtained did not declare this member, the property will represent one of its base types. -- If the `MemberInfo` object is a global member (that is, if it was obtained from the method, which returns global methods on a module), the returned will be `null`. +- If the `MemberInfo` object is a global member (that is, if it was obtained from the method, which returns global methods on a module), the returned will be `null`. @@ -422,7 +422,7 @@ method. + This method ignores the `inherit` parameter for properties and events. To search the inheritance chain for attributes on properties and events, use the appropriate overloads of the method. > [!NOTE] > In the .NET Framework version 2.0, this method returns security attributes on methods, constructors, and types if they are stored in the new metadata format. Assemblies compiled with version 2.0 use this format. Dynamic assemblies and assemblies compiled with earlier versions of the .NET Framework use the old XML format. See [Emitting Declarative Security Attributes](https://msdn.microsoft.com/library/9eeddee8-ca89-4440-b84b-fd613f590cd5). @@ -500,7 +500,7 @@ method. + This method ignores the `inherit` parameter for properties and events. To search the inheritance chain for attributes on properties and events, use the appropriate overloads of the method. > [!NOTE] > In the .NET Framework version 2.0, this method returns security attributes on methods, constructors, and types if the attributes are stored in the new metadata format. Assemblies compiled with version 2.0 use this format. Dynamic assemblies and assemblies compiled with earlier versions of the .NET Framework use the old XML format. See [Emitting Declarative Security Attributes](https://msdn.microsoft.com/library/9eeddee8-ca89-4440-b84b-fd613f590cd5). @@ -565,7 +565,7 @@ and cannot be used in such cases, because they create instances of the attributes. Code in the reflection-only context cannot be executed. For more information and for example code, see the class. + Use this method to examine the custom attributes of code in the reflection-only context, in cases where the custom attributes themselves are defined in code that is loaded into the reflection-only context. Methods like and cannot be used in such cases, because they create instances of the attributes. Code in the reflection-only context cannot be executed. For more information and for example code, see the class. This method gets custom attribute data for types, nested types, and type members, because the class and the classes in the namespace that represent type members all derive from . @@ -804,7 +804,7 @@ For more information, see [How to use and debug assembly unloadability in .NET C method. + This method ignores the `inherit` parameter for properties and events. To search the inheritance chain for attributes on properties and events, use the appropriate overloads of the method. > [!NOTE] > In the .NET Framework version 2.0, this method returns `true` if a type, method, or constructor has security attributes stored in the new metadata format. Assemblies compiled with version 2.0 use this format. Dynamic assemblies and assemblies compiled with earlier versions of the .NET Framework use the old XML format. See [Emitting Declarative Security Attributes](https://msdn.microsoft.com/library/9eeddee8-ca89-4440-b84b-fd613f590cd5). @@ -871,7 +871,7 @@ For more information, see [How to use and debug assembly unloadability in .NET C objects - for example, the array returned by - the property can be used to determine the member type of any given member. + This property is overridden in derived classes, and the override returns the appropriate member type. Therefore, when you examine a set of objects - for example, the array returned by - the property can be used to determine the member type of any given member. To get the `MemberType` property, get the class . From the `Type`, get the array. From the `MethodInfo` array, get the `MemberTypes`. @@ -997,7 +997,7 @@ For more information, see [How to use and debug assembly unloadability in .NET C ## Examples - The following code example declares a class that inherits and overrides . The example obtains objects for the class's `ToString` method and for the inherited method, and displays the names of the modules in which the two methods are declared. + The following code example declares a class that inherits and overrides . The example obtains objects for the class's `ToString` method and for the inherited method, and displays the names of the modules in which the two methods are declared. :::code language="csharp" source="~/snippets/csharp/System.Reflection/MemberInfo/Module/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/MemberInfo/Module/source.vb" id="Snippet1"::: @@ -1242,12 +1242,12 @@ For more information, see [How to use and debug assembly unloadability in .NET C ## Remarks The `ReflectedType` property retrieves the object that was used to obtain this instance of `MemberInfo`. This may differ from the value of the property if this object represents a member that is inherited from a base class. - If the `MemberInfo` object is a global member (that is, if it was obtained from the method, which returns global methods on a module), the returned will be `null`. + If the `MemberInfo` object is a global member (that is, if it was obtained from the method, which returns global methods on a module), the returned will be `null`. ## Examples - The following code example shows how the changes when the member is viewed from a obtained from type and from a obtained from the class itself, which inherits but does not override . + The following code example shows how the changes when the member is viewed from a obtained from type and from a obtained from the class itself, which inherits but does not override . :::code language="csharp" source="~/snippets/csharp/System.Reflection/MemberInfo/ReflectedType/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/MemberInfo/ReflectedType/source.vb" id="Snippet1"::: diff --git a/xml/System.Reflection/MemberInfoExtensions.xml b/xml/System.Reflection/MemberInfoExtensions.xml index 6bf2b6e32e8..c18633b0e00 100644 --- a/xml/System.Reflection/MemberInfoExtensions.xml +++ b/xml/System.Reflection/MemberInfoExtensions.xml @@ -74,12 +74,12 @@ Gets a metadata token for the given member, if available. An integer representing the metadata token. The returned token is never nil. If unavailable, an exception is thrown. - to determine whether a metadata token is available before calling this method. -This method throws an exception if a metadata token is not available for the specified member. You can call to determine whether a metadata token is available before calling this method. - ]]> There is no metadata token available. @@ -123,12 +123,12 @@ This method throws an exception if a metadata token is not available for the spe if there is a metadata token available for the given member; otherwise, . - throws an exception if a metadata token is not available for the specified member. So use this method to determine whether a metadata token is available before calling . - throws an exception if a metadata token is not available for the specified member. So use this method to determine whether a metadata token is available before calling . - ]]> diff --git a/xml/System.Reflection/MemberTypes.xml b/xml/System.Reflection/MemberTypes.xml index 1c7027ab0aa..a0f045730be 100644 --- a/xml/System.Reflection/MemberTypes.xml +++ b/xml/System.Reflection/MemberTypes.xml @@ -79,9 +79,9 @@ ## Remarks These enumeration values are returned by the following properties: -- . +- . -- . +- . - . @@ -103,7 +103,7 @@ 1. Get a object that represents that type. -2. Retrieve the array that represents the members of that type by calling the method. +2. Retrieve the array that represents the members of that type by calling the method. 3. Retrieve the value of the From the property for each member in the array. A `switch` statement in C# or `Select Case` statement in Visual Basic is typically used to process member types. diff --git a/xml/System.Reflection/MetadataAssemblyResolver.xml b/xml/System.Reflection/MetadataAssemblyResolver.xml index 1b056de53ff..13d46e3bbf4 100644 --- a/xml/System.Reflection/MetadataAssemblyResolver.xml +++ b/xml/System.Reflection/MetadataAssemblyResolver.xml @@ -83,7 +83,7 @@ ## Remarks -Binding an assembly name to an assembly occurs when is called or when a type from one assembly has a dependency on another assembly. The handler that overrides `Resolve` should use , or to load the requested assembly and return it. +Binding an assembly name to an assembly occurs when is called or when a type from one assembly has a dependency on another assembly. The handler that overrides `Resolve` should use , or to load the requested assembly and return it. To indicate the failure to find an assembly, the handler should return `null` rather than throwing an exception. Returning `null` commits the failure so that future attempts to load that name will fail without re-invoking the handler. diff --git a/xml/System.Reflection/MetadataLoadContext.xml b/xml/System.Reflection/MetadataLoadContext.xml index a3e339adfdd..69510ae2afb 100644 --- a/xml/System.Reflection/MetadataLoadContext.xml +++ b/xml/System.Reflection/MetadataLoadContext.xml @@ -116,7 +116,7 @@ The core assembly is treated differently than other assemblies because reference Typically, this assembly is named "mscorlib" or "netstandard". If the core assembly cannot be found, the value will be `null`, and many other reflection methods, including those that parse method signatures, will throw an exception. The `CoreAssembly` is determined by passing the `coreAssemblyName` parameter passed to the constructor -to the method. +to the method. If no `coreAssemblyName` argument was specified in the constructor of , then default values are used, including "mscorlib", "System.Runtime" and "netstandard". @@ -126,16 +126,16 @@ Note that is not an ideal core assembly because it exclude The core assembly is not loaded until necessary. The following APIs do not trigger the search for the core assembly: -* -* -* -* +* +* +* +* * -* -* +* +* * -* -* +* +* * * * @@ -146,11 +146,11 @@ If a core assembly cannot be found or if the core assembly is missing types, thi * APIs that need to parse signatures or typespecs and return the results as objects will throw an exception. For example: * - * + * * - * + * -* APIs that need to compare types to well-known core types will not throw an exception, and the comparison will evaluate to `false`. For example, if you do not specify a core assembly, will return `false` for everything, even types named . Similarly, will return for everything. +* APIs that need to compare types to well-known core types will not throw an exception, and the comparison will evaluate to `false`. For example, if you do not specify a core assembly, will return `false` for everything, even types named . Similarly, will return for everything. * If a metadata entity sets flags that surface as a pseudo-custom attribute, and the core assembly does not contain the pseudo-custom attribute type, the necessary constructor or any of the parameter types of the constructor, the will not throw. It will omit the pseudo-custom attribute from the list of returned attributes. ]]> @@ -185,7 +185,7 @@ After disposal, it is not safe to use any obje Though objects provided by the strive to throw an , this is not guaranteed. -Some APIs may return fixed or previously cached data. Accessing objects *during* a method call may result in an unmanaged access violation and failfast. +Some APIs may return fixed or previously cached data. Accessing objects *during* a method call may result in an unmanaged access violation and failfast. ]]> @@ -238,7 +238,7 @@ Some APIs may return fixed or previously cached data. Accessing objects *during* resolve event, but does not match the behavior of . (The latter gives up without raising its resolve event.) +Note that the behavior of this method matches the behavior of the resolve event, but does not match the behavior of . (The latter gives up without raising its resolve event.) ]]> The resolver returns . @@ -270,7 +270,7 @@ Note that the behavior of this method matches the behavior of the resolve event but does not match the behavior of . (The latter gives up without raising its resolve event.) +Note that the behavior of this method matches the behavior of the resolve event but does not match the behavior of . (The latter gives up without raising its resolve event.) ]]> diff --git a/xml/System.Reflection/MethodBase.xml b/xml/System.Reflection/MethodBase.xml index 4e5f338ae69..7a2b9d5255a 100644 --- a/xml/System.Reflection/MethodBase.xml +++ b/xml/System.Reflection/MethodBase.xml @@ -470,14 +470,14 @@ that is returned by is obtained from the generic type definition (that is, returns `true`). Therefore, it does not reflect the type arguments that were used when the method was called. For example, if a method `M()` is defined on a generic type `C` (`C(Of T)` in Visual Basic), and is called from `C.M()`, then returns `C.M()` (`C(Of T).M()` in Visual Basic). + If the currently executing method is defined on a generic type, the that is returned by is obtained from the generic type definition (that is, returns `true`). Therefore, it does not reflect the type arguments that were used when the method was called. For example, if a method `M()` is defined on a generic type `C` (`C(Of T)` in Visual Basic), and is called from `C.M()`, then returns `C.M()` (`C(Of T).M()` in Visual Basic). - If the currently executing method is a generic method, returns the generic method definition. If the generic method is defined on a generic type, the is obtained from the generic type definition. + If the currently executing method is a generic method, returns the generic method definition. If the generic method is defined on a generic type, the is obtained from the generic type definition. ## Examples - The following example defines two types. The first is a non-generic class, `TestClass`, includes a constructor, a method named `GetValue`, and a read-write property named `GetValue`. The second is a generic class named `TestClass` that includes a constructor, a `GetValue` method, and a generic method, `ConvertValue`. Each constructor, method, and property accessor includes a call to the method. + The following example defines two types. The first is a non-generic class, `TestClass`, includes a constructor, a method named `GetValue`, and a read-write property named `GetValue`. The second is a generic class named `TestClass` that includes a constructor, a `GetValue` method, and a generic method, `ConvertValue`. Each constructor, method, and property accessor includes a call to the method. :::code language="csharp" source="~/snippets/csharp/System.Reflection/MethodBase/GetCurrentMethod/GetCurentMethod1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/MethodBase/GetCurrentMethod/GetCurentMethod1.vb" id="Snippet1"::: @@ -544,7 +544,7 @@ ## Remarks The elements of the returned array are in the order in which they appear in the list of type parameters for the generic method. -- If the current method is a closed constructed method (that is, the property returns `false`), the array returned by the method contains the types that have been assigned to the generic type parameters of the generic method definition. +- If the current method is a closed constructed method (that is, the property returns `false`), the array returned by the method contains the types that have been assigned to the generic type parameters of the generic method definition. - If the current method is a generic method definition, the array contains the type parameters. @@ -670,12 +670,12 @@ in order to use it. You can call the method on and objects, because the method is overridden in the runtime versions of these classes. For example, the runtime version of the class derives from the class, which in turn derives from the class. + You do not have to override the in order to use it. You can call the method on and objects, because the method is overridden in the runtime versions of these classes. For example, the runtime version of the class derives from the class, which in turn derives from the class. ## Examples - The following code example defines a test method named `MethodBodyExample` and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. + The following code example defines a test method named `MethodBodyExample` and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects and display their types and index order. The property is used to obtain a list of exception-handling clauses. @@ -895,7 +895,7 @@ method to display the method implementation flags that are set by default. + The following example defines a constructor in a dynamic assembly and then uses the method to display the method implementation flags that are set by default. :::code language="csharp" source="~/snippets/csharp/System.Reflection/MethodBase/GetMethodImplementationFlags/constructorbuilder_getmodule_4.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/MethodBase/GetMethodImplementationFlags/constructorbuilder_getmodule_4.vb" id="Snippet3"::: @@ -958,7 +958,7 @@ method to retrieve the parameters of the `Invoke` method of a delegate. + The following example uses the method to retrieve the parameters of the `Invoke` method of a delegate. The example defines a delegate named `MyDelegate` and an event named `ev` of type `MyDelegate`. The code in the `Main` method discovers the event signature by getting the delegate type of the event, getting the `Invoke` method of the delegate type, and then retrieving and displaying the parameters. @@ -1087,9 +1087,9 @@ method overload, passing for `invokeAttr` and `null` for `binder` and `culture`. + This is a convenience method that calls the method overload, passing for `invokeAttr` and `null` for `binder` and `culture`. - If the invoked method throws an exception, the method returns the originating exception. + If the invoked method throws an exception, the method returns the originating exception. To invoke a static method using its object, pass `null` for `obj`. @@ -1223,7 +1223,7 @@ This method dynamically invokes the method reflected by this instance on `obj`, Access restrictions are ignored for fully trusted code. That is, private constructors, methods, fields, and properties can be accessed and invoked via reflection whenever the code is fully trusted. - If the invoked method throws an exception, the method returns the originating exception. + If the invoked method throws an exception, the method returns the originating exception. > [!NOTE] > This method can be used to access non-public members if the caller has been granted with the flag and if the grant set of the non-public members is restricted to the caller's grant set, or 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. @@ -1231,7 +1231,7 @@ This method dynamically invokes the method reflected by this instance on `obj`, ## Examples - The following example demonstrates all members of the class using an overload of . The private method `CanConvertFrom` finds compatible types for a given type. For another example of invoking members in a custom binding scenario, see [Dynamically Loading and Using Types](/dotnet/framework/reflection-and-codedom/dynamically-loading-and-using-types). + The following example demonstrates all members of the class using an overload of . The private method `CanConvertFrom` finds compatible types for a given type. For another example of invoking members in a custom binding scenario, see [Dynamically Loading and Using Types](/dotnet/framework/reflection-and-codedom/dynamically-loading-and-using-types). :::code language="csharp" source="~/snippets/csharp/System.Reflection/Binder/Overview/binder.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/Binder/Overview/binder.vb" id="Snippet1"::: @@ -1385,7 +1385,7 @@ This method dynamically invokes the method reflected by this instance on `obj`, The visibility of a method or constructor is exactly described by if the only visibility modifier is `internal` (`Friend` in Visual Basic). This property is `false` for methods that are `protected internal` in C# (`Protected Friend` in Visual Basic); use the property to identify such methods. ## Examples - The following code example defines methods with varying levels of visibility, and displays the values of their , , , and properties. + The following code example defines methods with varying levels of visibility, and displays the values of their , , , and properties. :::code language="csharp" source="~/snippets/csharp/System.Reflection/MethodBase/IsAssembly/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/MethodBase/IsAssembly/source.vb" id="Snippet1"::: @@ -1561,7 +1561,7 @@ This method dynamically invokes the method reflected by this instance on `obj`, The visibility of a method or constructor is exactly described by if the only visibility modifier is `protected`. This property is `false` for methods that are `protected internal` in C# (`Protected Friend` in Visual Basic); use the property to identify such methods. ## Examples - The following code example defines methods with varying levels of visibility, and displays the values of their , , , and properties. + The following code example defines methods with varying levels of visibility, and displays the values of their , , , and properties. :::code language="csharp" source="~/snippets/csharp/System.Reflection/MethodBase/IsAssembly/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/MethodBase/IsAssembly/source.vb" id="Snippet1"::: @@ -1630,7 +1630,7 @@ This method dynamically invokes the method reflected by this instance on `obj`, The visibility of a method or constructor is exactly described by if the visibility modifier is `private protected` in C# or `Private Protected` in Visual Basic. ## Examples - The following code example defines methods with varying levels of visibility, and displays the values of their , , , and properties. + The following code example defines methods with varying levels of visibility, and displays the values of their , , , and properties. :::code language="csharp" source="~/snippets/csharp/System.Reflection/MethodBase/IsAssembly/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/MethodBase/IsAssembly/source.vb" id="Snippet1"::: @@ -1703,7 +1703,7 @@ This method dynamically invokes the method reflected by this instance on `obj`, The visibility of a method or constructor is exactly described by if the visibility modifier is `protected internal` in C# (`Protected Friend` in Visual Basic). ## Examples - The following code example defines methods with varying levels of visibility, and displays the values of their , , , and properties. + The following code example defines methods with varying levels of visibility, and displays the values of their , , , and properties. :::code language="csharp" source="~/snippets/csharp/System.Reflection/MethodBase/IsAssembly/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/MethodBase/IsAssembly/source.vb" id="Snippet1"::: @@ -1853,7 +1853,7 @@ The following table summarizes the invariant conditions for terms specific to ge |Term|Invariant condition| |---|---| -|generic method definition| The property is `true`.
Defines a generic method. A constructed method is created by calling the method on a object that represents a generic method definition, and specifying an array of type arguments.
The method can be called only on generic method definitions.
Any generic method definition is a generic method, but the converse is not true.| +|generic method definition| The property is `true`.
Defines a generic method. A constructed method is created by calling the method on a object that represents a generic method definition, and specifying an array of type arguments.
The method can be called only on generic method definitions.
Any generic method definition is a generic method, but the converse is not true.| |generic method|The `IsGenericMethod` property is `true`.
Can be a generic method definition, an open constructed method, or a closed constructed method.| |open constructed method|The property is `true`.
It is not possible to invoke an open constructed method.| |closed constructed method|The property is `false`.
When examined recursively, the method has no unassigned generic parameters. The containing type has no generic type parameters, and none of the type arguments have generic type parameters.
The method can be invoked.| @@ -1919,7 +1919,7 @@ The following table summarizes the invariant conditions for terms specific to ge - The property is `true`. -- For each object in the array returned by the method: +- For each object in the array returned by the method: - The property is `true`. @@ -1990,7 +1990,7 @@ The following table summarizes the invariant conditions for terms specific to ge returns `false` on a member declared with the Visual Basic `Shadows` modifier, and `true` on a member declared with the C# `new` modifier. + When a member in a derived class is declared with the C# `new` modifier or the Visual Basic `Shadows` modifier, it can hide a member of the same name in the base class. C# hides base class members by signature. That is, if the base class member has multiple overloads, the only one that is hidden is the one that has the identical signature. By contrast, Visual Basic hides all the base class overloads. Thus, returns `false` on a member declared with the Visual Basic `Shadows` modifier, and `true` on a member declared with the C# `new` modifier. > [!WARNING] > This property does not determine whether a method has the attribute. A method that is declared with either the `new` or the `Shadows` modifier will have the attribute, but only methods declared with `new` (that is, only C# methods) will have the property set to `true`. To determine whether a method has the attribute, use code similar to the following: `if ((myMethodInfo.Attributes & MethodAttributes.VtableLayoutMask) == MethodAttributes.NewSlot)` in C# or `If (myMethodInfo.Attributes And MethodAttributes.VtableLayoutMask) = MethodAttributes.NewSlot` in Visual Basic. Note, however, that although all methods declared with `new` or `Shadows` have the attribute, not all methods that have the attribute are declared with `new` or `Shadows`. @@ -2181,7 +2181,7 @@ The following table summarizes the invariant conditions for terms specific to ge , , and properties report the transparency level of the method or constructor at its current trust level, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: + The , , and properties report the transparency level of the method or constructor at its current trust level, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: |Security level|IsSecurityCritical|IsSecuritySafeCritical|IsSecurityTransparent| |--------------------|------------------------|----------------------------|---------------------------| @@ -2192,7 +2192,7 @@ The following table summarizes the invariant conditions for terms specific to ge Using these properties is much simpler than examining the security annotations of an assembly and its types and members, checking the current trust level, and attempting to duplicate the runtime's rules. > [!IMPORTANT] -> For partial-trust assemblies, the value of this property depends on the current trust level of the assembly. If the assembly is loaded into a partially trusted application domain (for example, into a sandboxed application domain), the runtime ignores the security annotations of the assembly. The assembly and all its types are treated as transparent. The runtime pays attention to the security annotations of a partial-trust assembly only when that assembly is loaded into a fully trusted application domain (for example, into the default application domain of a desktop application). By contrast, a trusted assembly (that is, a strong-named assembly that is installed in the global assembly cache) is always loaded with full trust regardless of the trust level of the application domain, so its current trust level is always fully trusted. You can determine the current trust levels of assemblies and application domains by using the and properties. +> For partial-trust assemblies, the value of this property depends on the current trust level of the assembly. If the assembly is loaded into a partially trusted application domain (for example, into a sandboxed application domain), the runtime ignores the security annotations of the assembly. The assembly and all its types are treated as transparent. The runtime pays attention to the security annotations of a partial-trust assembly only when that assembly is loaded into a fully trusted application domain (for example, into the default application domain of a desktop application). By contrast, a trusted assembly (that is, a strong-named assembly that is installed in the global assembly cache) is always loaded with full trust regardless of the trust level of the application domain, so its current trust level is always fully trusted. You can determine the current trust levels of assemblies and application domains by using the and properties. For more information about reflection and transparency, see [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection). For information about transparency, see [Security Changes](/dotnet/framework/security/security-changes). @@ -2249,7 +2249,7 @@ The following table summarizes the invariant conditions for terms specific to ge , , and properties report the transparency level of the method or constructor at its current trust level, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: + The , , and properties report the transparency level of the method or constructor at its current trust level, as determined by the common language runtime (CLR). The combinations of these properties are shown in the following table: |Security level|IsSecurityCritical|IsSecuritySafeCritical|IsSecurityTransparent| |--------------------|------------------------|----------------------------|---------------------------| @@ -2260,7 +2260,7 @@ The following table summarizes the invariant conditions for terms specific to ge Using these properties is much simpler than examining the security annotations of an assembly and its types and members, checking the current trust level, and attempting to duplicate the runtime's rules. > [!IMPORTANT] -> For partial-trust assemblies, the value of this property depends on the current trust level of the assembly. If the assembly is loaded into a partially trusted application domain (for example, into a sandboxed application domain), the runtime ignores the security annotations of the assembly. The assembly and all its types are treated as transparent. The runtime pays attention to the security annotations of a partial-trust assembly only when that assembly is loaded into a fully trusted application domain (for example, into the default application domain of a desktop application). By contrast, a trusted assembly (that is, a strong-named assembly that is installed in the global assembly cache) is always loaded with full trust regardless of the trust level of the application domain, so its current trust level is always fully trusted. You can determine the current trust levels of assemblies and application domains by using the and properties. +> For partial-trust assemblies, the value of this property depends on the current trust level of the assembly. If the assembly is loaded into a partially trusted application domain (for example, into a sandboxed application domain), the runtime ignores the security annotations of the assembly. The assembly and all its types are treated as transparent. The runtime pays attention to the security annotations of a partial-trust assembly only when that assembly is loaded into a fully trusted application domain (for example, into the default application domain of a desktop application). By contrast, a trusted assembly (that is, a strong-named assembly that is installed in the global assembly cache) is always loaded with full trust regardless of the trust level of the application domain, so its current trust level is always fully trusted. You can determine the current trust levels of assemblies and application domains by using the and properties. For more information about reflection and transparency, see [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection). For information about transparency, see [Security Changes](/dotnet/framework/security/security-changes). @@ -2317,12 +2317,12 @@ The following table summarizes the invariant conditions for terms specific to ge and properties return `false`. + If this property returns `true`, the and properties return `false`. - The , , and properties report the transparency level of the method or constructor at its current trust level, as determined by the common language runtime (CLR). Using these properties is much simpler than examining the security annotations of an assembly and its types and members, checking the current trust level, and attempting to duplicate the runtime's rules. + The , , and properties report the transparency level of the method or constructor at its current trust level, as determined by the common language runtime (CLR). Using these properties is much simpler than examining the security annotations of an assembly and its types and members, checking the current trust level, and attempting to duplicate the runtime's rules. > [!IMPORTANT] -> For partial-trust assemblies, the value of this property depends on the current trust level of the assembly. If the assembly is loaded into a partially trusted application domain (for example, into a sandboxed application domain), the runtime ignores the security annotations of the assembly. The assembly and all its types are treated as transparent. The runtime pays attention to the security annotations of a partial-trust assembly only when that assembly is loaded into a fully trusted application domain (for example, into the default application domain of a desktop application). By contrast, a trusted assembly (that is, a strong-named assembly that is installed in the global assembly cache) is always loaded with full trust regardless of the trust level of the application domain, so its current trust level is always fully trusted. You can determine the current trust levels of assemblies and application domains by using the and properties. +> For partial-trust assemblies, the value of this property depends on the current trust level of the assembly. If the assembly is loaded into a partially trusted application domain (for example, into a sandboxed application domain), the runtime ignores the security annotations of the assembly. The assembly and all its types are treated as transparent. The runtime pays attention to the security annotations of a partial-trust assembly only when that assembly is loaded into a fully trusted application domain (for example, into the default application domain of a desktop application). By contrast, a trusted assembly (that is, a strong-named assembly that is installed in the global assembly cache) is always loaded with full trust regardless of the trust level of the application domain, so its current trust level is always fully trusted. You can determine the current trust levels of assemblies and application domains by using the and properties. For more information about reflection and transparency, see [Security Considerations for Reflection](/dotnet/framework/reflection-and-codedom/security-considerations-for-reflection). For information about transparency, see [Security Changes](/dotnet/framework/security/security-changes). @@ -2392,7 +2392,7 @@ The following table summarizes the invariant conditions for terms specific to ge ## Examples - This example shows a use of to filter internal or private members out of a list. + This example shows a use of to filter internal or private members out of a list. :::code language="csharp" source="~/snippets/csharp/System.Reflection/MethodBase/IsSpecialName/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/MethodBase/IsSpecialName/source.vb" id="Snippet1"::: @@ -2519,7 +2519,7 @@ The following table summarizes the invariant conditions for terms specific to ge ## Remarks A virtual member may reference instance data in a class and must be referenced through an instance of the class. - To determine if a method is overridable, it is not sufficient to check that `IsVirtual` is `true`. For a method to be overridable, `IsVirtual` must be `true` and must be `false`. For example, a method might be non-virtual, but it implements an interface method. The common language runtime requires that all methods that implement interface members must be marked as `virtual`; therefore, the compiler marks the method `virtual final`. So there are cases where a method is marked as `virtual` but is still not overridable. + To determine if a method is overridable, it is not sufficient to check that `IsVirtual` is `true`. For a method to be overridable, `IsVirtual` must be `true` and must be `false`. For example, a method might be non-virtual, but it implements an interface method. The common language runtime requires that all methods that implement interface members must be marked as `virtual`; therefore, the compiler marks the method `virtual final`. So there are cases where a method is marked as `virtual` but is still not overridable. To establish with certainty whether a method is overridable, use code such as this: @@ -2533,7 +2533,7 @@ If MethodInfo.IsVirtual AndAlso Not MethodInfo.IsFinal Then If `IsVirtual` is `false` or `IsFinal` is `true`, then the method cannot be overridden. - You can determine whether the current method overrides a method in a base class by calling the method. The following example implements an `IsOverride` method that does this. + You can determine whether the current method overrides a method in a base class by calling the method. The following example implements an `IsOverride` method that does this. :::code language="csharp" source="~/snippets/csharp/System.Reflection/MethodBase/IsVirtual/IsOverride1.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/MethodBase/IsVirtual/IsOverride1.vb" id="Snippet2"::: @@ -2655,7 +2655,7 @@ If MethodInfo.IsVirtual AndAlso Not MethodInfo.IsFinal Then method for more information. + See the method for more information. ]]> diff --git a/xml/System.Reflection/MethodBody.xml b/xml/System.Reflection/MethodBody.xml index 090aca7d5d1..9cf6a542a64 100644 --- a/xml/System.Reflection/MethodBody.xml +++ b/xml/System.Reflection/MethodBody.xml @@ -64,17 +64,17 @@ ## Remarks The class provides access to information about the local variables and exception-handling clauses in a method body, and to the Microsoft intermediate language (MSIL) that makes up the method body. - You can use the token-resolution methods of the module class, such as , , and , to resolve the tokens in the method body to objects, objects, and objects that provide detailed information about the types, methods, and fields accessed by the MSIL in the method body. + You can use the token-resolution methods of the module class, such as , , and , to resolve the tokens in the method body to objects, objects, and objects that provide detailed information about the types, methods, and fields accessed by the MSIL in the method body. > [!NOTE] > Parsing method bodies requires a thorough understanding of metadata and MSIL instruction formats. Information can be found in the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), especially "Partition II: Metadata Definition and Semantics". - To obtain a object for a given method, first obtain a object for the method, then call the object's method. + To obtain a object for a given method, first obtain a object for the method, then call the object's method. ## Examples - The following code example defines a test method named `MethodBodyExample` and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. + The following code example defines a test method named `MethodBodyExample` and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The example uses the property to obtain a list of objects and then displays their types and index order. The property is used to obtain a list of exception-handling clauses. @@ -180,7 +180,7 @@ > Working with exception-handling clauses requires a thorough understanding of metadata and MSIL instruction formats. Information can be found in the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), especially "Partition II: Metadata Definition and Semantics". ## Examples - The following code example defines a test method named `MethodBodyExample` and displays information about its exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects. + The following code example defines a test method named `MethodBodyExample` and displays information about its exception-handling clauses. The method is used to obtain a object for the test method. The property is used to obtain a list of objects. This code example is part of a larger example provided for the class. @@ -249,7 +249,7 @@ , , and , to resolve the tokens in the method body to objects, objects, and objects that provide detailed information about the types, methods, and fields accessed by the MSIL in the method body. + You can use the token-resolution methods of the module class, such as , , and , to resolve the tokens in the method body to objects, objects, and objects that provide detailed information about the types, methods, and fields accessed by the MSIL in the method body. > [!NOTE] > Parsing method bodies requires a thorough understanding of metadata and MSIL instruction formats. Information can be found in the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), especially "Partition II: Metadata Definition and Semantics". @@ -313,7 +313,7 @@ ## Examples - The following code example defines a test method named `MethodBodyExample` and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The and properties are displayed. + The following code example defines a test method named `MethodBodyExample` and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The and properties are displayed. This code example is part of a larger example provided for the class. @@ -430,7 +430,7 @@ ## Examples - The following code example defines a test method named `MethodBodyExample` and displays its local variable information. The method is used to obtain a object for the test method. The property is used to obtain a list of objects. + The following code example defines a test method named `MethodBodyExample` and displays its local variable information. The method is used to obtain a object for the test method. The property is used to obtain a list of objects. This code example is part of a larger example provided for the class. @@ -496,7 +496,7 @@ For more information, see the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics" and "Partition III: CIL Instruction Set". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). ## Examples - The following code example defines a test method named `MethodBodyExample` and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The and properties are displayed. + The following code example defines a test method named `MethodBodyExample` and displays its local variable information and exception-handling clauses. The method is used to obtain a object for the test method. The and properties are displayed. This code example is part of a larger example provided for the class. diff --git a/xml/System.Reflection/MethodInfo.xml b/xml/System.Reflection/MethodInfo.xml index 652d497bbc9..9481db14f90 100644 --- a/xml/System.Reflection/MethodInfo.xml +++ b/xml/System.Reflection/MethodInfo.xml @@ -99,19 +99,19 @@ ## Remarks The class represents a method of a type. You can use a object to obtain information about the method that the object represents and to invoke the method. For example: -- You can determine the method's visibility by retrieving the values of the , , , and properties. +- You can determine the method's visibility by retrieving the values of the , , , and properties. -- You can discover what attributes are applied to the method by retrieving the value of the property or calling the method. +- You can discover what attributes are applied to the method by retrieving the value of the property or calling the method. -- You can determine whether the method is a generic method, an open constructed generic method, or a closed constructed generic method, by retrieving the values of the and properties. +- You can determine whether the method is a generic method, an open constructed generic method, or a closed constructed generic method, by retrieving the values of the and properties. -- You can get information about the method's parameters and return type from the method and the , , and properties. +- You can get information about the method's parameters and return type from the method and the , , and properties. -- You can execute a method on a class instance by calling the method. +- You can execute a method on a class instance by calling the method. -- You can instantiate a object that represents a constructed generic method from one that represents a generic method definition by calling the method. +- You can instantiate a object that represents a constructed generic method from one that represents a generic method definition by calling the method. - You can instantiate a instances by calling the or method, or by calling the method of a object that represents a generic method definition. + You can instantiate a instances by calling the or method, or by calling the method of a object that represents a generic method definition. For a list of the invariant conditions for terms specific to generic methods, see the property. For a list of the invariant conditions for other terms used in generic reflection, see the property. @@ -554,37 +554,37 @@ For a list of the invariant conditions for other terms used in generic reflectio method returns the first definition of the specified method in the class hierarchy. You can determine the type on which the first definition of the method is found by retrieving the value of the property on the returned object. + The method returns the first definition of the specified method in the class hierarchy. You can determine the type on which the first definition of the method is found by retrieving the value of the property on the returned object. - The method behaves as follows: + The method behaves as follows: -- If the current object represents an interface implementation, the method returns the current object. +- If the current object represents an interface implementation, the method returns the current object. -- If the current object represents a method that overrides a virtual definition in a base class, the method returns a object that represents the virtual definition. +- If the current object represents a method that overrides a virtual definition in a base class, the method returns a object that represents the virtual definition. -- If the current object represents a method that is specified with the `new` keyword in C# or the `Shadows` keyword in Visual Basic (as in `newslot`, as described in [Common Type System](/dotnet/standard/base-types/common-type-system)), the method returns the current object. +- If the current object represents a method that is specified with the `new` keyword in C# or the `Shadows` keyword in Visual Basic (as in `newslot`, as described in [Common Type System](/dotnet/standard/base-types/common-type-system)), the method returns the current object. -- If the current object represents an inherited method (that is, the current method does not provide its own implementation), the method returns a object that represents the lowest method in the class hierarchy. For example, if `Base.ToString` overrides `Object.ToString`, and `Derived.ToString` overrides `Base.ToString`, calling the method on a object that represents `Derived.ToString` returns a object that represents `Object.ToString`. +- If the current object represents an inherited method (that is, the current method does not provide its own implementation), the method returns a object that represents the lowest method in the class hierarchy. For example, if `Base.ToString` overrides `Object.ToString`, and `Derived.ToString` overrides `Base.ToString`, calling the method on a object that represents `Derived.ToString` returns a object that represents `Object.ToString`. -- If the current object represents a method that is not present in any base class, the method returns the current object. +- If the current object represents a method that is not present in any base class, the method returns the current object. - You can determine whether the current method overrides a method in a base class by calling the method. The following example implements an `IsOverride` method that does this. + You can determine whether the current method overrides a method in a base class by calling the method. The following example implements an `IsOverride` method that does this. :::code language="csharp" source="~/snippets/csharp/System.Reflection/MethodBase/IsVirtual/IsOverride1.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/MethodBase/IsVirtual/IsOverride1.vb" id="Snippet2"::: To call the `GetBaseDefinition` method: -1. Get a object that represents the type (the class or structure) that contains the property. If you are working with an object (an instance of a type), you can call its method. Otherwise, you can use the C# operator or the Visual Basic [GetType](/dotnet/visual-basic/language-reference/operators/gettype-operator) operator, as the example illustrates. +1. Get a object that represents the type (the class or structure) that contains the property. If you are working with an object (an instance of a type), you can call its method. Otherwise, you can use the C# operator or the Visual Basic [GetType](/dotnet/visual-basic/language-reference/operators/gettype-operator) operator, as the example illustrates. -2. Get a object that represents the method in which you're interested. You can do this by getting an array of all methods from the method and then iterating the elements in the array, or you can retrieve the object that represents the method directly by calling the method and specifying the method name. +2. Get a object that represents the method in which you're interested. You can do this by getting an array of all methods from the method and then iterating the elements in the array, or you can retrieve the object that represents the method directly by calling the method and specifying the method name. -3. Call the method to get the value of the object that represents the base method definition. +3. Call the method to get the value of the object that represents the base method definition. ## Examples - The following example demonstrates the behavior of the method. + The following example demonstrates the behavior of the method. :::code language="csharp" source="~/snippets/csharp/System.Reflection/MethodBase/IsVirtual/getbasedefinition1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/MethodBase/IsVirtual/getbasedefinition1.vb" id="Snippet1"::: @@ -651,7 +651,7 @@ For a list of the invariant conditions for other terms used in generic reflectio ## Remarks The elements of the returned array are in the order in which they appear in the list of type parameters for the generic method. -- If the current method is a closed constructed method (that is, the property returns `false`), the array returned by the method contains the types that have been assigned to the generic type parameters of the generic method definition. +- If the current method is a closed constructed method (that is, the property returns `false`), the array returned by the method contains the types that have been assigned to the generic type parameters of the generic method definition. - If the current method is a generic method definition, the array contains the type parameters. @@ -662,7 +662,7 @@ For a list of the invariant conditions for other terms used in generic reflectio ## Examples The following code example shows how to get the type arguments of a generic method and display them. - This example is part of a larger example provided for the method. + This example is part of a larger example provided for the method. :::code language="csharp" source="~/snippets/csharp/System/Type/DeclaringMethod/source.cs" id="Snippet8"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/DeclaringMethod/source.vb" id="Snippet8"::: @@ -733,11 +733,11 @@ For a list of the invariant conditions for other terms used in generic reflectio (T t)` (expressed in C# syntax; `Function M(Of T)(ByVal tVal As T) As T` in Visual Basic) you can construct and invoke the method `int M(int t)` (`Function M(Of Integer)(ByVal tVal As Integer) As Integer` in Visual Basic). Given a object representing this constructed method, the method returns the generic method definition. + A generic method definition is a template from which methods can be constructed. For example, from the generic method definition `T M(T t)` (expressed in C# syntax; `Function M(Of T)(ByVal tVal As T) As T` in Visual Basic) you can construct and invoke the method `int M(int t)` (`Function M(Of Integer)(ByVal tVal As Integer) As Integer` in Visual Basic). Given a object representing this constructed method, the method returns the generic method definition. - If two constructed methods are created from the same generic method definition, the method returns the same object for both methods. + If two constructed methods are created from the same generic method definition, the method returns the same object for both methods. - If you call on a that already represents a generic method definition, it returns the current . + If you call on a that already represents a generic method definition, it returns the current . If a generic method definition includes generic parameters of the declaring type, there will be a generic method definition specific to each constructed type. For example, consider the following code: @@ -756,7 +756,7 @@ Class C(Of T) End Class ``` - In the constructed type `C` (`C(Of Integer)` in Visual Basic), the generic method `M` returns `B`. In the open type `C`, `M` returns `B`. In both cases, the property returns `true` for the that represents `M`, so can be called on both objects. In the case of the constructed type, the result of calling is a that can be invoked. In the case of the open type, the returned by cannot be invoked. + In the constructed type `C` (`C(Of Integer)` in Visual Basic), the generic method `M` returns `B`. In the open type `C`, `M` returns `B`. In both cases, the property returns `true` for the that represents `M`, so can be called on both objects. In the case of the constructed type, the result of calling is a that can be invoked. In the case of the open type, the returned by cannot be invoked. For a list of the invariant conditions for terms specific to generic methods, see the property. For a list of the invariant conditions for other terms used in generic reflection, see the property. @@ -765,7 +765,7 @@ End Class ## Examples The following code example shows a class with a generic method and the code required to obtain a for the method, bind the method to type arguments, and get the original generic type definition back from the bound method. - This example is part of a larger example provided for the method. + This example is part of a larger example provided for the method. :::code language="csharp" source="~/snippets/csharp/System/Type/DeclaringMethod/source.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System/Type/DeclaringMethod/source.vb" id="Snippet2"::: @@ -1027,7 +1027,7 @@ Use the `IsGenericMethodDefinition` property to determine whether type arguments The method body of M contains a call to method N, specifying the type parameter of M and the type . The `IsGenericMethodDefinition` property returns false for method `N`. > [!NOTE] -> Although the open constructed method `N` is not encountered when reflecting over class C, it must be generated using in order to emit C as a dynamic class. +> Although the open constructed method `N` is not encountered when reflecting over class C, it must be generated using in order to emit C as a dynamic class. If a generic method definition includes generic parameters of the declaring type, there will be a generic method definition specific to each constructed type. For example, consider the following code: @@ -1063,7 +1063,7 @@ For a list of the invariant conditions for terms specific to generic methods, se The following code example uses the `IsGenericMethodDefinition` property to display a message indicating whether a represents a generic method definition. -This example is part of a larger example provided for the method. +This example is part of a larger example provided for the method. ```vb Console.WriteLine(vbTab _ @@ -1157,9 +1157,9 @@ Console::WriteLine("\tIs this a generic method definition? {0}", method allows you to write code that assigns specific types to the type parameters of a generic method definition, thus creating a object that represents a particular constructed method. If the property of this object returns `true`, you can use it to invoke the method or to create a delegate to invoke the method. + The method allows you to write code that assigns specific types to the type parameters of a generic method definition, thus creating a object that represents a particular constructed method. If the property of this object returns `true`, you can use it to invoke the method or to create a delegate to invoke the method. - Methods constructed with the method can be open, that is, some of their type arguments can be type parameters of enclosing generic types. You might use such open constructed methods when you generate dynamic assemblies. For example, consider the following code. + Methods constructed with the method can be open, that is, some of their type arguments can be type parameters of enclosing generic types. You might use such open constructed methods when you generate dynamic assemblies. For example, consider the following code. ```csharp class C @@ -1273,7 +1273,7 @@ End Class . Therefore, when you examine a set of objects - for example, the array returned by - the property returns only when a given member is a method. + This property overrides . Therefore, when you examine a set of objects - for example, the array returned by - the property returns only when a given member is a method. To get the `MemberType` property, first get the class `Type`. From the `Type`, get the `MethodInfo`. From the `MethodInfo`, get the `MemberType`. diff --git a/xml/System.Reflection/Module.xml b/xml/System.Reflection/Module.xml index 0e763ff51a9..404021f8222 100644 --- a/xml/System.Reflection/Module.xml +++ b/xml/System.Reflection/Module.xml @@ -606,7 +606,7 @@ . + To get the name without the path, use . If the assembly for this module was loaded from a byte array then the `FullyQualifiedName` for the module will be: \. @@ -811,7 +811,7 @@ and cannot be used in such cases, because they create instances of the attributes. Code in the reflection-only context cannot be executed. For more information and example code, see the class. + Use this method to examine the custom attributes of code in the reflection-only context, in cases where the custom attributes themselves are defined in code that is loaded into the reflection-only context. Methods such as and cannot be used in such cases, because they create instances of the attributes. Code in the reflection-only context cannot be executed. For more information and example code, see the class. ]]> @@ -1024,7 +1024,7 @@ method does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned, because that order can vary. + The method does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned, because that order can vary. ]]> @@ -1091,7 +1091,7 @@ method does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned, because that order can vary. + The method does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned, because that order can vary. ]]> @@ -1824,7 +1824,7 @@ > [!NOTE] > If the type has been forwarded to another assembly, it is still returned by this method. For information on type forwarding, see [Type Forwarding in the Common Language Runtime](/dotnet/standard/assembly/type-forwarding). - A type can be retrieved from a specific module using . Calling on the module that contains the manifest will not search the entire assembly. To retrieve a type from an assembly, regardless of which module it is in, you must call . + A type can be retrieved from a specific module using . Calling on the module that contains the manifest will not search the entire assembly. To retrieve a type from an assembly, regardless of which module it is in, you must call . @@ -1936,7 +1936,7 @@ > [!NOTE] > If the type has been forwarded to another assembly, it is still returned by this method. For information on type forwarding, see [Type Forwarding in the Common Language Runtime](/dotnet/standard/assembly/type-forwarding). - A type can be retrieved from a specific module using . Calling on the module that contains the manifest will not search the entire assembly. To retrieve a type from an assembly, regardless of which module it is in, you must call . + A type can be retrieved from a specific module using . Calling on the module that contains the manifest will not search the entire assembly. To retrieve a type from an assembly, regardless of which module it is in, you must call . @@ -2047,7 +2047,7 @@ > [!NOTE] > If the type has been forwarded to another assembly, it is still returned by this method. For information on type forwarding, see [Type Forwarding in the Common Language Runtime](/dotnet/standard/assembly/type-forwarding). - A type can be retrieved from a specific module using . Calling on the module that contains the manifest will not search the entire assembly. To retrieve a type from an assembly, regardless of which module it is in, you must call . + A type can be retrieved from a specific module using . Calling on the module that contains the manifest will not search the entire assembly. To retrieve a type from an assembly, regardless of which module it is in, you must call . @@ -2558,7 +2558,7 @@ If the assembly for this module was loaded from a byte array then the `FullyQualifiedName` for the module will be: \. - To get the name and the path, use . + To get the name and the path, use . @@ -2740,12 +2740,12 @@ method overload, which allows you to supply the necessary context. That is, when you are resolving a metadata token for a field that depends on the generic type parameters of the generic type and/or the generic method in which the token is embedded, you must use the overload that allows you to supply those type parameters. + To resolve a metadata token that identifies a field whose parent `TypeSpec` has a signature containing element type `ELEMENT_TYPE_VAR` or `ELEMENT_TYPE_MVAR`, use the method overload, which allows you to supply the necessary context. That is, when you are resolving a metadata token for a field that depends on the generic type parameters of the generic type and/or the generic method in which the token is embedded, you must use the overload that allows you to supply those type parameters. > [!NOTE] > Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). - For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. + For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. ]]> @@ -2838,12 +2838,12 @@ method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. It is always safe to provide these arguments, even when they are not needed. + Use the method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. It is always safe to provide these arguments, even when they are not needed. > [!NOTE] > Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). - For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. + For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. ]]> @@ -2923,12 +2923,12 @@ method overload, which allows you to supply the necessary context. That is, when you are resolving a metadata token for a member that depends on the generic type parameters of the generic type and/or the generic method in which the token is embedded, you must use the overload that allows you to supply those type parameters. + To resolve a metadata token for a `MethodSpec` or `TypeSpec` whose signature contains element type `ELEMENT_TYPE_VAR` or `ELEMENT_TYPE_MVAR`, use the method overload, which allows you to supply the necessary context. That is, when you are resolving a metadata token for a member that depends on the generic type parameters of the generic type and/or the generic method in which the token is embedded, you must use the overload that allows you to supply those type parameters. > [!NOTE] > Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). - For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. + For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. ]]> @@ -3025,12 +3025,12 @@ method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. It is always safe to provide these arguments, even when they are not needed. + Use the method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. It is always safe to provide these arguments, even when they are not needed. > [!NOTE] > Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). - For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. + For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. ]]> @@ -3114,7 +3114,7 @@ method overload, which allows you to supply the necessary context. That is, when you are resolving a metadata token for a method that depends on the generic type parameters of the generic type and/or the generic method in which the token is embedded, you must use the overload that allows you to supply those type parameters. + To resolve a metadata token for a `MethodSpec` whose signature contains element type `ELEMENT_TYPE_VAR` or `ELEMENT_TYPE_MVAR`, use the method overload, which allows you to supply the necessary context. That is, when you are resolving a metadata token for a method that depends on the generic type parameters of the generic type and/or the generic method in which the token is embedded, you must use the overload that allows you to supply those type parameters. > [!NOTE] > Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). @@ -3122,7 +3122,7 @@ ## Examples - The following example shows how to use the two overloads of the method to resolve metadata tokens from call sites in generic and non-generic contexts. + The following example shows how to use the two overloads of the method to resolve metadata tokens from call sites in generic and non-generic contexts. The code example defines two generic types, `G1` and `G2` (`G1(Of Tg1)` and `G2(Of Tg2)` in Visual Basic), each of which has a generic method. `G1` also has a non-generic method that uses the type parameter `Tg1` for its parameter. The generic method `GM2` in type `G2` contains several method calls: @@ -3138,9 +3138,9 @@ - Case 5: The generic method `GM1` is called, specifying and for the type arguments of the generic type and the generic method, respectively. The context for this method has no enclosing generic type or generic method. - For each case, the example first constructs a that represents the called method, and then resolves the token using the method overload, using the and methods to get the values for the `genericTypeArguments` and `genericMethodArguments` parameters. This technique works in all cases, because the methods return for non-generic contexts. The example compares the resolved with the constructed . + For each case, the example first constructs a that represents the called method, and then resolves the token using the method overload, using the and methods to get the values for the `genericTypeArguments` and `genericMethodArguments` parameters. This technique works in all cases, because the methods return for non-generic contexts. The example compares the resolved with the constructed . - The example then attempts to use the method overload to resolve the token. This works in cases 3, 4, and 5, because the method calls do not depend on the generic context. In cases 1 and 2, an exception is thrown because there is insufficient information to resolve the token. + The example then attempts to use the method overload to resolve the token. This works in cases 3, 4, and 5, because the method calls do not depend on the generic context. In cases 1 and 2, an exception is thrown because there is insufficient information to resolve the token. The metadata token values are hard-coded as an enumeration. If you change this code example, the token values are likely to change. To determine the new token values, compile the code and use Ildasm.exe with the **/TOKENS** option to examine the assembly. The tokens can be found at the points of call. Insert the new values into the enumeration, and recompile the example. @@ -3238,7 +3238,7 @@ method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericMethodArguments`. It is always safe to provide these arguments, even when they are not needed. + Use the method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericMethodArguments`. It is always safe to provide these arguments, even when they are not needed. > [!NOTE] > Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). @@ -3246,7 +3246,7 @@ ## Examples - The following example shows how to use the two overloads of the method to resolve metadata tokens from call sites in generic and non-generic contexts. + The following example shows how to use the two overloads of the method to resolve metadata tokens from call sites in generic and non-generic contexts. The code example defines two generic types, `G1` and `G2`, each of which has a generic method. `G1` also has a non-generic method that uses the type parameter `Tg1` for its parameter. The generic method `GM2` in type `G2` contains several method calls: @@ -3262,9 +3262,9 @@ - Case 5: The generic method `GM1` is called, specifying and for the type arguments of the generic type and the generic method, respectively. The context for this method has no enclosing generic type or generic method. - For each case, the example first constructs a that represents the called method, and then resolves the token using the method overload, using the and methods to get the values for the `genericTypeArguments` and `genericMethodArguments` parameters. This technique works in all cases, because the methods return for non-generic contexts. The example compares the resolved with the constructed . + For each case, the example first constructs a that represents the called method, and then resolves the token using the method overload, using the and methods to get the values for the `genericTypeArguments` and `genericMethodArguments` parameters. This technique works in all cases, because the methods return for non-generic contexts. The example compares the resolved with the constructed . - The example then attempts to use the method overload to resolve the token. This works in cases 3, 4, and 5, because the method calls do not depend on the generic context. In cases 1 and 2, an exception is thrown because there is insufficient information to resolve the token. + The example then attempts to use the method overload to resolve the token. This works in cases 3, 4, and 5, because the method calls do not depend on the generic context. In cases 1 and 2, an exception is thrown because there is insufficient information to resolve the token. The metadata token values are hard-coded as an enumeration. If you change this code example, the token values are likely to change. To determine the new token values, compile the code and use Ildasm.exe with the **/TOKENS** option to examine the assembly. The tokens can be found at the points of call. Insert the new values into the enumeration, and recompile the example. @@ -3492,7 +3492,7 @@ method overload, which allows you to supply the necessary context. That is, when you are resolving a metadata token for a type that depends on the generic type parameters of the generic type and/or the generic method in which the token is embedded, you must use the overload that allows you to supply those type parameters. + To resolve a metadata token for a `TypeSpec` whose signature contains `ELEMENT_TYPE_VAR` or `ELEMENT_TYPE_MVAR`, use the method overload, which allows you to supply the necessary context. That is, when you are resolving a metadata token for a type that depends on the generic type parameters of the generic type and/or the generic method in which the token is embedded, you must use the overload that allows you to supply those type parameters. > [!NOTE] > Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). @@ -3588,12 +3588,12 @@ method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. It is always safe to provide these arguments, even when they are not needed. + Use the method on the type where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. Use the method on the method where `metadataToken` is in scope to obtain an array of generic type arguments for `genericTypeArguments`. It is always safe to provide these arguments, even when they are not needed. > [!NOTE] > Information about metadata tokens can be found in the Common Language Infrastructure (CLI) documentation, especially "Partition II: Metadata Definition and Semantics". For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). - For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. + For code that demonstrates token resolution using the generic context (that is, the generic type parameters of the generic type and/or the generic method in which the token is embedded) see the method. ]]> diff --git a/xml/System.Reflection/ObfuscationAttribute.xml b/xml/System.Reflection/ObfuscationAttribute.xml index 43d8866ffb5..5c670ed3507 100644 --- a/xml/System.Reflection/ObfuscationAttribute.xml +++ b/xml/System.Reflection/ObfuscationAttribute.xml @@ -252,7 +252,7 @@ ## Examples - The following code example shows a type that is marked to be excluded from obfuscation. It is not necessary to specify the property, because it defaults to `true`, but specifying it explicitly makes your intent clear. The is set to `false`, so that the exclusion from obfuscation does not apply to the members of the class. That is, the class name is visible but the members are obfuscated. + The following code example shows a type that is marked to be excluded from obfuscation. It is not necessary to specify the property, because it defaults to `true`, but specifying it explicitly makes your intent clear. The is set to `false`, so that the exclusion from obfuscation does not apply to the members of the class. That is, the class name is visible but the members are obfuscated. The `MethodA` method is marked with the value `"default"` for the property. It is necessary to specify `false` for the property in order to avoid excluding `MethodA` from obfuscation, because the default for the property is `true`. The property is `false` so that the obfuscation tool will not strip the attribute after obfuscation. diff --git a/xml/System.Reflection/ParameterInfo.xml b/xml/System.Reflection/ParameterInfo.xml index da19f064c24..1050bae6bb4 100644 --- a/xml/System.Reflection/ParameterInfo.xml +++ b/xml/System.Reflection/ParameterInfo.xml @@ -120,7 +120,7 @@ ## Remarks Use an instance of `ParameterInfo` to obtain information about the parameter's data type, default value, and so on. - returns an array of `ParameterInfo` objects representing the parameters of a method, in order. + returns an array of `ParameterInfo` objects representing the parameters of a method, in order. @@ -228,7 +228,7 @@ This method utilizes the method. -To get the array, first get the method or the constructor and then call . +To get the array, first get the method or the constructor and then call . ## Examples @@ -289,7 +289,7 @@ The following example defines a method with three parameters. It uses the . + Typical access to parameter attributes is through . ]]> @@ -349,7 +349,7 @@ The following example defines a method with three parameters. It uses the . + Typical access to parameter types is through . ]]> @@ -463,7 +463,7 @@ The following example defines a method with three parameters. It uses the method. - To get the array, first get the method or the constructor and then call . + To get the array, first get the method or the constructor and then call . ]]> @@ -523,7 +523,7 @@ The following example defines a method with three parameters. It uses the . + Typical access to the default value of the parameter is through . ]]> @@ -592,14 +592,14 @@ The following example defines a method with three parameters. It uses the method. + This method ignores the `inherit` parameter. To search the inheritance chain for attributes on parameters, use the appropriate overloads of the method. ## Examples The following example shows how custom attributes that have been applied to the parameters of methods can be retrieved at run time. The example defines a custom attribute named `MyAttribute` that can be applied to parameters. The example then defines a class named `MyClass` with a method named `MyMethod`, and applies `MyAttribute` to a parameter of the method. - When the example is run, it uses the method to retrieve the custom attributes that have been applied to all parameters of all methods in `MyClass`, and displays them at the console. + When the example is run, it uses the method to retrieve the custom attributes that have been applied to all parameters of all methods in `MyClass`, and displays them at the console. :::code language="csharp" source="~/snippets/csharp/System.Reflection/ParameterInfo/GetCustomAttributes/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/ParameterInfo/GetCustomAttributes/source.vb" id="Snippet1"::: @@ -664,7 +664,7 @@ The following example defines a method with three parameters. It uses the method. + This method ignores the `inherit` parameter. To search the inheritance chain for attributes on parameters, use the appropriate overloads of the method. ]]> @@ -719,7 +719,7 @@ The following example defines a method with three parameters. It uses the and cannot be used in such cases, because they create instances of the attributes. Code in the reflection-only context cannot be executed. For more information and example code, see the class. + Use this method to examine the custom attributes of code in the reflection-only context, in cases where the custom attributes themselves are defined in code that is loaded into the reflection-only context. Methods such as and cannot be used in such cases, because they create instances of the attributes. Code in the reflection-only context cannot be executed. For more information and example code, see the class. ]]> @@ -760,9 +760,9 @@ The following example defines a method with three parameters. It uses the , , and , which are used to obtain custom modifiers from a function pointer. + A modified type supports , , and , which are used to obtain custom modifiers from a function pointer. - To obtain the normal, unmodified type from a modified type, use . + To obtain the normal, unmodified type from a modified type, use . This method is provided for designers of managed compilers. For more information on custom modifiers, see classes in the namespace. Also see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). @@ -821,7 +821,7 @@ The following example defines a method with three parameters. It uses the and methods are provided for designers of managed compilers. For more information on custom modifiers, see and related classes in the namespace, and the metadata specification in the ECMA Partition II documentation. For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). + The and methods are provided for designers of managed compilers. For more information on custom modifiers, see and related classes in the namespace, and the metadata specification in the ECMA Partition II documentation. For more information, see [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). ]]> @@ -892,7 +892,7 @@ The following example defines a method with three parameters. It uses the method. + This method implements the method. ]]> @@ -946,7 +946,7 @@ The following example defines a method with three parameters. It uses the and methods are provided for designers of managed compilers. For more information on custom modifiers, see and related classes in the namespace, and the metadata specification in Partition II of [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). + The and methods are provided for designers of managed compilers. For more information on custom modifiers, see and related classes in the namespace, and the metadata specification in Partition II of [ECMA 335 Common Language Infrastructure (CLI)](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). ]]> @@ -1055,14 +1055,14 @@ The following example defines a method with three parameters. It uses the method. + This method ignores the `inherit` parameter. To search the inheritance chain for attributes on parameters, use the appropriate overloads of the method. ## Examples The following example defines two custom attributes, `MyAttribute` and `MyDerivedAttribute`. `MyDerivedAttribute` is derived from `MyAttribute`. The example then applies these attributes to the parameters of a method of an example class. - When the example is run, it uses the method to test all parameters of all methods in the example class. It then displays the parameters that have `MyAttribute` or `MyDerivedAttribute`. + When the example is run, it uses the method to test all parameters of all methods in the example class. It then displays the parameters that have `MyAttribute` or `MyDerivedAttribute`. :::code language="csharp" source="~/snippets/csharp/System.Reflection/ParameterInfo/IsDefined/parameterinfo_getcustomattribute_isdefined.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/ParameterInfo/IsDefined/parameterinfo_getcustomattribute_isdefined.vb" id="Snippet1"::: @@ -1129,7 +1129,7 @@ The following example defines a method with three parameters. It uses the array, first get the method or the constructor and then call . + To get the array, first get the method or the constructor and then call . @@ -1142,9 +1142,9 @@ The following example defines a method with three parameters. It uses the , the second with , and the third with . -- Calls to complete the type. +- Calls to complete the type. - After executing `DefineMethod`, the example searches the assemblies that are currently loaded until it finds the dynamic assembly. It loads `MyType` from the assembly, gets a object for the `MyMethod` method, and examines the parameters. The example uses the , , and properties to display information about the parameters. + After executing `DefineMethod`, the example searches the assemblies that are currently loaded until it finds the dynamic assembly. It loads `MyType` from the assembly, gets a object for the `MyMethod` method, and examines the parameters. The example uses the , , and properties to display information about the parameters. :::code language="csharp" source="~/snippets/csharp/System.Reflection/ParameterInfo/IsIn/parameterinfo_isin_isout_isoptional.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/ParameterInfo/IsIn/parameterinfo_isin_isout_isoptional.vb" id="Snippet1"::: @@ -1204,7 +1204,7 @@ The following example defines a method with three parameters. It uses the array, first get the method or the constructor and then call . + To get the array, first get the method or the constructor and then call . ]]> @@ -1264,7 +1264,7 @@ The following example defines a method with three parameters. It uses the array, first get the method and then call . + To get the array, first get the method and then call . @@ -1277,9 +1277,9 @@ The following example defines a method with three parameters. It uses the , the second with , and the third with . -- Calls to complete the type. +- Calls to complete the type. - After executing `DefineMethod`, the example searches the assemblies that are currently loaded until it finds the dynamic assembly. It loads `MyType` from the assembly, gets a object for the `MyMethod` method, and examines the parameters. The example uses the , , and properties to display information about the parameters. + After executing `DefineMethod`, the example searches the assemblies that are currently loaded until it finds the dynamic assembly. It loads `MyType` from the assembly, gets a object for the `MyMethod` method, and examines the parameters. The example uses the , , and properties to display information about the parameters. :::code language="csharp" source="~/snippets/csharp/System.Reflection/ParameterInfo/IsIn/parameterinfo_isin_isout_isoptional.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/ParameterInfo/IsIn/parameterinfo_isin_isout_isoptional.vb" id="Snippet1"::: @@ -1342,7 +1342,7 @@ The following example defines a method with three parameters. It uses the array, first get the method or the constructor and then call . + To get the array, first get the method or the constructor and then call . @@ -1355,9 +1355,9 @@ The following example defines a method with three parameters. It uses the , the second with , and the third with . -- Calls to complete the type. +- Calls to complete the type. - After executing `DefineMethod`, the example searches the assemblies that are currently loaded until it finds the dynamic assembly. It loads `MyType` from the assembly, gets a object for the `MyMethod` method, and examines the parameters. The example uses the , , and properties to display information about the parameters. + After executing `DefineMethod`, the example searches the assemblies that are currently loaded until it finds the dynamic assembly. It loads `MyType` from the assembly, gets a object for the `MyMethod` method, and examines the parameters. The example uses the , , and properties to display information about the parameters. :::code language="csharp" source="~/snippets/csharp/System.Reflection/ParameterInfo/IsOut/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/ParameterInfo/IsOut/source.vb" id="Snippet1"::: @@ -1420,7 +1420,7 @@ The following example defines a method with three parameters. It uses the array, first get the method or the constructor and then call . + To get the array, first get the method or the constructor and then call . ]]> @@ -1521,7 +1521,7 @@ The following example defines a method with three parameters. It uses the . + Typical access to the parameter name is through the . ]]> @@ -1641,7 +1641,7 @@ The following example defines a method with three parameters. It uses the field, and depends on an optional metadata flag that might not be available in all compilers. - To get the array, first get the method or the constructor and then call the method. + To get the array, first get the method or the constructor and then call the method. > [!WARNING] > If this represents a return value (that is, if it was obtained by using the property), this property will be `null`. @@ -1712,7 +1712,7 @@ The following example defines a method with three parameters. It uses the . + Typical access to the parameter name is through the . ]]> @@ -1769,7 +1769,7 @@ The following example defines a method with three parameters. It uses the array, first get the method or the constructor and then call . + To get the array, first get the method or the constructor and then call . @@ -1836,7 +1836,7 @@ The following example defines a method with three parameters. It uses the method. - To get the array, first get the method or the constructor and then call . + To get the array, first get the method or the constructor and then call . ]]>
@@ -1890,7 +1890,7 @@ The following example defines a method with three parameters. It uses the . + Typical access to the name of the parameter is through . ]]>
@@ -1953,7 +1953,7 @@ The following example defines a method with three parameters. It uses the array, first get the method or the constructor and then call the method. + To get the array, first get the method or the constructor and then call the method. ]]>
diff --git a/xml/System.Reflection/ParameterModifier.xml b/xml/System.Reflection/ParameterModifier.xml index 8a6916a7298..e155dfe268a 100644 --- a/xml/System.Reflection/ParameterModifier.xml +++ b/xml/System.Reflection/ParameterModifier.xml @@ -79,7 +79,7 @@ structure is used with the method overload when passing parameters by reference to a COM component that is accessed late bound. The parameters that are to be passed by reference are specified by a single structure, which must be passed in an array containing a single element. The single structure in this array must be initialized with the number of parameters in the member that is to be invoked. To indicate which of these parameters are passed by reference, set the value of the property (the indexer in C#) to `true` for the index number corresponding to the zero-based position of the parameter. + The structure is used with the method overload when passing parameters by reference to a COM component that is accessed late bound. The parameters that are to be passed by reference are specified by a single structure, which must be passed in an array containing a single element. The single structure in this array must be initialized with the number of parameters in the member that is to be invoked. To indicate which of these parameters are passed by reference, set the value of the property (the indexer in C#) to `true` for the index number corresponding to the zero-based position of the parameter. diff --git a/xml/System.Reflection/PortableExecutableKinds.xml b/xml/System.Reflection/PortableExecutableKinds.xml index a9b70ac1df3..e4c6c3f3b86 100644 --- a/xml/System.Reflection/PortableExecutableKinds.xml +++ b/xml/System.Reflection/PortableExecutableKinds.xml @@ -59,14 +59,14 @@ Identifies the nature of the code in an executable file. - method. - + method. + > [!NOTE] -> This enumeration corresponds to the `CorPEKind` enumeration in the unmanaged reflection API, which is accessed by the unmanaged `GetPEKind` function. - +> This enumeration corresponds to the `CorPEKind` enumeration in the unmanaged reflection API, which is accessed by the unmanaged `GetPEKind` function. + ]]> diff --git a/xml/System.Reflection/PropertyInfo.xml b/xml/System.Reflection/PropertyInfo.xml index 630bd2e92f4..84bdc84986f 100644 --- a/xml/System.Reflection/PropertyInfo.xml +++ b/xml/System.Reflection/PropertyInfo.xml @@ -100,7 +100,7 @@ Properties are logically the same as fields. A property is a named aspect of an object's state whose value is typically accessible through `get` and `set` accessors. Properties may be read-only, in which case a set routine is not supported. > [!NOTE] -> To determine whether a property is `static`, you must obtain the for the `get` or `set` accessor, by calling the or the method, and examine its property. +> To determine whether a property is `static`, you must obtain the for the `get` or `set` accessor, by calling the or the method, and examine its property. Several methods in this class assume that the `get` accessor and `set` accessor methods of a property have certain formats. The signatures of the `get` and `set` methods must match the following convention: @@ -110,7 +110,7 @@ If this format is not followed, the behavior of the `GetValue` and `SetValue` methods is undefined. - Calling on `PropertyInfo` when the `inherit` parameter of `GetCustomAttributes` is `true` does not walk the type hierarchy. Use to inherit custom attributes. + Calling on `PropertyInfo` when the `inherit` parameter of `GetCustomAttributes` is `true` does not walk the type hierarchy. Use to inherit custom attributes. @@ -227,17 +227,17 @@ The property returns the attributes associated with the property represented by this object. The attributes are primarily modifiers applied by a compiler when creating a property; they indicate whether a property is the default property, a `SpecialName` property, and so on. Note that, for almost all properties found in types in the .NET Framework class library, the value of the property is . > [!TIP] -> In most cases, you probably want to retrieve the custom attributes associated with a property. To do this, retrieve the value of the property, or call one of the overloads of the method. +> In most cases, you probably want to retrieve the custom attributes associated with a property. To do this, retrieve the value of the property, or call one of the overloads of the method. To get the property: 1. Get a object that represents the type to which the property belongs. -2. Get the object by calling an overload of the method. +2. Get the object by calling an overload of the method. 3. Retrieve the property's attributes from the property. - You can define the attributes of a property for a type created dynamically using reflection emit by calling an overload of the method and supplying a value for the `attributes` argument. + You can define the attributes of a property for a type created dynamically using reflection emit by calling an overload of the method and supplying a value for the `attributes` argument. ]]> @@ -367,13 +367,13 @@ returns `true` if the property has a `set` accessor, even if the accessor is `private`, `internal` (or `Friend` in Visual Basic), or `protected`. If the property does not have a `set` accessor, the method returns `false`. + returns `true` if the property has a `set` accessor, even if the accessor is `private`, `internal` (or `Friend` in Visual Basic), or `protected`. If the property does not have a `set` accessor, the method returns `false`. To get the value of the property: 1. Get the object of the type that includes the property. -2. Call the to get the object that represents the property. +2. Call the to get the object that represents the property. 3. Retrieve the value of the property. @@ -507,14 +507,14 @@ method: + To call the method: 1.Get a object that represents the class. 2.From the object, get the object. -3.From the object, call the method. +3.From the object, call the method. ## Examples - The following example retrieves the public accessors of the `ClassWithProperty.Caption` property and displays information about them. It also calls the method of the setter to set the property value and of the getter to retrieve the property value. + The following example retrieves the public accessors of the `ClassWithProperty.Caption` property and displays information about them. It also calls the method of the setter to set the property value and of the getter to retrieve the property value. :::code language="csharp" source="~/snippets/csharp/System.Reflection/PropertyInfo/GetAccessors/source1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/PropertyInfo/GetAccessors/source1.vb" id="Snippet1"::: @@ -578,14 +578,14 @@ ## Remarks -To call the method: +To call the method: 1. Get a object that represents the class. 2. From the object, get the object. -3. From the object, call the method. +3. From the object, call the method. ## Examples - The following example retrieves the accessors of the `ClassWithProperty.Caption` property and displays information about them. It also calls the method of the setter to set the property value and of the getter to retrieve the property value. + The following example retrieves the accessors of the `ClassWithProperty.Caption` property and displays information about them. It also calls the method of the setter to set the property value and of the getter to retrieve the property value. :::code language="csharp" source="~/snippets/csharp/System.Reflection/PropertyInfo/GetAccessors/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/PropertyInfo/GetAccessors/source.vb" id="Snippet1"::: @@ -647,7 +647,7 @@ To call the method: This method is provided for designers of managed compilers and code analyzers. > [!NOTE] -> Do not use this method in the reflection-only context, because it might cause code to execute. Use the method instead. +> Do not use this method in the reflection-only context, because it might cause code to execute. Use the method instead. In unmanaged metadata, the Constant table is used to store constant values for fields, parameters, and properties. Constant information does not directly influence runtime behavior. Compilers inspect this information, at compile time, when importing metadata. If used, the value of a constant is embedded in the Microsoft intermediate language (MSIL) stream the compiler emits. There are no MSIL instructions that can be used to access the Constant table at run time. @@ -1005,9 +1005,9 @@ To call the method: , , and , which are used to obtain custom modifiers from a function pointer. + A modified type supports , , and , which are used to obtain custom modifiers from a function pointer. - To obtain the normal, unmodified type from a modified type, use . + To obtain the normal, unmodified type from a modified type, use . This method is provided for designers of managed compilers. For more information on custom modifiers, see classes in the namespace. Also see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) documentation](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). @@ -1066,7 +1066,7 @@ To call the method: and methods are provided for designers of managed compilers. For more information on custom modifiers, see and related classes in the namespace. Also see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) specification](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). + The and methods are provided for designers of managed compilers. For more information on custom modifiers, see and related classes in the namespace. Also see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) specification](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). ]]> @@ -1182,7 +1182,7 @@ To call the method: and methods are provided for designers of managed compilers. For more information on custom modifiers, see and related classes in the namespace. Also see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) specification](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). + The and methods are provided for designers of managed compilers. For more information on custom modifiers, see and related classes in the namespace. Also see the metadata specification in Partition II of the [Common Language Infrastructure (CLI) specification](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/). ]]> @@ -1445,14 +1445,14 @@ To call the method: overload to retrieve the value of a non-indexed property; if you try to retrieve the value of an indexed property, the method throws a exception. You can determine whether a property is indexed or not by calling the method. If the length of the returned array is zero, the property is not indexed. + You call the overload to retrieve the value of a non-indexed property; if you try to retrieve the value of an indexed property, the method throws a exception. You can determine whether a property is indexed or not by calling the method. If the length of the returned array is zero, the property is not indexed. - This is a convenience method that provides an implementation for the abstract method with the parameter set to , the set to `null`, the object array of index values set to `null`, and the set to `null`. + This is a convenience method that provides an implementation for the abstract method with the parameter set to , the set to `null`, the object array of index values set to `null`, and the set to `null`. ## Examples - The following example defines a `Planet` class that has two properties: `Name`, the name of the planet; and `Distance`, the planet's distance from Earth. The example instantiates a `Planet` object that represents the planet Jupiter and passes it to a `GetPropertyValues` method that displays information about the properties and uses the method to get the value of each `Planet` property. + The following example defines a `Planet` class that has two properties: `Name`, the name of the planet; and `Distance`, the planet's distance from Earth. The example instantiates a `Planet` object that represents the planet Jupiter and passes it to a `GetPropertyValues` method that displays information about the properties and uses the method to get the value of each `Planet` property. :::code language="csharp" source="~/snippets/csharp/System.Reflection/PropertyInfo/GetValue/getvalue1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/PropertyInfo/GetValue/getvalue1.vb" id="Snippet1"::: @@ -1526,7 +1526,7 @@ To call the method: method. If the resulting array has 0 (zero) elements, the property is not indexed. + To determine whether a property is indexed, use the method. If the resulting array has 0 (zero) elements, the property is not indexed. This is a convenience method that provides an implementation for the abstract `GetValue` method with a `BindingFlags` parameter of `Default`, the `Binder` set to `null`, and the `CultureInfo` set to `null`. @@ -1629,7 +1629,7 @@ Note: In method. If the resulting array has 0 (zero) elements, the property is not indexed. + To determine whether a property is indexed, use the method. If the resulting array has 0 (zero) elements, the property is not indexed. Because static properties belong to the type, not individual objects, get static properties by passing `null` as the object argument. For example, use the following code to get the static `CurrentCulture` property of `CultureInfo` : @@ -1772,7 +1772,7 @@ Console.WriteLine("CurrCult: " + . Therefore, when you examine a set of objects - for example, the array returned by - the property returns only when a given member is a property. + This property overrides . Therefore, when you examine a set of objects - for example, the array returned by - the property returns only when a given member is a property. `MemberType` is a derived class of `MemberInfo` and specifies the type of member this is. Member types are constructors, properties, fields, and methods. Since this is a `PropertyInfo` property, the returned type is a property. @@ -1958,9 +1958,9 @@ Console.WriteLine("CurrCult: " + ## Remarks To determine the type of a particular property, do the following: -1. Get a object that represents the type (the class or structure) that contains the property. If you are working with an object (an instance of a type), you can call its method. Otherwise, you can use the C# operator or the Visual Basic [GetType](/dotnet/visual-basic/language-reference/operators/gettype-operator) operator, as the example illustrates. +1. Get a object that represents the type (the class or structure) that contains the property. If you are working with an object (an instance of a type), you can call its method. Otherwise, you can use the C# operator or the Visual Basic [GetType](/dotnet/visual-basic/language-reference/operators/gettype-operator) operator, as the example illustrates. -2. Get a object that represents the property in which you're interested. You can do this by getting an array of all properties from the method and then iterating the elements in the array, or you can retrieve the object that represents the property directly by calling the method and specifying the property name. +2. Get a object that represents the property in which you're interested. You can do this by getting an array of all properties from the method and then iterating the elements in the array, or you can retrieve the object that represents the property directly by calling the method and specifying the property name. 3. Retrieve the value of the property from the object. @@ -2024,7 +2024,7 @@ Console.WriteLine("CurrCult: " + property is equivalent to calling the method with a value of `true` for the `nonPublic` argument. + Retrieving the value of the property is equivalent to calling the method with a value of `true` for the `nonPublic` argument. ]]> @@ -2106,19 +2106,19 @@ Console.WriteLine("CurrCult: " + overload sets the value of a non-indexed property. To determine whether a property is indexed, call the method. If the resulting array has 0 (zero) elements, the property is not indexed. To set the value of an indexed property, call the overload. + The overload sets the value of a non-indexed property. To determine whether a property is indexed, call the method. If the resulting array has 0 (zero) elements, the property is not indexed. To set the value of an indexed property, call the overload. If the property type of this object is a value type and `value` is `null`, the property will be set to the default value for that type. - This is a convenience method that calls the runtime implementation of the abstract method, specifying for the `BindingFlags` parameter, `null` for `Binder`, `null` for `Object[]`, and `null` for `CultureInfo`. + This is a convenience method that calls the runtime implementation of the abstract method, specifying for the `BindingFlags` parameter, `null` for `Binder`, `null` for `Object[]`, and `null` for `CultureInfo`. - To use the method, first get a object that represents the class. From the , get the object. From the object, call the method. + To use the method, first get a object that represents the class. From the , get the object. From the object, call the method. > [!NOTE] > This method can be used to access non-public members if the caller has been granted with the flag and if the grant set of the non-public members is restricted to the caller's grant set, or 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 declares a class named `Example` with one `static` (`Shared` in Visual Basic) and one instance property. The example uses the method to change the original property values and displays the original and final values. + The following example declares a class named `Example` with one `static` (`Shared` in Visual Basic) and one instance property. The example uses the method to change the original property values and displays the original and final values. :::code language="csharp" source="~/snippets/csharp/System.Reflection/PropertyInfo/SetValue/example2.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Reflection/PropertyInfo/SetValue/example2.vb" id="Snippet2"::: @@ -2211,24 +2211,24 @@ Note: In method to change the default values of the properties and displays the original and final values. + The following example declares a class named `Example` with three properties: a `static` property (`Shared` in Visual Basic), an instance property, and an indexed instance property. The example uses the method to change the default values of the properties and displays the original and final values. The name that is used to search for an indexed instance property with reflection is different depending on the language and on attributes applied to the property. @@ -2325,7 +2325,7 @@ Note: In property retrieves an array of type `Exception` that is parallel to the array. This array will contain null values whenever reflection cannot load a class. + The property retrieves an array of type `Exception` that is parallel to the array. This array will contain null values whenever reflection cannot load a class. ]]> diff --git a/xml/System.Reflection/TargetException.xml b/xml/System.Reflection/TargetException.xml index 6160d3ab042..3eb51355033 100644 --- a/xml/System.Reflection/TargetException.xml +++ b/xml/System.Reflection/TargetException.xml @@ -153,8 +153,8 @@ |Property|Value| |--------------|-----------| -||`null`| -||The empty string ("").| +||`null`| +||The empty string ("").| ]]> @@ -212,8 +212,8 @@ |Property|Value| |--------------|-----------| -||`null`| -||The message string.| +||`null`| +||The message string.| ]]> @@ -336,8 +336,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> diff --git a/xml/System.Reflection/TargetInvocationException.xml b/xml/System.Reflection/TargetInvocationException.xml index 89bf79469a5..4546f04cad2 100644 --- a/xml/System.Reflection/TargetInvocationException.xml +++ b/xml/System.Reflection/TargetInvocationException.xml @@ -87,7 +87,7 @@ . + For more information, see . `TargetInvocationException` uses the HRESULT COR_E_TARGETINVOCATION, which has the value 0x80131604. @@ -167,8 +167,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> @@ -234,8 +234,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> diff --git a/xml/System.Reflection/TargetParameterCountException.xml b/xml/System.Reflection/TargetParameterCountException.xml index 170590448ae..26e12ad59fe 100644 --- a/xml/System.Reflection/TargetParameterCountException.xml +++ b/xml/System.Reflection/TargetParameterCountException.xml @@ -155,8 +155,8 @@ |Property|Value| |--------------|-----------| -||`null`| -||The empty string ("").| +||`null`| +||The empty string ("").| ]]> @@ -216,8 +216,8 @@ |Property|Value| |--------------|-----------| -||`null`| -||The message string.| +||`null`| +||The message string.| ]]> @@ -281,8 +281,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]>
diff --git a/xml/System.Reflection/TypeAttributes.xml b/xml/System.Reflection/TypeAttributes.xml index 31e7a1f0656..6af7e85dbab 100644 --- a/xml/System.Reflection/TypeAttributes.xml +++ b/xml/System.Reflection/TypeAttributes.xml @@ -78,7 +78,7 @@ value retrieved from a property such as . The following table lists the masks and the individual members that they include: + Some of the members of the `TypeAttributes` enumeration are masks that represent a set of mutually exclusive attributes. For example, the `VisibilityMask` member includes the `NotPublic`, `Public`, `NestedPublic`, `NestedPrivate`, `NestedFamily`, `NestedAssembly`, `NestedFamANDAssem`, and `NestedFamORAssem` members. Because each attribute set includes a member whose underlying value is zero, you should first `And` the value of the mask with the specific value retrieved from a property such as . The following table lists the masks and the individual members that they include: |Mask|Includes| |----------|--------------| diff --git a/xml/System.Reflection/TypeDelegator.xml b/xml/System.Reflection/TypeDelegator.xml index 8eb6c0ab9b6..9e1aa2586bc 100644 --- a/xml/System.Reflection/TypeDelegator.xml +++ b/xml/System.Reflection/TypeDelegator.xml @@ -75,15 +75,15 @@ derives from and implements most of the properties and methods of . For each member it implements, automatically delegates to the corresponding member of an internal object, which is supplied as an argument to the constructor. This internal object is exposed to deriving classes by the `protected` field. > [!NOTE] -> Some members of have implementations even though the members themselves are simply inherited from . In these cases, the implementation is provided by an overridden `protected` method that has a name that ends in "Impl". For example, the implementation for all overloads of the method is supplied by the overridden method. The implementation for inherited properties such as and is provided by the overridden method. +> Some members of have implementations even though the members themselves are simply inherited from . In these cases, the implementation is provided by an overridden `protected` method that has a name that ends in "Impl". For example, the implementation for all overloads of the method is supplied by the overridden method. The implementation for inherited properties such as and is provided by the overridden method. - Deriving classes can provide a public constructor that takes a object as its parameter and simply passes that object to the constructor, or can set the internal object in some other way. + Deriving classes can provide a public constructor that takes a object as its parameter and simply passes that object to the constructor, or can set the internal object in some other way. - If a deriving class uses a member that is not implemented by , it must override that member and provide an implementation. The simplest implementation is to call the corresponding member on the internal object exposed by the field, but you can provide any implementation your application requires. It is not necessary to override these members if they are not used by your application or by library functions your application calls (for example, by the constructor). + If a deriving class uses a member that is not implemented by , it must override that member and provide an implementation. The simplest implementation is to call the corresponding member on the internal object exposed by the field, but you can provide any implementation your application requires. It is not necessary to override these members if they are not used by your application or by library functions your application calls (for example, by the constructor). - The following virtual methods (`Overridable` methods in Visual Basic) of are not implemented by : , , , , , , , , , , , , . + The following virtual methods (`Overridable` methods in Visual Basic) of are not implemented by : , , , , , , , , , , , , . - The following virtual properties (`Overridable` properties in Visual Basic) of are not implemented by : , , , , , , , , , . + The following virtual properties (`Overridable` properties in Visual Basic) of are not implemented by : , , , , , , , , , . ]]> @@ -1063,7 +1063,7 @@ method does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned, because that order can vary. + The method does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned, because that order can vary. Use a `bindingAttr` of .NonPublic to return all public and nonpublic fields. @@ -2096,7 +2096,7 @@ This method can be used to find a constructed generic member given a member from The binder will find all the matching methods. These methods are found based upon the type of binding requested (`BindingFlags.MethodInvoke`, `BindingFlags.GetProperties`, and so on). The set of methods is filtered by the name, number of arguments, and a set of search modifiers defined in the binder. - After the method is selected, it will be invoked. Accessibility is checked at that point. The search may control which set of methods are searched based upon the accessibility attribute associated with the method. The method is responsible for selecting the method to be invoked. The default binder selects the most specific match. + After the method is selected, it will be invoked. Accessibility is checked at that point. The search may control which set of methods are searched based upon the accessibility attribute associated with the method. The method is responsible for selecting the method to be invoked. The default binder selects the most specific match. > [!NOTE] > Access restrictions are ignored for fully trusted code. That is, private constructors, methods, fields, and properties can be accessed and invoked using reflection whenever the code is fully trusted. @@ -2966,7 +2966,7 @@ t.InvokeMember ("MyArray", BindingFlags.SetField, null, this, new . + A string containing the name of the current `TypeDelegator`. Only the simple name, not the fully qualified name, is returned. To get the name and the path, use . ]]> diff --git a/xml/System.Reflection/TypeFilter.xml b/xml/System.Reflection/TypeFilter.xml index 1dfb3b547c1..35075646de6 100644 --- a/xml/System.Reflection/TypeFilter.xml +++ b/xml/System.Reflection/TypeFilter.xml @@ -92,7 +92,7 @@ objects. The method uses this delegate to filter the list of interfaces that it returns. Every derived class of and has a constructor and a `DynamicInvoke` method. + The `TypeFilter` delegate is used to filter a list of classes. Specifically, you use it to filter the classes represented in an array of objects. The method uses this delegate to filter the list of interfaces that it returns. Every derived class of and has a constructor and a `DynamicInvoke` method. ## Examples This example shows how to define a method matching the delegate prototype allowing you to use reflection to filter or return a subset of matching entries. diff --git a/xml/System.Reflection/TypeInfo.xml b/xml/System.Reflection/TypeInfo.xml index 3c20bbd4014..14f66597ac8 100644 --- a/xml/System.Reflection/TypeInfo.xml +++ b/xml/System.Reflection/TypeInfo.xml @@ -91,11 +91,11 @@ ## Remarks Starting with .NET Framework 4.5, the class is included in the .NET for Windows 8.x Store apps subset for use in creating Windows Store apps. is available in the full .NET Framework as well. For more information about reflection for Windows Store apps, see [System.Reflection namespaces](/dotnet/api/?term=system.reflection) and [Reflection in the .NET Framework for Windows Store Apps](/dotnet/framework/reflection-and-codedom/reflection-for-windows-store-apps). - contains many of the members available in the class, and many of the reflection properties in the .NET for Windows 8.x Store apps return collections of objects. To get a object from a object, use the extension method. + contains many of the members available in the class, and many of the reflection properties in the .NET for Windows 8.x Store apps return collections of objects. To get a object from a object, use the extension method. A object represents the type definition itself, whereas a object represents a reference to the type definition. Getting a object forces the assembly that contains that type to load. In comparison, you can manipulate objects without necessarily requiring the runtime to load the assembly they reference. - In the .NET for Windows 8.x Store apps, you use the reflection properties of that return collections instead of methods that return arrays. For example, use the property to get all declared members, or the property to get all declared properties. Reflection contexts can implement lazy traversal of these collections for large assemblies or types. To get specific members, use methods such as and , and pass the name of the method or property you would like to retrieve. + In the .NET for Windows 8.x Store apps, you use the reflection properties of that return collections instead of methods that return arrays. For example, use the property to get all declared members, or the property to get all declared properties. Reflection contexts can implement lazy traversal of these collections for large assemblies or types. To get specific members, use methods such as and , and pass the name of the method or property you would like to retrieve. To filter the results of properties, use LINQ queries. For reflection objects that originate with the runtime (for example, as the result of `typeof(Object)`), you can traverse the inheritance tree by using the methods in the class. Consumers of objects from customized reflection contexts cannot use these methods and must traverse the inheritance tree themselves. diff --git a/xml/System.Resources.Tools/StronglyTypedResourceBuilder.xml b/xml/System.Resources.Tools/StronglyTypedResourceBuilder.xml index 2c8184571d6..70221841ed3 100644 --- a/xml/System.Resources.Tools/StronglyTypedResourceBuilder.xml +++ b/xml/System.Resources.Tools/StronglyTypedResourceBuilder.xml @@ -43,9 +43,9 @@ ## Remarks Typically, resources separate code from content within an application. Creating and consuming these resources makes it easier to develop localizable applications. In the .NET Framework, resources are usually consumed by using the class, which contains methods that provide access to culture-specific resources at run time. For more information about creating and consuming resources, see [Resources in Desktop Apps](/dotnet/framework/resources/). - Strongly typed resource support is a compile-time feature that encapsulates access to resources by creating classes that contain a set of static, read-only (`get`) properties. This provides an alternative way to consume resources instead of calling the and methods. + Strongly typed resource support is a compile-time feature that encapsulates access to resources by creating classes that contain a set of static, read-only (`get`) properties. This provides an alternative way to consume resources instead of calling the and methods. - The basic functionality for strongly typed resource support is provided by the class (as well as the `/str` command-line option in the [Resgen.exe (Resource File Generator)](/dotnet/framework/tools/resgen-exe-resource-file-generator)). The output of the method is a class that contains strongly typed properties that match the resources that are referenced in the input parameter. This class provides read-only access to the resources that are available in the file processed. + The basic functionality for strongly typed resource support is provided by the class (as well as the `/str` command-line option in the [Resgen.exe (Resource File Generator)](/dotnet/framework/tools/resgen-exe-resource-file-generator)). The output of the method is a class that contains strongly typed properties that match the resources that are referenced in the input parameter. This class provides read-only access to the resources that are available in the file processed. @@ -140,7 +140,7 @@ method to generate a class that provides a strongly typed, read-only wrapper to access the resources that are contained in the `resourceList` parameter. + Use the method to generate a class that provides a strongly typed, read-only wrapper to access the resources that are contained in the `resourceList` parameter. The class ignores any resource name that begins with the characters "$" or ">>". The resource names "Culture" and "ResourceManager" are invalid identifiers. @@ -218,7 +218,7 @@ method to generate a class that provides strongly typed, read-only access to the resources that are contained in the `resxFile` parameter. + Use the method to generate a class that provides strongly typed, read-only access to the resources that are contained in the `resxFile` parameter. The class ignores any resource name that begins with the characters "$" or ">>". The resource names "Culture" and "ResourceManager" are invalid identifiers. @@ -385,7 +385,7 @@ System.Resources.ResourceManager rm = new System.Resources.ResourceManager(" method to generate a class that provides strongly typed, read-only access to the resources that are contained in the `resxFile` parameter. + Use the method to generate a class that provides strongly typed, read-only access to the resources that are contained in the `resxFile` parameter. The class ignores any resource name that begins with the characters "$" or ">>". The resource names "Culture" and "ResourceManager" are invalid identifiers. @@ -439,14 +439,14 @@ System.Resources.ResourceManager rm = new System.Resources.ResourceManager(" method attempts to generate a valid string based on the `key` and `provider` parameters. If a valid string can be generated, that string is returned; otherwise, `null` is returned. + If the `key` parameter is a valid string of characters, that string is returned. If the `key` parameter is an invalid string or a string that contains invalid characters, the method attempts to generate a valid string based on the `key` and `provider` parameters. If a valid string can be generated, that string is returned; otherwise, `null` is returned. - If the `key` parameter is an empty string (""), a string that consists of a single underscore character (_) is returned. If the `key` parameter is not an empty string, the method compares each character in the string to a set of invalid tokens based on the language specified by the `provider` parameter. Any invalid character in the string is replaced with an underscore character. The characters that will be replaced with an underscore are as follows: + If the `key` parameter is an empty string (""), a string that consists of a single underscore character (_) is returned. If the `key` parameter is not an empty string, the method compares each character in the string to a set of invalid tokens based on the language specified by the `provider` parameter. Any invalid character in the string is replaced with an underscore character. The characters that will be replaced with an underscore are as follows: ' ' (space), U+00A0 (non-breaking space), '.' (period), ',' (comma), ';' (semicolon), '|', '~', '@', '#', '%', '^', '&', '*', '+', '-', '/', '\\', '\<', '>', '?', '[', ']', '(', ')', '{', '}', '"' (quote), ''' (apostrophe), ':', and '!'. > [!NOTE] -> Strongly typed resources do not allow the use of language keywords (such as `if`, `for`, and so on) as resource key names. However, the design pattern allows the use of language keywords by prefixing the keyword with the underscore character. The method calls the method to enforce this design. For example, if you use a resource name that is the same as a language keyword, such as `for`, the name appears as `_for` in the generated strongly typed resource class. +> Strongly typed resources do not allow the use of language keywords (such as `if`, `for`, and so on) as resource key names. However, the design pattern allows the use of language keywords by prefixing the keyword with the underscore character. The method calls the method to enforce this design. For example, if you use a resource name that is the same as a language keyword, such as `for`, the name appears as `_for` in the generated strongly typed resource class. ]]> diff --git a/xml/System.Resources/IResourceReader.xml b/xml/System.Resources/IResourceReader.xml index a301471141b..fcd076867a8 100644 --- a/xml/System.Resources/IResourceReader.xml +++ b/xml/System.Resources/IResourceReader.xml @@ -67,11 +67,11 @@ Provides the base functionality for reading data from resource files. - ) or if you are using a non-standard format or file type for storing resources. Otherwise, use the default class, which reads resource information from binary .resources files, or the class, which reads resource information from XML resource (.resx) files. - + ) or if you are using a non-standard format or file type for storing resources. Otherwise, use the default class, which reads resource information from binary .resources files, or the class, which reads resource information from XML resource (.resx) files. + ]]> @@ -121,11 +121,11 @@ Closes the resource reader after releasing any resources associated with it. - @@ -174,11 +174,11 @@ Returns a dictionary enumerator of the resources for this reader. A dictionary enumerator for the resources for this reader. - inherits the interface, it must also provide an implementation of the method, which returns an object that can be used to enumerate a collection. Typically, is implemented as an explicit interface implementation. - + inherits the interface, it must also provide an implementation of the method, which returns an object that can be used to enumerate a collection. Typically, is implemented as an explicit interface implementation. + ]]> diff --git a/xml/System.Resources/IResourceWriter.xml b/xml/System.Resources/IResourceWriter.xml index acd0d1477d9..e35ee3b9e8e 100644 --- a/xml/System.Resources/IResourceWriter.xml +++ b/xml/System.Resources/IResourceWriter.xml @@ -54,11 +54,11 @@ Provides the base functionality for writing resources to an output file or stream. - class, which writes resources to a binary .resources file, or the class, which writes resources to an XML resource (.resx) file. - + class, which writes resources to a binary .resources file, or the class, which writes resources to an XML resource (.resx) file. + ]]> @@ -128,11 +128,11 @@ Value of a resource as an 8-bit unsigned integer array. Adds an 8-bit unsigned integer array as a named resource to the list of resources to be written. - method is called. - + method is called. + ]]> The parameter is . @@ -191,14 +191,14 @@ The value of the resource. Adds a named resource of type to the list of resources to be written. - method is called. - + method is called. + > [!NOTE] -> `value` might have to be serializable, so you might have to provide a type converter, depending on which resource writer is used. - +> `value` might have to be serializable, so you might have to provide a type converter, depending on which resource writer is used. + ]]> The parameter is . @@ -257,11 +257,11 @@ The value of the resource. Adds a named resource of type to the list of resources to be written. - method is called. - + method is called. + ]]> The parameter is . @@ -307,11 +307,11 @@ Closes the underlying resource file or stream, ensuring all the data has been written to the file. - will call the method to output the resources to the underlying file or stream before closing it. - + will call the method to output the resources to the underlying file or stream before closing it. + ]]> @@ -356,11 +356,11 @@ Writes all the resources added by the method to the output file or stream. - does not close the output file or output stream. Instead, consider calling the method. is useful when you want to create a resource file, but you don't want to close the output stream. can be called only once. After you call , all methods other than will throw an exception. - + does not close the output file or output stream. Instead, consider calling the method. is useful when you want to create a resource file, but you don't want to close the output stream. can be called only once. After you call , all methods other than will throw an exception. + ]]> diff --git a/xml/System.Resources/MissingManifestResourceException.xml b/xml/System.Resources/MissingManifestResourceException.xml index 4892df0c690..14d64078616 100644 --- a/xml/System.Resources/MissingManifestResourceException.xml +++ b/xml/System.Resources/MissingManifestResourceException.xml @@ -146,8 +146,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||The localized error message for .| +||`null`.| +||The localized error message for .| ]]> @@ -205,8 +205,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||The `message` string.| +||`null`.| +||The `message` string.| ]]> @@ -332,8 +332,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> diff --git a/xml/System.Resources/MissingSatelliteAssemblyException.xml b/xml/System.Resources/MissingSatelliteAssemblyException.xml index 678b25278b8..0265474163e 100644 --- a/xml/System.Resources/MissingSatelliteAssemblyException.xml +++ b/xml/System.Resources/MissingSatelliteAssemblyException.xml @@ -73,13 +73,13 @@ is thrown if the resource manager tries to retrieve but cannot find a resource for the default culture. However, the .NET Framework will load the resources for an app's default culture from a satellite assembly if the attribute specifies a value of for the location parameter. When this is the case, the exception is thrown when the resource manager tries to retrieve a resource of the default culture and the satellite assembly for the culture specified in the attribute is missing. Note that the exception is thrown by a resource retrieval method such as or , and not when the object is instantiated. + The default culture is the culture whose resources are loaded if the appropriate culture-specific resources cannot be found. By default, resources for the default culture are located in the main assembly, and a is thrown if the resource manager tries to retrieve but cannot find a resource for the default culture. However, the .NET Framework will load the resources for an app's default culture from a satellite assembly if the attribute specifies a value of for the location parameter. When this is the case, the exception is thrown when the resource manager tries to retrieve a resource of the default culture and the satellite assembly for the culture specified in the attribute is missing. Note that the exception is thrown by a resource retrieval method such as or , and not when the object is instantiated. uses the HRESULT COR_E_MISSINGSATELLITEASSEMBLY, which has the value 0x80131536. - uses the default implementation, which supports reference equality. + uses the default implementation, which supports reference equality. - For a list of initial property values for an instance of the class, see the constructors. + For a list of initial property values for an instance of the class, see the constructors. > [!NOTE] > You should always use the attribute to define your app's default culture so that if a resource for a specific culture is unavailable, your application will display acceptable behavior. @@ -194,8 +194,8 @@ HelloWorld2 |Property|Value| |--------------|-----------| -||`null`.| -||The localized error message for .| +||`null`.| +||The localized error message for .| ]]> @@ -251,8 +251,8 @@ HelloWorld2 |Property|Value| |--------------|-----------| -||`null`.| -||The `message` string.| +||`null`.| +||The `message` string.| ]]>
@@ -379,8 +379,8 @@ HelloWorld2 |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]>
@@ -438,8 +438,8 @@ HelloWorld2 |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]>
diff --git a/xml/System.Resources/NeutralResourcesLanguageAttribute.xml b/xml/System.Resources/NeutralResourcesLanguageAttribute.xml index 2af93b42ee9..cde3450338b 100644 --- a/xml/System.Resources/NeutralResourcesLanguageAttribute.xml +++ b/xml/System.Resources/NeutralResourcesLanguageAttribute.xml @@ -194,7 +194,7 @@ For a detailed list of culture names available on Windows systems, see the **Lan constructor with the enumeration to specify whether the class is to retrieve neutral fallback resources from the main app assembly (the default), or from a satellite assembly specified by the and the properties. + Use the constructor with the enumeration to specify whether the class is to retrieve neutral fallback resources from the main app assembly (the default), or from a satellite assembly specified by the and the properties. For a detailed list of culture names available on Windows systems, see the **Language tag** column in the [list of language/region names supported by Windows](https://learn.microsoft.com/openspecs/windows_protocols/ms-lcid/a9eac961-e77d-41a6-90a5-ce1a8b0cdb9c). Culture names follow the standard defined by [BCP 47](https://tools.ietf.org/html/bcp47). diff --git a/xml/System.Resources/ResXDataNode.xml b/xml/System.Resources/ResXDataNode.xml index 40cfe54d0dc..23053261f3b 100644 --- a/xml/System.Resources/ResXDataNode.xml +++ b/xml/System.Resources/ResXDataNode.xml @@ -47,12 +47,12 @@ The class supports the representation of rich data types within a resource file. It can support the storage of any object in a resource file, so long as the object supports serialization and type editors. - You can create a object by calling one of its overloaded class constructors. You can then add the resource item or element to a resource file by calling the method. + You can create a object by calling one of its overloaded class constructors. You can then add the resource item or element to a resource file by calling the method. - To retrieve an existing object, you must enumerate the objects in an XML resource file by instantiating a object, setting the property to `true`, and calling the method to get an enumerator. The example provides an illustration. + To retrieve an existing object, you must enumerate the objects in an XML resource file by instantiating a object, setting the property to `true`, and calling the method to get an enumerator. The example provides an illustration. ## Examples - The following example uses the method to obtain an object that is used to enumerate the objects in a .resx file. The example includes a `CreateResourceFile` routine that creates the necessary XML resource file. + The following example uses the method to obtain an object that is used to enumerate the objects in a .resx file. The example includes a `CreateResourceFile` routine that creates the necessary XML resource file. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResXDataNode/Overview/resxresourcereader2.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResXDataNode/Overview/resxresourcereader2.vb" id="Snippet1"::: @@ -302,7 +302,7 @@ ## Remarks If a comment has not been assigned to the resource item, the value of the property is . - You access the property of an data node in an existing XML resource file by instantiating a object, setting the property to `true`, and calling the method to retrieve an object that you use to enumerate the items in the XML resource file. The property returns the object. + You access the property of an data node in an existing XML resource file by instantiating a object, setting the property to `true`, and calling the method to retrieve an object that you use to enumerate the items in the XML resource file. The property returns the object. @@ -417,7 +417,7 @@ looks for a by using the specified type resolution service that can convert from a string to the appropriate object. If the resource is a file reference, tries to de-serialize it. + If the stored value currently exists in memory, it is returned directly. If it is stored in the resource file and it is not a file reference, looks for a by using the specified type resolution service that can convert from a string to the appropriate object. If the resource is a file reference, tries to de-serialize it. ]]> @@ -466,7 +466,7 @@ looks in the assemblies identified by names to find the object's corresponding type, and then looks for a that can convert from a string to the appropriate object. If the resource is a file reference, tries to deserialize it. + If the stored value currently exists in memory, it is returned directly. If it is stored in the resource file and it is not a file reference, looks in the assemblies identified by names to find the object's corresponding type, and then looks for a that can convert from a string to the appropriate object. If the resource is a file reference, tries to deserialize it. ]]> diff --git a/xml/System.Resources/ResXFileRef+Converter.xml b/xml/System.Resources/ResXFileRef+Converter.xml index 7890eb4ed2f..dd99c36d2f5 100644 --- a/xml/System.Resources/ResXFileRef+Converter.xml +++ b/xml/System.Resources/ResXFileRef+Converter.xml @@ -31,16 +31,16 @@ Provides a type converter to convert data for a to and from a string. - provides the object the refers to. For example, if the is "xplogo.bmp;System.Drawing.Bitmap, System.Drawing", then calling the method of the converter will return a , not a . - - For more information about type converters, see the base class and [How to: Implement a Type Converter](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2013/ayybcxe5(v=vs.120)). - + provides the object the refers to. For example, if the is "xplogo.bmp;System.Drawing.Bitmap, System.Drawing", then calling the method of the converter will return a , not a . + + For more information about type converters, see the base class and [How to: Implement a Type Converter](https://learn.microsoft.com/previous-versions/visualstudio/visual-studio-2013/ayybcxe5(v=vs.120)). + > [!NOTE] -> Typically, you do not directly create an instance of an . Instead, call the method of . For more information, see the examples in the base class. - +> Typically, you do not directly create an instance of an . Instead, call the method of . For more information, see the examples in the base class. + ]]> diff --git a/xml/System.Resources/ResXFileRef.xml b/xml/System.Resources/ResXFileRef.xml index d0db658a311..154342a8a83 100644 --- a/xml/System.Resources/ResXFileRef.xml +++ b/xml/System.Resources/ResXFileRef.xml @@ -40,29 +40,29 @@ Represents a link to an external resource. - class is used to include references to files in an XML resource (.resx) file. A object represents a link to an external resource in an XML resource (.resx) file. You add the object to a .resx file by calling the method. - - In a data entry in a .resx file, the type is , and the value is the path location on disk. When the resource manager deserializes the object, the performs the I/O to get the file. The following is an example of a .resx file. - -``` - - lookout.bmp;System.Drawing.Bitmap, System.Drawing - - - mailbackground.bmp;System.Drawing.Bitmap, System.Drawing - - - xplogo.png;System.Drawing.Bitmap, System.Drawing - -``` - - To add a object to a .resx file programmatically, you call the constructor to instantiate a object. You then pass this object to the method. - - When you compile a .resx file with [Resgen.exe (Resource File Generator)](/dotnet/framework/tools/resgen-exe-resource-file-generator), the resources specified in the .resx file are embedded in the resulting document resource file. - + class is used to include references to files in an XML resource (.resx) file. A object represents a link to an external resource in an XML resource (.resx) file. You add the object to a .resx file by calling the method. + + In a data entry in a .resx file, the type is , and the value is the path location on disk. When the resource manager deserializes the object, the performs the I/O to get the file. The following is an example of a .resx file. + +``` + + lookout.bmp;System.Drawing.Bitmap, System.Drawing + + + mailbackground.bmp;System.Drawing.Bitmap, System.Drawing + + + xplogo.png;System.Drawing.Bitmap, System.Drawing + +``` + + To add a object to a .resx file programmatically, you call the constructor to instantiate a object. You then pass this object to the method. + + When you compile a .resx file with [Resgen.exe (Resource File Generator)](/dotnet/framework/tools/resgen-exe-resource-file-generator), the resources specified in the .resx file are embedded in the resulting document resource file. + ]]> Working with .resx Files Programmatically @@ -107,11 +107,11 @@ The type of the resource that is referenced. Creates a new instance of the class that references the specified file. - object as a parameter. - + object as a parameter. + ]]> @@ -155,11 +155,11 @@ The encoding used in the referenced file. Initializes a new instance of the class that references the specified file. - object as a parameter. - + object as a parameter. + ]]> diff --git a/xml/System.Resources/ResXResourceReader.xml b/xml/System.Resources/ResXResourceReader.xml index 940349bea19..f9614a7186e 100644 --- a/xml/System.Resources/ResXResourceReader.xml +++ b/xml/System.Resources/ResXResourceReader.xml @@ -52,12 +52,12 @@ The class provides a default implementation of the interface that reads resource information in an XML format. To read resource information from a binary resource format, use the class. - You use the class to enumerate resources in .resx files by traversing the dictionary enumerator () that is returned by the method. You call the methods provided by to advance to the next resource and to read the name and value of each resource in the .resx file. + You use the class to enumerate resources in .resx files by traversing the dictionary enumerator () that is returned by the method. You call the methods provided by to advance to the next resource and to read the name and value of each resource in the .resx file. > [!NOTE] -> The class provides two enumerators. The method returns an object; we recommend that you use this method to enumerate resources. The method is an explicit interface implementation that returns an object; we do not recommend its use. +> The class provides two enumerators. The method returns an object; we recommend that you use this method to enumerate resources. The method is an explicit interface implementation that returns an object; we do not recommend its use. - The following example uses the method to obtain an object that is used to enumerate the resources in a .resx file. The example includes a `CreateResourceFile` routine that creates the necessary resource file. + The following example uses the method to obtain an object that is used to enumerate the resources in a .resx file. The example includes a `CreateResourceFile` routine that creates the necessary resource file. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResXResourceReader/Overview/resxresourcereader1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResXResourceReader/Overview/resxresourcereader1.vb" id="Snippet1"::: @@ -67,7 +67,7 @@ :::code language="csharp" source="~/snippets/csharp/System.Resources/ResXResourceReader/Overview/resxresourcereader2.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResXResourceReader/Overview/resxresourcereader2.vb" id="Snippet2"::: - If is `true`, the items in the enumeration can be either: + If is `true`, the items in the enumeration can be either: - Named resources along with their data. In this case, the property is `null`. @@ -81,7 +81,7 @@ ## Examples - The following example demonstrates how to use a to iterate through the resources in a .resx file. First, the `rsxr` is created for the file `items.resx`. Next, the method is used to create an to iterate through the resources and display the contents to the console. + The following example demonstrates how to use a to iterate through the resources in a .resx file. First, the `rsxr` is created for the file `items.resx`. Next, the method is used to create an to iterate through the resources and display the contents to the console. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResXResourceReader/Overview/resxresourcereader.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResXResourceReader/Overview/resxresourcereader.vb" id="Snippet1"::: @@ -141,7 +141,7 @@ ## Remarks > [!NOTE] -> The and methods do not close the stream you specify in this constructor. +> The and methods do not close the stream you specify in this constructor. ]]> @@ -555,12 +555,12 @@ enables the resources used by the to be reallocated for other purposes. For more information about , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged). + Calling enables the resources used by the to be reallocated for other purposes. For more information about , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged). ## Examples - The following example displays the resources of a file to the console, and then uses the method to shut down the reader and to make its resources available for other processes. + The following example displays the resources of a file to the console, and then uses the method to shut down the reader and to make its resources available for other processes. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResXResourceReader/Overview/resxresourcereader.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResXResourceReader/Overview/resxresourcereader.vb" id="Snippet1"::: @@ -604,7 +604,7 @@ method or the method. invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. + This method can be called by either the method or the method. invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose` method of each referenced object. @@ -809,12 +809,12 @@ method retrieves the name/value pairs in the XML resource (.resx) stream or string associated with the current object. However, if the property is set to `true` before you call , the resource items are retrieved as objects. In this case, all resource nodes are returned regardless of type. + The method retrieves the name/value pairs in the XML resource (.resx) stream or string associated with the current object. However, if the property is set to `true` before you call , the resource items are retrieved as objects. In this case, all resource nodes are returned regardless of type. ## Examples - The following example uses the method to obtain an object that is used to enumerate the resources in a .resx file. The example includes a `CreateResourceFile` routine that creates the necessary resource file. + The following example uses the method to obtain an object that is used to enumerate the resources in a .resx file. The example includes a `CreateResourceFile` routine that creates the necessary resource file. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResXResourceReader/Overview/resxresourcereader1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResXResourceReader/Overview/resxresourcereader1.vb" id="Snippet1"::: @@ -854,12 +854,12 @@ method provides an object that can retrieve the metadata from the resource file or stream associated with the current object. However, if the property is set to `true` before you call , no resource nodes are retrieved. + Resources are stored as name/value pairs in a resource file or stream. Design-time properties, which are called metadata, are stored in the resource file or stream along with runtime data resources. The method provides an object that can retrieve the metadata from the resource file or stream associated with the current object. However, if the property is set to `true` before you call , no resource nodes are retrieved. ## Examples - The following example uses the method to iterate through the metadata resources in an XML resource file. This code example is part of a larger example provided for the property. + The following example uses the method to iterate through the metadata resources in an XML resource file. This code example is part of a larger example provided for the property. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResXResourceReader/Overview/useresxdatanodes.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResXResourceReader/Overview/useresxdatanodes.vb" id="Snippet4"::: @@ -909,7 +909,7 @@ instance is cast to an interface. To enumerate the resources in a .resx file, we recommend that you call the method, and then call the `MoveNext` method on the returned object. + This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. To enumerate the resources in a .resx file, we recommend that you call the method, and then call the `MoveNext` method on the returned object. ]]> @@ -998,7 +998,7 @@ ## Examples - The following example enumerates and displays resource items in an XML file. Initially, is set to `false` to show both data and metadata items as they occur in the resource file. The second enumeration has the set to `true` so that resource data elements are returned as objects. + The following example enumerates and displays resource items in an XML file. Initially, is set to `false` to show both data and metadata items as they occur in the resource file. The second enumeration has the set to `true` so that resource data elements are returned as objects. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResXResourceReader/Overview/useresxdatanodes.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResXResourceReader/Overview/useresxdatanodes.vb" id="Snippet2"::: diff --git a/xml/System.Resources/ResXResourceSet.xml b/xml/System.Resources/ResXResourceSet.xml index 0e18103e837..9a2812f03cb 100644 --- a/xml/System.Resources/ResXResourceSet.xml +++ b/xml/System.Resources/ResXResourceSet.xml @@ -39,7 +39,7 @@ The class enumerates over an , loads every name and value, and stores them in a hash table. You can then enumerate the resources in the object or retrieve individual resources by name. - A object provides a convenient way to read all the resources in a .resx file into memory. You can use the method to retrieve a particular resource when the .resx file has been read into a instance. + A object provides a convenient way to read all the resources in a .resx file into memory. You can use the method to retrieve a particular resource when the .resx file has been read into a instance. ## Examples The following example instantiates a object and illustrates how to enumerate its resources and retrieve individual resources by name. For each resource that it enumerates, the example uses the property in a call to the `GetString` or `GetObject` method, depending on whether the value of the resource is a string or an object. diff --git a/xml/System.Resources/ResXResourceWriter.xml b/xml/System.Resources/ResXResourceWriter.xml index 2224acadd4b..32d8f0af840 100644 --- a/xml/System.Resources/ResXResourceWriter.xml +++ b/xml/System.Resources/ResXResourceWriter.xml @@ -46,9 +46,9 @@ ## Remarks The writes resources in XML format. To write a binary resource file, use . - Resources are specified as name/value pairs using the method. Resource names are case-sensitive when used for lookups; but to more easily support authoring tools and help eliminate bugs, does not allow a.resx file to have names that vary only by case. + Resources are specified as name/value pairs using the method. Resource names are case-sensitive when used for lookups; but to more easily support authoring tools and help eliminate bugs, does not allow a.resx file to have names that vary only by case. - To create a.resx file, create a with a unique file name, call at least once, call to write the resources file to disk, and then call to close the file. Calling will implicitly the file if required. + To create a.resx file, create a with a unique file name, call at least once, call to write the resources file to disk, and then call to close the file. Calling will implicitly the file if required. The resources are not necessarily written in the same order they were added. @@ -112,7 +112,7 @@ ## Remarks > [!NOTE] -> The method closes the stream you specify as a parameter. To write the resource to the stream without closing the stream, you must use the method. +> The method closes the stream you specify as a parameter. To write the resource to the stream without closing the stream, you must use the method. ]]> @@ -365,7 +365,7 @@ is called. + Resources whose values are from an aliased assembly are automatically added to the list of aliases. The resource is not written until is called. ]]> @@ -615,7 +615,7 @@ is called. + The resource is not written until is called. The resource is serialized and stored in a binary format. @@ -670,14 +670,14 @@ is called. The resource that was added must be serializable. + The resource is not written until is called. The resource that was added must be serializable. If the resource being added is a string, it is written as a string; otherwise, the resource is serialized and stored in a binary format. ## Examples - The following example creates a .resx file named `CarResources.resx` that stores six strings, an icon, and two application-defined objects (two `Automobile` objects). To store the icon and the `Automobile` objects, it calls the method. Note that the `Automobile` class, which is defined and instantiated in the example, is tagged with the attribute. + The following example creates a .resx file named `CarResources.resx` that stores six strings, an icon, and two application-defined objects (two `Automobile` objects). To store the icon and the `Automobile` objects, it calls the method. Note that the `Automobile` class, which is defined and instantiated in the example, is tagged with the attribute. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResXResourceWriter/Overview/create1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResXResourceWriter/Overview/create1.vb" id="Snippet1"::: @@ -739,12 +739,12 @@ is called. + The resource is not written until is called. ## Examples - The following example creates a .resx file named `CarResources.resx` that stores six strings, an icon, and two application-defined objects (two `Automobile` objects). To store the strings, it calls the method. + The following example creates a .resx file named `CarResources.resx` that stores six strings, an icon, and two application-defined objects (two `Automobile` objects). To store the strings, it calls the method. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResXResourceWriter/Overview/create1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResXResourceWriter/Overview/create1.vb" id="Snippet1"::: @@ -897,7 +897,7 @@ . + Calling this method is the equivalent of calling . ]]> @@ -975,9 +975,9 @@ method calls the method, if necessary, before releasing managed and unmanaged system resources. + The method calls the method, if necessary, before releasing managed and unmanaged system resources. - Calling allows the system resources used by the to be reallocated for other purposes. For more information about , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged). + Calling allows the system resources used by the to be reallocated for other purposes. For more information about , see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged). ]]> @@ -1018,9 +1018,9 @@ method calls the method, if necessary, before releasing managed and unmanaged system resources. + The method calls the method, if necessary, before releasing managed and unmanaged system resources. - This method is called by the public method and the method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. + This method is called by the public method and the method, if it has been overridden. `Dispose()` invokes this method with the `disposing` parameter set to `true`. `Finalize` invokes this method with `disposing` set to `false`. When the `disposing` parameter is `true`, this method releases all resources held by any managed objects that this references. This method invokes the `Dispose()` method of each referenced object. @@ -1098,9 +1098,9 @@ method writes the resources to the output file or stream. If you want to write the resources as well as close the output file or stream, call the method. + The method writes the resources to the output file or stream. If you want to write the resources as well as close the output file or stream, call the method. - The method can be called only once. After calling the method, all methods other than will throw an exception. + The method can be called only once. After calling the method, all methods other than will throw an exception. ]]> diff --git a/xml/System.Resources/ResourceManager.xml b/xml/System.Resources/ResourceManager.xml index ea60cf8c9e8..b3b158f7c1c 100644 --- a/xml/System.Resources/ResourceManager.xml +++ b/xml/System.Resources/ResourceManager.xml @@ -324,7 +324,7 @@ The individual culture-specific resource files should be contained in satellite assemblies, and the default culture's resource file should be contained in the main assembly. A satellite assembly is assumed to contain resources for a single culture specified in that assembly's manifest, and is loaded as necessary. > [!NOTE] -> To retrieve resources from .resources files directly instead of retrieving them from assemblies, you must call the method instead to instantiate a object. +> To retrieve resources from .resources files directly instead of retrieving them from assemblies, you must call the method instead to instantiate a object. If the resource file identified by `baseName` cannot be found in `assembly`, the method instantiates a object, but the attempt to retrieve a specific resource throws an exception, typically . For information about diagnosing the cause of the exception, see the "Handling the MissingManifestResourceException Exception" section of the class topic. @@ -392,12 +392,12 @@ > [!IMPORTANT] > The property value of a resource file that is compiled and embedded from the command line does not include a namespace name unless you explicitly include one when compiling the file. On the other hand, the property value of a resource file that is compiled and embedded within the Visual Studio environment typically does include the default namespace name. - The property value is the same as the string passed to the or constructor when instantiating a instance. + The property value is the same as the string passed to the or constructor when instantiating a instance. ## Examples - You can determine the names of embedded .resources files by compiling and running the following utility. This is a console app that accepts the name of a main assembly or satellite assembly as a command-line parameter. It displays the strings that should be provided as the `baseName` parameter of the or constructor so that the resource manager can correctly identify the resource. + You can determine the names of embedded .resources files by compiling and running the following utility. This is a console app that accepts the name of a main assembly or satellite assembly as a command-line parameter. It displays the strings that should be provided as the `baseName` parameter of the or constructor so that the resource manager can correctly identify the resource. :::code language="csharp" source="~/snippets/csharp/System.Resources/MissingManifestResourceException/Overview/resourcenames.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceManager/BaseName/resourcenames.vb" id="Snippet4"::: @@ -512,10 +512,10 @@ ## Remarks This method returns a resource manager that retrieves resources from a .resources file that is not embedded in an assembly. You can use this object to load resources for an ASP.NET page or to test a implementation. For an example that retrieves resources from a standalone .resources file, see the [Retrieving Resources](/dotnet/framework/resources/retrieving-resources-in-desktop-apps) article. - This method lets you specify a implementation. If you do not want a specific implementation, but would like to use a custom resource file format, you should derive from the class, override the and methods, and pass that type to this constructor. + This method lets you specify a implementation. If you do not want a specific implementation, but would like to use a custom resource file format, you should derive from the class, override the and methods, and pass that type to this constructor. > [!CAUTION] -> Using standalone .resources files in an ASP.NET app will break XCOPY deployment, because the resources remain locked until they are explicitly released by the method. If you want to deploy resources with your ASP.NET apps, compile your .resources files into satellite assemblies. +> Using standalone .resources files in an ASP.NET app will break XCOPY deployment, because the resources remain locked until they are explicitly released by the method. If you want to deploy resources with your ASP.NET apps, compile your .resources files into satellite assemblies. ]]> @@ -822,7 +822,7 @@ method is useful only if you write your own class that derives from the class. + The method is useful only if you write your own class that derives from the class. This method uses the property as part of the file name for all cultures other than the invariant culture. This method does not look in an assembly's manifest or touch the disk, and is used only to construct a resource file name (suitable for passing to the constructor) or a manifest resource blob name. @@ -903,12 +903,12 @@ uses resource fallback rules to load an appropriate resource. If `tryParents` is `false` and a culture-specific resource set cannot be found, the method returns `null`. For more information about resource fallback, see "The Resource Fallback Process" section in the [Packaging and Deploying Resources](/dotnet/framework/resources/packaging-and-deploying-resources-in-desktop-apps) article. + The resource set that is returned represents the resources that are localized for the specified culture. If the resources have not been localized for that culture and `tryParents` is `true`, uses resource fallback rules to load an appropriate resource. If `tryParents` is `false` and a culture-specific resource set cannot be found, the method returns `null`. For more information about resource fallback, see "The Resource Fallback Process" section in the [Packaging and Deploying Resources](/dotnet/framework/resources/packaging-and-deploying-resources-in-desktop-apps) article. ## Examples - The following example calls the method to retrieve culture-specific resources for the French (France) culture. It then enumerates all of the resources in the resource set. It contains the source code for an executable named ShowNumbers.exe. The example includes two text files that contain the names of numbers. The first, NumberResources.txt, contains the names of numbers from one to ten in the English language: + The following example calls the method to retrieve culture-specific resources for the French (France) culture. It then enumerates all of the resources in the resource set. It contains the source code for an executable named ShowNumbers.exe. The example includes two text files that contain the names of numbers. The first, NumberResources.txt, contains the names of numbers from one to ten in the English language: ```txt one=one @@ -1117,7 +1117,7 @@ If you change the value of the `createIfNotExists` argument to `false`, the meth method takes the name of a resource that is stored as a object, gets the value of the resource, and returns an object. It requires that you work directly with a stream of bytes, which you then convert to an object. This method is useful primarily for performance reasons: Retrieving a resource as a byte stream instead of an explicit object can improve performance. + The method takes the name of a resource that is stored as a object, gets the value of the resource, and returns an object. It requires that you work directly with a stream of bytes, which you then convert to an object. This method is useful primarily for performance reasons: Retrieving a resource as a byte stream instead of an explicit object can improve performance. The returned resource is localized for the UI culture of the current thread, which is defined by the property. If the resource is not localized for that culture, the resource manager uses fallback rules to load an appropriate resource. If no usable set of localized resources is found, the falls back on the default culture's resources. If a resource set for the default culture is not found, the method throws a exception or, if the resource set is expected to reside in a satellite assembly, a exception. If the resource manager can load an appropriate resource set but cannot find a resource named `name`, the method returns `null`. @@ -1126,7 +1126,7 @@ If you change the value of the `createIfNotExists` argument to `false`, the meth ## Examples - The following example uses the method to retrieve a bitmap that is used in an app's opening splash window. The following source code from a file named CreateResources.cs (for C#) or CreateResources.vb (for Visual Basic) generates a .resx file named AppResources.resx that contains the serialized image. In this case, the image is loaded from a file named SplashScreen.jpg; you can modify the file name to substitute your own image. + The following example uses the method to retrieve a bitmap that is used in an app's opening splash window. The following source code from a file named CreateResources.cs (for C#) or CreateResources.vb (for Visual Basic) generates a .resx file named AppResources.resx that contains the serialized image. In this case, the image is loaded from a file named SplashScreen.jpg; you can modify the file name to substitute your own image. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceManager/Overview/createresources.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceManager/GetStream/createresources.vb" id="Snippet4"::: @@ -1225,7 +1225,7 @@ csc GetStream.cs /resource:AppResources.resources method takes the name of a resource that is stored as a object, gets the value of the resource, and returns an object. It requires that you work directly with a stream of bytes, which you then convert to an object. This method is useful primarily for performance reasons: Retrieving a resource as a byte stream instead of an explicit object can improve performance. + The method takes the name of a resource that is stored as a object, gets the value of the resource, and returns an object. It requires that you work directly with a stream of bytes, which you then convert to an object. This method is useful primarily for performance reasons: Retrieving a resource as a byte stream instead of an explicit object can improve performance. The returned resource is localized for the culture that is specified by `culture`, or for the culture that is specified by the property if `culture` is `null`. If the resource is not localized for that culture, the resource manager uses fallback rules to load an appropriate resource. If no usable set of localized resources is found, the falls back on the default culture's resources. If a resource set for the default culture is not found, the method throws a exception or, if the resource set is expected to reside in a satellite assembly, a exception. If the resource manager can load an appropriate resource set but cannot find a resource named `name`, the method returns `null`. @@ -1478,12 +1478,12 @@ csc GetStream.cs /resource:AppResources.resources property is `false`, a resource with the name "Resource" is not equivalent to the resource with the name "resource". If is `true`, a resource with the name "Resource" is equivalent to the resource with the name "resource". Note, however, that when is `true`, the and methods perform case-insensitive string comparisons by using the invariant culture. The advantage is that results of case-insensitive string comparisons performed by these methods are the same on all computers regardless of culture. The disadvantage is that the results are not consistent with the casing rules of all cultures. + If the value of the property is `false`, a resource with the name "Resource" is not equivalent to the resource with the name "resource". If is `true`, a resource with the name "Resource" is equivalent to the resource with the name "resource". Note, however, that when is `true`, the and methods perform case-insensitive string comparisons by using the invariant culture. The advantage is that results of case-insensitive string comparisons performed by these methods are the same on all computers regardless of culture. The disadvantage is that the results are not consistent with the casing rules of all cultures. - For example, the Turkish alphabet has two versions of the character I: one with a dot and one without a dot. In Turkish, the character I (Unicode 0049) is considered the uppercase version of a different character ı (Unicode 0131). The character i (Unicode 0069) is considered the lowercase version of yet another character İ (Unicode 0130). According to these casing rules, a case-insensitive string comparison of the characters i (Unicode 0069) and I (Unicode 0049) should fail for the culture "tr-TR" (Turkish in Turkey). However, because the comparison is conducted by using the casing rules of the invariant culture if is `true`, this comparison succeeds. + For example, the Turkish alphabet has two versions of the character I: one with a dot and one without a dot. In Turkish, the character I (Unicode 0049) is considered the uppercase version of a different character ı (Unicode 0131). The character i (Unicode 0069) is considered the lowercase version of yet another character İ (Unicode 0130). According to these casing rules, a case-insensitive string comparison of the characters i (Unicode 0069) and I (Unicode 0049) should fail for the culture "tr-TR" (Turkish in Turkey). However, because the comparison is conducted by using the casing rules of the invariant culture if is `true`, this comparison succeeds. > [!NOTE] -> For performance reasons, it is best to always specify the correct case for your resource names. Setting to `true` can cause a significant increase in working set and a significant decline in performance. +> For performance reasons, it is best to always specify the correct case for your resource names. Setting to `true` can cause a significant increase in working set and a significant decline in performance. ]]> @@ -1727,12 +1727,12 @@ csc GetStream.cs /resource:AppResources.resources This method will shrink the working set in a running app. Any future resource lookups on this object will be as expensive as the first lookup, because the resource manager will have to search and load resources again. This can be useful in some complex threading scenarios, where creating a new object is the appropriate behavior. > [!NOTE] -> Starting with the .NET Framework version 2.0, the method is not thread safe with respect to , , and operations. The advantage of this change is a performance improvement for multiple threads that access resources. However, if you call the method in one thread while simultaneously getting a resource in another thread, the get operation can throw an exception. +> Starting with the .NET Framework version 2.0, the method is not thread safe with respect to , , and operations. The advantage of this change is a performance improvement for multiple threads that access resources. However, if you call the method in one thread while simultaneously getting a resource in another thread, the get operation can throw an exception. You can also use this method in situations where the managed instances for the resources created by the current resource manager have to be released deterministically, without waiting for the resource manager to go completely out of scope and be garbage collected. > [!NOTE] -> Calling this method does not unload satellite assemblies. To unload satellite assemblies, use the method . +> Calling this method does not unload satellite assemblies. To unload satellite assemblies, use the method . ]]> diff --git a/xml/System.Resources/ResourceReader.xml b/xml/System.Resources/ResourceReader.xml index d4d3af43edf..8a6c0de63da 100644 --- a/xml/System.Resources/ResourceReader.xml +++ b/xml/System.Resources/ResourceReader.xml @@ -174,7 +174,7 @@ constructor instantiates a object that retrieves resources either from a standalone .resources file or from a .resources file that is embedded in an assembly. To read from a standalone .resources file, instantiate a object and pass it to the constructor. To read from an embedded .resources file, call the method with the case-sensitive name of the .resources file, and pass the returned object to the constructor. + The constructor instantiates a object that retrieves resources either from a standalone .resources file or from a .resources file that is embedded in an assembly. To read from a standalone .resources file, instantiate a object and pass it to the constructor. To read from an embedded .resources file, call the method with the case-sensitive name of the .resources file, and pass the returned object to the constructor. [!INCLUDE [untrusted-data-instance-note](~/includes/untrusted-data-instance-note.md)] @@ -277,7 +277,7 @@ If the Visual Basic example is named `Example.vb`, you can compile it by using t constructor instantiates a object that retrieves resources from a standalone .resources file. To retrieve resources from an embedded .resources file, use the constructor. + The constructor instantiates a object that retrieves resources from a standalone .resources file. To retrieve resources from an embedded .resources file, use the constructor. [!INCLUDE [untrusted-data-instance-note](~/includes/untrusted-data-instance-note.md)] @@ -368,12 +368,12 @@ Label11="Mobile Phone:" can be safely called multiple times. + can be safely called multiple times. ## Examples - The following example moves through a file's resources and displays all the key/value pairs it finds. The code then uses the method to shut down the and to release all resources used by it. + The following example moves through a file's resources and displays all the key/value pairs it finds. The code then uses the method to shut down the and to release all resources used by it. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceReader/Close/getenumerator.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceReader/Close/getenumerator.vb" id="Snippet1"::: @@ -434,9 +434,9 @@ Label11="Mobile Phone:" , call to release all resources used by this instance. You should eliminate further references to this instance so that the garbage collector can reclaim the memory of the instance instead of keeping it alive for finalization. + When you are finished using this instance of , call to release all resources used by this instance. You should eliminate further references to this instance so that the garbage collector can reclaim the memory of the instance instead of keeping it alive for finalization. - calls the private Dispose(Boolean) method, which contains the code to release managed and unmanaged resources. For more information, see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). + calls the private Dispose(Boolean) method, which contains the code to release managed and unmanaged resources. For more information, see [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). ]]> @@ -500,7 +500,7 @@ Label11="Mobile Phone:" method and then repeatedly calling the method on the returned object until the method returns `false`. The resource name is available from the property; its value from the property. The example illustrates how to enumerate resources in this way. + Typically, you enumerate resources by calling the method and then repeatedly calling the method on the returned object until the method returns `false`. The resource name is available from the property; its value from the property. The example illustrates how to enumerate resources in this way. The implementation of the property by the class can throw the following exceptions: @@ -516,10 +516,10 @@ Label11="Mobile Phone:" The type to which the data belongs cannot be found. - You can handle the exception by calling the method to retrieve information about the data type and the byte array assigned to the named resource. For more information, see the "Retrieving Resources by Name with GetResourceData" section in the class topic. + You can handle the exception by calling the method to retrieve information about the data type and the byte array assigned to the named resource. For more information, see the "Retrieving Resources by Name with GetResourceData" section in the class topic. > [!IMPORTANT] -> The class includes two methods that return enumerators. The method returns an interface object and is the recommended method to call when enumerating resources. +> The class includes two methods that return enumerators. The method returns an interface object and is the recommended method to call when enumerating resources. ## Examples The example in this section uses the following .txt file named `PatientForm.txt` to define the resources used by an application. @@ -610,7 +610,7 @@ Label11="Mobile Phone:" method retrieves the value of a named resource as a byte array. It is typically used when the property throws an exception when it tries to retrieve the value of a resource. + The method retrieves the value of a named resource as a byte array. It is typically used when the property throws an exception when it tries to retrieve the value of a resource. `resourceType` is a string that represents the data type of the resource. It can be any of the following values: @@ -618,9 +618,9 @@ Label11="Mobile Phone:" |ResourceTypeCode value|Description| |----------------------------|-----------------| - |`ResourceTypeCode.ByteArray`|The data is a byte array. This data type commonly results from the call to the method.| - |`ResourceTypeCode.Null`|The data is a null reference. This data type commonly results from the call to the method with an object whose value is `null`.| - |`ResourceTypeCode.Stream`|The data is stored in a stream. This data type commonly results from the call to the or method.| + |`ResourceTypeCode.ByteArray`|The data is a byte array. This data type commonly results from the call to the method.| + |`ResourceTypeCode.Null`|The data is a null reference. This data type commonly results from the call to the method with an object whose value is `null`.| + |`ResourceTypeCode.Stream`|The data is stored in a stream. This data type commonly results from the call to the or method.| Assuming that `resourceData` has not been corrupted, it can usually be converted from a byte array back to its original value by calling a or method. @@ -628,7 +628,7 @@ Label11="Mobile Phone:" `Extensions.Person, Utility, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null` -- The string used to describe the data type in the method call. +- The string used to describe the data type in the method call. ]]> @@ -696,7 +696,7 @@ Label11="Mobile Phone:" is an explicit interface implementation. It can be used only when the instance is cast to an interface. The recommended approach to enumerating the resources in a .resources file is to call the method of the object returned by the method. + is an explicit interface implementation. It can be used only when the instance is cast to an interface. The recommended approach to enumerating the resources in a .resources file is to call the method of the object returned by the method. ]]> diff --git a/xml/System.Resources/ResourceSet.xml b/xml/System.Resources/ResourceSet.xml index a5e24e4b058..5d20a86b668 100644 --- a/xml/System.Resources/ResourceSet.xml +++ b/xml/System.Resources/ResourceSet.xml @@ -87,10 +87,10 @@ The class enumerates over an , loading every name and value, and storing them in a . A custom can be used. - You can instantiate a object that represents the resources of a specific culture by calling the method. + You can instantiate a object that represents the resources of a specific culture by calling the method. > [!IMPORTANT] -> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. +> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. ]]> @@ -366,15 +366,15 @@ ## Remarks All calls to methods on the after a call to this method might fail. - can be safely called multiple times. + can be safely called multiple times. > [!NOTE] -> The current implementation of calls (`true`). +> The current implementation of calls (`true`). ## Examples - The following code example uses the method to release all resources used by the calling instance. + The following code example uses the method to release all resources used by the calling instance. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceSet/.ctor/getenumerator.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceSet/.ctor/getenumerator.vb" id="Snippet1"::: @@ -442,10 +442,10 @@ when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the memory it was occupying can be reclaimed by garbage collection. + Call when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the memory it was occupying can be reclaimed by garbage collection. > [!NOTE] -> The current method is the implementation of . This implementation calls (`true`). +> The current method is the implementation of . This implementation calls (`true`). ]]> @@ -661,13 +661,13 @@ ## Remarks Enumerators only allow reading the data in the collection. Enumerators cannot be used to modify the underlying collection. - Initially, the enumerator is positioned before the first element in the collection. also brings the enumerator back to this position. At this position, calling throws an exception. Therefore, you must call to advance the enumerator to the first element of the collection before reading the value of . + Initially, the enumerator is positioned before the first element in the collection. also brings the enumerator back to this position. At this position, calling throws an exception. Therefore, you must call to advance the enumerator to the first element of the collection before reading the value of . - returns the same object until either or is called. sets to the next element. + returns the same object until either or is called. sets to the next element. - After the end of the collection is passed, the enumerator is positioned after the last element in the collection, and calling returns `false`. If the last call to returned `false`, calling throws an exception. To set to the first element of the collection again, you can call followed by . + After the end of the collection is passed, the enumerator is positioned after the last element in the collection, and calling returns `false`. If the last call to returned `false`, calling throws an exception. To set to the first element of the collection again, you can call followed by . - An enumerator remains valid as long as the collection remains unchanged. If changes are made to the collection, such as adding, modifying or deleting elements, the enumerator is irrecoverably invalidated and the next call to or throws an . If the collection is modified between and , will return the element that it is set to, even if the enumerator is already invalidated. + An enumerator remains valid as long as the collection remains unchanged. If changes are made to the collection, such as adding, modifying or deleting elements, the enumerator is irrecoverably invalidated and the next call to or throws an . If the collection is modified between and , will return the element that it is set to, even if the enumerator is already invalidated. You can use the property to access the value stored in the current element. Use the property to access the key of the current element. Use the property to access the value of the current element. @@ -676,7 +676,7 @@ ## Examples - The following example demonstrates how to create a `rs` for the file `items.resources`. Next, the method is used to create an for `rs`. The iterates through `rs` and displays the contents to the console. + The following example demonstrates how to create a `rs` for the file `items.resources`. Next, the method is used to create an for `rs`. The iterates through `rs` and displays the contents to the console. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceSet/.ctor/getenumerator.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceSet/.ctor/getenumerator.vb" id="Snippet1"::: @@ -753,7 +753,7 @@ . + The name of the resource object is case sensitive. For a case-insensitive search, use . ]]> @@ -820,7 +820,7 @@ . The advantage is that results of case-insensitive string comparisons performed by this method are the same on all computers regardless of culture. The disadvantage is that the results are not consistent with the casing rules of all cultures. + If the value of the `ignoreCase` parameter is `true`, a resource with the name "Resource" is equivalent to the resource with the name "resource". Note, however, that this method always performs case-insensitive string comparisons using . The advantage is that results of case-insensitive string comparisons performed by this method are the same on all computers regardless of culture. The disadvantage is that the results are not consistent with the casing rules of all cultures. For example, the Turkish alphabet has two versions of the character I: one with a dot and one without a dot. In Turkish, the character I (Unicode 0049) is considered the uppercase version of a different character ı (Unicode 0131). The character i (Unicode 0069) is considered the lowercase version of yet another character İ (Unicode 0130). According to these casing rules, a case-insensitive string comparison of the characters i (Unicode 0069) and I (Unicode 0049) should fail for the culture "tr-TR" (Turkish in Turkey). Using the `GetObject` method with `ignoreCase` set to `true`, this comparison succeeds. @@ -958,7 +958,7 @@ . The advantage is that results of case-insensitive string comparisons performed by this method are the same on all computers regardless of culture. The disadvantage is that the results are not consistent with the casing rules of all cultures. + If the value of the `ignoreCase` parameter is `true`, a resource with the name "Resource" is equivalent to the resource with the name "resource". Note, however, that this method always performs case-insensitive string comparisons using . The advantage is that results of case-insensitive string comparisons performed by this method are the same on all computers regardless of culture. The disadvantage is that the results are not consistent with the casing rules of all cultures. For example, the Turkish alphabet has two versions of the character I: one with a dot and one without a dot. In Turkish, the character I (Unicode 0049) is considered the uppercase version of a different character ı (Unicode 0131). The character i (Unicode 0069) is considered the lowercase version of yet another character İ (Unicode 0130). According to these casing rules, a case-insensitive string comparison of the characters i (Unicode 0069) and I (Unicode 0049) should fail for the culture "tr-TR" (Turkish in Turkey). Using the `GetString` method with `ignoreCase` set to `true`, this comparison succeeds. diff --git a/xml/System.Resources/ResourceWriter.xml b/xml/System.Resources/ResourceWriter.xml index 8d6f3673d14..c173bfbb009 100644 --- a/xml/System.Resources/ResourceWriter.xml +++ b/xml/System.Resources/ResourceWriter.xml @@ -79,12 +79,12 @@ ## Remarks provides a default implementation of the interface. It enables you to programmatically create a binary resource (.resources) file. - Resources are specified as name and value pairs using the method. Resource names are case-sensitive when used for lookups, but to more easily support authoring tools and help eliminate bugs, will not allow a .resources file to have names that vary only by case. The class enables you to create string, object, and binary resources. Binary resources can be written to the resource file as a byte array or a stream. + Resources are specified as name and value pairs using the method. Resource names are case-sensitive when used for lookups, but to more easily support authoring tools and help eliminate bugs, will not allow a .resources file to have names that vary only by case. The class enables you to create string, object, and binary resources. Binary resources can be written to the resource file as a byte array or a stream. > [!IMPORTANT] -> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. +> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. - To create a resources file, create a with a unique file name, call at least once, call to write the resources file to disk, and then call to close the file. Calling will implicitly call if you do not explicitly call . + To create a resources file, create a with a unique file name, call at least once, call to write the resources file to disk, and then call to close the file. Calling will implicitly call if you do not explicitly call . The resources will not necessarily be written in the same order they were added. @@ -303,14 +303,14 @@ is called. + The resource is not written until is called. - You can retrieve the resources written by the method by calling the method. + You can retrieve the resources written by the method by calling the method. ## Examples - The following example uses the method to add a graphics image that has been read as an array of bytes to a object. + The following example uses the method to add a graphics image that has been read as an array of bytes to a object. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceWriter/AddResource/addresource_byt1.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceWriter/AddResource/addresource_byt1.vb" id="Snippet4"::: @@ -380,12 +380,12 @@ ## Remarks You can specify any stream that supports the property for `value`. - You can retrieve the resources written by the method by calling the method. + You can retrieve the resources written by the method by calling the method. ## Examples - The following example uses the method to add a graphics image that has been saved to a object to a object. + The following example uses the method to add a graphics image that has been saved to a object to a object. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceWriter/AddResource/addresource_str1.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceWriter/AddResource/addresource_str1.vb" id="Snippet2"::: @@ -465,14 +465,14 @@ ## Remarks `value` must be serializable. - The resource is not written until the method is called. + The resource is not written until the method is called. - You can retrieve the resources written by the method by calling the method. + You can retrieve the resources written by the method by calling the method. ## Examples - The following example uses the method to add object data to a binary resources file. + The following example uses the method to add object data to a binary resources file. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceWriter/AddResource/addresource_obj1.cs" id="Snippet1"::: @@ -551,14 +551,14 @@ is called. + The resource is not written until is called. - You can retrieve the resources written by the method by calling the method. + You can retrieve the resources written by the method by calling the method. ## Examples - The following example uses the method to add string resources to a object. + The following example uses the method to add string resources to a object. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceWriter/.ctor/resourcewritercstr1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceWriter/.ctor/resourcewritercstr1.vb" id="Snippet1"::: @@ -632,12 +632,12 @@ ## Remarks You can specify any stream that supports the property for `value`. - You can retrieve the resources written by the method by calling the method. + You can retrieve the resources written by the method by calling the method. ## Examples - The following example uses the method to add a graphics image that has been saved to a object to a object. + The following example uses the method to add a graphics image that has been saved to a object to a object. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceWriter/AddResource/addresource_str2.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceWriter/AddResource/addresource_str2.vb" id="Snippet3"::: @@ -705,7 +705,7 @@ method to add a resource in binary form (that is, as an array of bytes) to the list of resources to be written. You must specify the name of the resource, the type name of the data contained in the resource, and the binary representation of the data itself. After you have added each resource you require, use the method to write the list of resources to the resources file or stream that was specified in the constructor. + Use the method to add a resource in binary form (that is, as an array of bytes) to the list of resources to be written. You must specify the name of the resource, the type name of the data contained in the resource, and the binary representation of the data itself. After you have added each resource you require, use the method to write the list of resources to the resources file or stream that was specified in the constructor. `typeName` is a string that represents the data type of the resource. It can be any of the following values: @@ -721,12 +721,12 @@ `Extensions.Person, Utility, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null` - A parallel method for reading resource data written with the method is . + A parallel method for reading resource data written with the method is . ## Examples - The following example uses the method to write two integer values to a .resources file, and then uses a object to retrieve them. + The following example uses the method to write two integer values to a .resources file, and then uses a object to retrieve them. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceWriter/AddResourceData/addresourcedata.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceWriter/AddResourceData/addresourcedata.vb" id="Snippet1"::: @@ -789,12 +789,12 @@ is called implicitly by , if required. + is called implicitly by , if required. ## Examples - The following example uses the method to write all resource objects in a class to the output stream. The code then shuts down the writer. + The following example uses the method to write all resource objects in a class to the output stream. The code then shuts down the writer. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceWriter/.ctor/resourcewritercstr1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceWriter/.ctor/resourcewritercstr1.vb" id="Snippet1"::: @@ -853,12 +853,12 @@ . + The implementation of this method is the same as . ## Examples - The following code example uses the method to write all resource objects in a class to the output stream. The code then shuts down the writer and make the writer's resources available for other processes. + The following code example uses the method to write all resource objects in a class to the output stream. The code then shuts down the writer and make the writer's resources available for other processes. :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceWriter/Dispose/resourcewriterdispose.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceWriter/Dispose/resourcewriterdispose.vb" id="Snippet1"::: @@ -927,16 +927,16 @@ method is called implicitly by the method if it is not called by your application code. + The method is called implicitly by the method if it is not called by your application code. - can only be called once, after all calls to and have been made. If an exception occurs while writing the resources, the output stream will be closed to prevent writing invalid information. + can only be called once, after all calls to and have been made. If an exception occurs while writing the resources, the output stream will be closed to prevent writing invalid information. - does not close the output stream in normal cases. Unless you are combining extra data with your .resources file or need access to the stream afterwards, you should call after calling , or simply call . + does not close the output stream in normal cases. Unless you are combining extra data with your .resources file or need access to the stream afterwards, you should call after calling , or simply call . ## Examples - The following code example uses the method to write all resource objects in a class to the output stream + The following code example uses the method to write all resource objects in a class to the output stream :::code language="csharp" source="~/snippets/csharp/System.Resources/ResourceWriter/Generate/resourcewritergenerate.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Resources/ResourceWriter/Generate/resourcewritergenerate.vb" id="Snippet1"::: diff --git a/xml/System.Resources/UltimateResourceFallbackLocation.xml b/xml/System.Resources/UltimateResourceFallbackLocation.xml index be96d2c9559..1726feb534b 100644 --- a/xml/System.Resources/UltimateResourceFallbackLocation.xml +++ b/xml/System.Resources/UltimateResourceFallbackLocation.xml @@ -65,13 +65,13 @@ Specifies whether a object looks for the resources of the app's default culture in the main assembly or in a satellite assembly. - enumeration is used with the constructor to specify whether a object retrieves the resources of the app's default culture from the main app assembly (the default), or from a satellite assembly. In a localized application, the resources of the default culture are used if no culture-specific resources are found after using the resource fallback process. For more information, see the "Resource Fallback Process" section in [Packaging and Deploying Resources](/dotnet/framework/resources/packaging-and-deploying-resources-in-desktop-apps). - - If you specify a value of MainAssembly or no value to the attribute and resource manager cannot load a resource set that belongs to the default culture, it throws a exception. If you specify a value of Satellite to the and resource manager cannot load a resource set that belongs to the default culture, it throws a exception. - + enumeration is used with the constructor to specify whether a object retrieves the resources of the app's default culture from the main app assembly (the default), or from a satellite assembly. In a localized application, the resources of the default culture are used if no culture-specific resources are found after using the resource fallback process. For more information, see the "Resource Fallback Process" section in [Packaging and Deploying Resources](/dotnet/framework/resources/packaging-and-deploying-resources-in-desktop-apps). + + If you specify a value of MainAssembly or no value to the attribute and resource manager cannot load a resource set that belongs to the default culture, it throws a exception. If you specify a value of Satellite to the and resource manager cannot load a resource set that belongs to the default culture, it throws a exception. + ]]> diff --git a/xml/System.Runtime.Caching.Hosting/IApplicationIdentifier.xml b/xml/System.Runtime.Caching.Hosting/IApplicationIdentifier.xml index 9b2dd3841cb..b30a2f0cccb 100644 --- a/xml/System.Runtime.Caching.Hosting/IApplicationIdentifier.xml +++ b/xml/System.Runtime.Caching.Hosting/IApplicationIdentifier.xml @@ -58,9 +58,9 @@ method is typically implemented by a .NET Framework host environment in order to construct an application identifier for an implementation. A implementation uses this information to identify the application domain that is currently running. + The method is typically implemented by a .NET Framework host environment in order to construct an application identifier for an implementation. A implementation uses this information to identify the application domain that is currently running. - For example, in ASP.NET, the cache uses an application identifier to construct identifiers for cache performance counters. The cache calls the method that is implemented by the host environment and the host returns the identifier. This provides names for performance counter instances that can be distinguished between application domains when multiple application domains are running. + For example, in ASP.NET, the cache uses an application identifier to construct identifiers for cache performance counters. The cache calls the method that is implemented by the host environment and the host returns the identifier. This provides names for performance counter instances that can be distinguished between application domains when multiple application domains are running. ]]> diff --git a/xml/System.Runtime.Caching.Hosting/IFileChangeNotificationSystem.xml b/xml/System.Runtime.Caching.Hosting/IFileChangeNotificationSystem.xml index 0e2d454f1ea..ea1a5da9ae5 100644 --- a/xml/System.Runtime.Caching.Hosting/IFileChangeNotificationSystem.xml +++ b/xml/System.Runtime.Caching.Hosting/IFileChangeNotificationSystem.xml @@ -72,7 +72,7 @@ interface in order to register file paths for monitoring with the host environment. The method is called by implementers of the interface in order to register a file or directory for change monitoring. + This method is used by custom cache objects and custom change monitors that implement the host environment's interface in order to register file paths for monitoring with the host environment. The method is called by implementers of the interface in order to register a file or directory for change monitoring. ]]> @@ -106,7 +106,7 @@ method must be called by custom caches and custom change monitors that are being disposed by the host environment in order to stop monitoring file paths and directories. + The method must be called by custom caches and custom change monitors that are being disposed by the host environment in order to stop monitoring file paths and directories. ]]> diff --git a/xml/System.Runtime.Caching.Hosting/IMemoryCacheManager.xml b/xml/System.Runtime.Caching.Hosting/IMemoryCacheManager.xml index 7a6c8aa0bb5..94a59747d69 100644 --- a/xml/System.Runtime.Caching.Hosting/IMemoryCacheManager.xml +++ b/xml/System.Runtime.Caching.Hosting/IMemoryCacheManager.xml @@ -60,7 +60,7 @@ method to release the reference. When a cache is being disposed, it should call the method to make sure that no reference to the cache is held on the host. + If a cache has previously registered itself with the host environment, the cache can call the method to release the reference. When a cache is being disposed, it should call the method to make sure that no reference to the cache is held on the host. ]]> @@ -94,7 +94,7 @@ method to periodically report the size of the cache's memory footprint to the host environment. + A well-behaved cache implementation should use the method to periodically report the size of the cache's memory footprint to the host environment. The cache implementation that reports the size also passes a reference to itself as a parameter. This enables the host environment to perform the following tasks: diff --git a/xml/System.Runtime.Caching/CacheEntryChangeMonitor.xml b/xml/System.Runtime.Caching/CacheEntryChangeMonitor.xml index 9369c451bbd..de681ac64ed 100644 --- a/xml/System.Runtime.Caching/CacheEntryChangeMonitor.xml +++ b/xml/System.Runtime.Caching/CacheEntryChangeMonitor.xml @@ -28,7 +28,7 @@ class provides abstract, read-only properties that can be implemented for monitoring cache entries. This class is used when a cache implementation has to monitor changes to entries in its own cache. For caches that are cache implementations, an instance of the type is returned by the method. + The class provides abstract, read-only properties that can be implemented for monitoring cache entries. This class is used when a cache implementation has to monitor changes to entries in its own cache. For caches that are cache implementations, an instance of the type is returned by the method. ]]> diff --git a/xml/System.Runtime.Caching/CacheEntryRemovedArguments.xml b/xml/System.Runtime.Caching/CacheEntryRemovedArguments.xml index 79fdbd84a24..a421be2b9cf 100644 --- a/xml/System.Runtime.Caching/CacheEntryRemovedArguments.xml +++ b/xml/System.Runtime.Caching/CacheEntryRemovedArguments.xml @@ -25,13 +25,13 @@ Provides information about a cache entry that was removed from the cache. - class represent the cache entry itself, the instance that the entry was removed from, and the reason for the removal. The constructor of the class uses these arguments to create a new instance of the class. - - A object is typically created in a callback method to pass information about a removed cache entry back to an application when a cache entry is removed from the cache. - + class represent the cache entry itself, the instance that the entry was removed from, and the reason for the removal. The constructor of the class uses these arguments to create a new instance of the class. + + A object is typically created in a callback method to pass information about a removed cache entry back to an application when a cache entry is removed from the cache. + ]]> @@ -63,20 +63,20 @@ An instance of the cached entry that was removed. Initializes a new instance of the class. - class when they want to be notified after a cache entry has been removed from the cache. - - When a cache implementation is about to remove one or more cache entries from the cache, the cache implementation calls the delegate that was registered in the application. When a cache implementation calls the delegate, it typically calls the constructor to pass to the callback a new instance that contains information about the cache entry that is being removed. The callback notifies the application that registered the callback about the cache entry that is being removed. After the constructor returns, the instance contains the details about the removal of the cache entry. - + class when they want to be notified after a cache entry has been removed from the cache. + + When a cache implementation is about to remove one or more cache entries from the cache, the cache implementation calls the delegate that was registered in the application. When a cache implementation calls the delegate, it typically calls the constructor to pass to the callback a new instance that contains information about the cache entry that is being removed. The callback notifies the application that registered the callback about the cache entry that is being removed. After the constructor returns, the instance contains the details about the removal of the cache entry. + ]]> - is . - - -or- - + is . + + -or- + is . @@ -134,11 +134,11 @@ Gets a value that indicates why a cache entry was removed. One of the enumeration values that indicates why the entry was removed. - enumeration indicates one of a predefined set of reasons for the removal, such as that the entry was explicitly removed or that it expired. - + enumeration indicates one of a predefined set of reasons for the removal, such as that the entry was explicitly removed or that it expired. + ]]> diff --git a/xml/System.Runtime.Caching/CacheItem.xml b/xml/System.Runtime.Caching/CacheItem.xml index df64a59857b..48b3981a30d 100644 --- a/xml/System.Runtime.Caching/CacheItem.xml +++ b/xml/System.Runtime.Caching/CacheItem.xml @@ -82,7 +82,7 @@ method overload is called, the property values for and are set to `null`. + When the method overload is called, the property values for and are set to `null`. ]]> @@ -113,7 +113,7 @@ method overload is called, the property value for is set to `null`. + When the method overload is called, the property value for is set to `null`. ]]> diff --git a/xml/System.Runtime.Caching/ChangeMonitor.xml b/xml/System.Runtime.Caching/ChangeMonitor.xml index 2ed862a761a..de3e8d6142a 100644 --- a/xml/System.Runtime.Caching/ChangeMonitor.xml +++ b/xml/System.Runtime.Caching/ChangeMonitor.xml @@ -140,7 +140,7 @@ Note: This automatic call to the dispose method during the event firing only occ method is used to release the instance and related resources. The public method is invoked to coordinate the disposal process with key life-cycle events of derived change-monitor classes (such as initialization), and to release the instance so that the instance can be garbage collected. The method is implemented by derived change-monitor classes to dispose of their managed and unmanaged resources. + The method is used to release the instance and related resources. The public method is invoked to coordinate the disposal process with key life-cycle events of derived change-monitor classes (such as initialization), and to release the instance so that the instance can be garbage collected. The method is implemented by derived change-monitor classes to dispose of their managed and unmanaged resources. ]]> @@ -172,35 +172,35 @@ Note: This automatic call to the dispose method during the event firing only occ method invokes the method of derived classes only one time, the first time it is called. Subsequent calls to the method have no effect. After the method has been called, the property is set to `true`. + The method invokes the method of derived classes only one time, the first time it is called. Subsequent calls to the method have no effect. After the method has been called, the property is set to `true`. - The overload must be called to dispose of a instance. The following are the rules for calling the dispose method: + The overload must be called to dispose of a instance. The following are the rules for calling the dispose method: - Before an item is inserted into the cache, it is the caller's responsibility to dispose of a instance. -- Once cache item and the instances that are associated with it are passed to a cache, the cache implementer that must make sure that is called, even if the insert fails. +- Once cache item and the instances that are associated with it are passed to a cache, the cache implementer that must make sure that is called, even if the insert fails. -- After an item and its associated instances are passed to a cache, the caller must not dispose the dependency because when the method is called, the call is treated as if the dependency has changed. As a result, the method is automatically invoked. +- After an item and its associated instances are passed to a cache, the caller must not dispose the dependency because when the method is called, the call is treated as if the dependency has changed. As a result, the method is automatically invoked. -- Taking these rules into consideration, the method must be called in one of the following ways: +- Taking these rules into consideration, the method must be called in one of the following ways: - - Users must call the method overload if they decide not to insert the derived change-monitor instance into a cache. + - Users must call the method overload if they decide not to insert the derived change-monitor instance into a cache. - - The cache implementation is responsible for calling the overload if the implementation tries to insert the change-monitor instance into an object cache but the insertion fails. When the insertion attempt causes an exception, the cache implementation must dispose any associated dependencies. + - The cache implementation is responsible for calling the overload if the implementation tries to insert the change-monitor instance into an object cache but the insertion fails. When the insertion attempt causes an exception, the cache implementation must dispose any associated dependencies. - If the cache entry is removed, the cache implementation must also dispose the dependency. - The internal implementation of the method automatically calls the method after it calls a callback that is registered through the method. + The internal implementation of the method automatically calls the method after it calls a callback that is registered through the method. > [!NOTE] > This automatic dispose during the event firing only occurs if the initialization of the instance previously completed. - When a derived change monitor's constructor calls the method, if the state of the change monitor has already changed (that is, the state that is monitored has already changed when the constructor was still active) then method will automatically dispose the change monitor. + When a derived change monitor's constructor calls the method, if the state of the change monitor has already changed (that is, the state that is monitored has already changed when the constructor was still active) then method will automatically dispose the change monitor. > [!NOTE] -> Users should not call the method. However, you cannot prevent users from calling the method. Therefore, if they do, the method is invoked. In that case, the cache entry is notified as if the dependency has changed. +> Users should not call the method. However, you cannot prevent users from calling the method. Therefore, if they do, the method is invoked. In that case, the cache entry is notified as if the dependency has changed. - To prevent derived classes from overriding method, the method is not an explicit interface implementation. + To prevent derived classes from overriding method, the method is not an explicit interface implementation. ]]> @@ -235,7 +235,7 @@ Note: This automatic call to the dispose method during the event firing only occ method will invoke the implemented method only one time. + When the value of `disposing` value is `true`, all managed and unmanaged resources are disposed and any references to this object are released so that the derived change-monitor instance can be garbage collected. It is guaranteed that the base method will invoke the implemented method only one time. ]]> @@ -272,7 +272,7 @@ Note: This automatic call to the dispose method during the event firing only occ ## Remarks You can check the value of this property in a derived class to see whether a dependency has changed. - The value is set to `true` when a dependency change occurs (that is, when the method is called). After the method is called by the derived class, the value of the property will be `true`, regardless of whether a instance has been notified by a call to the method. + The value is set to `true` when a dependency change occurs (that is, when the method is called). After the method is called by the derived class, the value of the property will be `true`, regardless of whether a instance has been notified by a call to the method. > [!NOTE] > Callers can check the property to see whether a dependency has changed. However, in a multi-threaded environment, a simpler and more maintainable approach is to insert data into a cache implementation without checking the property. Cache implementations must check the property for you and must not perform an insert or set operation if one or more associated dependencies have already changed. @@ -306,9 +306,9 @@ Note: This automatic call to the dispose method during the event firing only occ method. + If a dependency changes before initialization is complete in a derived class, the constructor of the derived class must invoke the method. - When the method is invoked, the property is automatically set to `true` by the change monitor. As a result, when the change monitor's constructor calls the method, the base class will automatically call the method. If initialization is complete, the method automatically disposes the derived change-monitor instance. + When the method is invoked, the property is automatically set to `true` by the change monitor. As a result, when the change monitor's constructor calls the method, the base class will automatically call the method. If initialization is complete, the method automatically disposes the derived change-monitor instance. ]]> @@ -341,7 +341,7 @@ Note: This automatic call to the dispose method during the event firing only occ method calls the method in a derived class to dispose of the instance. + The property is set to `true` after the base method calls the method in a derived class to dispose of the instance. ]]> @@ -380,9 +380,9 @@ Note: This automatic call to the dispose method during the event firing only occ > [!NOTE] > The base cache extensibility API has no requirement for explicit dependency on the type of state. - The implementation of the method automatically determines whether the state of the monitor has already changed at the time method is called. If the property is `true`, then the method automatically calls the event handler, that was registered, through the method. This occurs because it is possible that from the time a cache implementation creates a change monitor, to the time a cache implementation gets the monitor and wires itself up to it, the underlying monitored state has changed. If the state has already changed then the object that is passed to the method is `null`. + The implementation of the method automatically determines whether the state of the monitor has already changed at the time method is called. If the property is `true`, then the method automatically calls the event handler, that was registered, through the method. This occurs because it is possible that from the time a cache implementation creates a change monitor, to the time a cache implementation gets the monitor and wires itself up to it, the underlying monitored state has changed. If the state has already changed then the object that is passed to the method is `null`. - The method can be invoked only one time, and will throw an exception on subsequent calls. + The method can be invoked only one time, and will throw an exception on subsequent calls. ]]> @@ -423,9 +423,9 @@ Note: This automatic call to the dispose method during the event firing only occ method is called when dependency changes occur. The method is also invoked when a change-monitor instance is disposed but the disposal occurs only if the callback has not already been invoked. + Typically, the method is called when dependency changes occur. The method is also invoked when a change-monitor instance is disposed but the disposal occurs only if the callback has not already been invoked. - If the method is called before the method is called, the state data from the call to the method is saved by the cache implementation. Also, the callback to the method is invoked immediately when the method is invoked. + If the method is called before the method is called, the state data from the call to the method is saved by the cache implementation. Also, the callback to the method is invoked immediately when the method is invoked. ]]> diff --git a/xml/System.Runtime.Caching/HostFileChangeMonitor.xml b/xml/System.Runtime.Caching/HostFileChangeMonitor.xml index 26332e9575d..f151723e13f 100644 --- a/xml/System.Runtime.Caching/HostFileChangeMonitor.xml +++ b/xml/System.Runtime.Caching/HostFileChangeMonitor.xml @@ -98,7 +98,7 @@ constructor must provide a non-null value for the `filePaths` parameter. At a minimum, the constructor validates the collection of paths that is passed into it and then initializes monitoring for those paths. + Calls to the constructor must provide a non-null value for the `filePaths` parameter. At a minimum, the constructor validates the collection of paths that is passed into it and then initializes monitoring for those paths. > [!NOTE] > The constructor performs only string validation of the path name. It does not canonicalize paths or validate that the paths exist. diff --git a/xml/System.Runtime.Caching/MemoryCache.xml b/xml/System.Runtime.Caching/MemoryCache.xml index 4020b2cdf2f..e41cfdaf8eb 100644 --- a/xml/System.Runtime.Caching/MemoryCache.xml +++ b/xml/System.Runtime.Caching/MemoryCache.xml @@ -42,7 +42,7 @@ The class does not allow `null` as a value in the cache. Any attempt to add or change a cache entry with a value of `null` will fail. - The type does not implement *cache regions*. Therefore, when you call methods that implement base methods that contain a parameter for regions, do not pass a value for the parameter. The methods that use the region parameter all supply a default `null` value. For example, the method overload has a `regionName` parameter whose default value is `null`. + The type does not implement *cache regions*. Therefore, when you call methods that implement base methods that contain a parameter for regions, do not pass a value for the parameter. The methods that use the region parameter all supply a default `null` value. For example, the method overload has a `regionName` parameter whose default value is `null`. @@ -136,11 +136,11 @@ private void btnGet_Click(object sender, EventArgs e) ## Remarks When the class is initialized, it checks for configuration entries that might have been overridden by using the optional `config` parameter in the constructor. You can pass the following parameters in the `config` parameter. All values can be passed as integers. -- +- -- +- -- +- When this constructor is invoked, configuration settings are first retrieved from application configuration files. If no configuration entries exist in the application configuration file, only the settings provided in `config` are applied. If the configuration entries in the application configuration exist, and if information is also passed in `config`, the information in the `config` overrides the information that is read from the configuration file. @@ -222,7 +222,7 @@ private void btnGet_Click(object sender, EventArgs e) ## Remarks > [!WARNING] -> The and method overloads do not support the property. Therefore, to set the property for a cache entry, use the method overloads instead. +> The and method overloads do not support the property. Therefore, to set the property for a cache entry, use the method overloads instead. ]]> @@ -239,7 +239,7 @@ private void btnGet_Click(object sender, EventArgs e) method overloads are used to insert a cache entry into the cache. If a cache entry with a matching key does not exist, these methods insert a new entry. If a cache entry with a matching key already exists, they return the existing entry. + The method overloads are used to insert a cache entry into the cache. If a cache entry with a matching key does not exist, these methods insert a new entry. If a cache entry with a matching key already exists, they return the existing entry. ]]> @@ -277,7 +277,7 @@ private void btnGet_Click(object sender, EventArgs e) The `item` parameter supplies the key and the value that is used by the method. If the cache has a cache entry with the same key as the key of the `item` parameter, the method returns the existing entry as a instance. If there is no existing cache entry, the method creates a new one by using the key and value supplied by the `item` parameter, and with the eviction details specified by `policy`. > [!WARNING] -> The and method overloads do not support the property. Therefore, to set the property for a cache entry, use the method overloads instead. +> The and method overloads do not support the property. Therefore, to set the property for a cache entry, use the method overloads instead. ]]> @@ -326,10 +326,10 @@ private void btnGet_Click(object sender, EventArgs e) method overload returns `null`. If a matching cache entry exists, the existing entry is returned. + If the cache does not have a cache entry whose key matches the `key` parameter, a new cache entry is created, and the method overload returns `null`. If a matching cache entry exists, the existing entry is returned. > [!WARNING] -> The and method overloads do not support the property. Therefore, to set the property for a cache entry, use the method overloads instead. +> The and method overloads do not support the property. Therefore, to set the property for a cache entry, use the method overloads instead. ]]> @@ -383,7 +383,7 @@ private void btnGet_Click(object sender, EventArgs e) ## Remarks > [!WARNING] -> The and method overloads do not support the property. Therefore, to set the property for a cache entry, use the method overloads instead. +> The and method overloads do not support the property. Therefore, to set the property for a cache entry, use the method overloads instead. ]]> @@ -500,11 +500,11 @@ You can specify the settings for the method creates a instance. This specialized change monitor is used to monitor the cache entries that are specified in the `keys` collection and to trigger events when the entries change. + The method creates a instance. This specialized change monitor is used to monitor the cache entries that are specified in the `keys` collection and to trigger events when the entries change. A monitored entry is considered to have changed for any of the following reasons: -- The key does not exist at the time of the call to the method. In that case, the resulting instance is immediately set to a changed state. This means that when code subsequently binds a change-notification callback, the callback is triggered immediately. +- The key does not exist at the time of the call to the method. In that case, the resulting instance is immediately set to a changed state. This means that when code subsequently binds a change-notification callback, the callback is triggered immediately. - The associated cache entry was removed from the cache. This can occur if the entry is explicitly removed, if it expires, or if it is evicted to recover memory @@ -616,11 +616,11 @@ You can specify the settings for the instance is bound to the event. However, during application-domain shutdown, if a memory-based cache has not been explicitly disposed, the cache instance will automatically call the method. + Each instance is bound to the event. However, during application-domain shutdown, if a memory-based cache has not been explicitly disposed, the cache instance will automatically call the method. The disposed cache instance is shut down using the following steps: -1. The state of the cache is set to indicate that the cache is disposed. Any attempt to call public caching methods that change the state of the cache, such as methods that add, remove, or retrieve cache entries, might cause unexpected behavior. For example, if you call the method after the cache is disposed, a no-op error occurs. If you attempt to retrieve items from the cache, the method will always return `null`. +1. The state of the cache is set to indicate that the cache is disposed. Any attempt to call public caching methods that change the state of the cache, such as methods that add, remove, or retrieve cache entries, might cause unexpected behavior. For example, if you call the method after the cache is disposed, a no-op error occurs. If you attempt to retrieve items from the cache, the method will always return `null`. 2. Performance counter information is no longer raised from the current cache instance. @@ -701,7 +701,7 @@ You can specify the settings for the method returns it as a instance. The and properties of the instance will be set. However, the property will be `null`, because regions are not implemented in the class. + If the cache entry specified by `key` exists in the cache, the method returns it as a instance. The and properties of the instance will be set. However, the property will be `null`, because regions are not implemented in the class. ]]> @@ -762,7 +762,7 @@ You can specify the settings for the method can be used to iterate over entries in the cache. + The enumerator that is returned by the method can be used to iterate over entries in the cache. > [!IMPORTANT] > Retrieving an enumerator for a instance is a resource-intensive and blocking operation. Therefore, the enumerator should not be used in production applications. @@ -909,7 +909,7 @@ You can specify the settings for the property returns the name of the current instance of the class. In an application that uses multiple cache instances, you can use the property to help distinguish instances. For more information, see the method. The default memory-based cache returns the default name. + The property returns the name of the current instance of the class. In an application that uses multiple cache instances, you can use the property to help distinguish instances. For more information, see the method. The default memory-based cache returns the default name. ]]> @@ -970,7 +970,7 @@ You can specify the settings for the property can be specified in the application configuration file. Alternatively they can be passed when the class is initialized. For more information about how to configure this property, see [<namedCaches> Element (Cache Settings)](/dotnet/framework/configure-apps/file-schema/runtime/namedcaches-element-cache-settings). For more information about how to configure the property when the class is being initialized, see the method. + The settings for the property can be specified in the application configuration file. Alternatively they can be passed when the class is initialized. For more information about how to configure this property, see [<namedCaches> Element (Cache Settings)](/dotnet/framework/configure-apps/file-schema/runtime/namedcaches-element-cache-settings). For more information about how to configure the property when the class is being initialized, see the method. ]]> @@ -1098,7 +1098,7 @@ You can specify the settings for the method overloads, the method always puts a cache value in the cache, regardless whether an entry already exists that has the same key. If the specified entry does not exist in the cache, a new cache entry is inserted. If the specified entry already exists, its value is updated. + Like other method overloads, the method always puts a cache value in the cache, regardless whether an entry already exists that has the same key. If the specified entry does not exist in the cache, a new cache entry is inserted. If the specified entry already exists, its value is updated. ]]> @@ -1159,7 +1159,7 @@ You can specify the settings for the method overloads, the method always puts a cache value in the cache, regardless whether an entry already exists with the same key. If the specified entry does not exist, a new cache entry is inserted. If the specified entry exists, it is updated. + Like other method overloads, the method always puts a cache value in the cache, regardless whether an entry already exists with the same key. If the specified entry does not exist, a new cache entry is inserted. If the specified entry exists, it is updated. The `absoluteExpiration` parameter indicates when the entry should be removed from the cache. @@ -1222,7 +1222,7 @@ You can specify the settings for the method overloads, the method always puts a cache value in the cache, regardless whether a matching entry already exists. If the specified entry does not exist in the cache, a new cache entry is inserted. If the specified entry exists, it is updated. + Like other method overloads, the method always puts a cache value in the cache, regardless whether a matching entry already exists. If the specified entry does not exist in the cache, a new cache entry is inserted. If the specified entry exists, it is updated. Removing an entry triggers any associated change monitors. If the removed item was associated with a object or object, the reason for removal that is passed to the callbacks is contained in the property. diff --git a/xml/System.Runtime.Caching/ObjectCache.xml b/xml/System.Runtime.Caching/ObjectCache.xml index 0ce92e840a0..c24ccd98efd 100644 --- a/xml/System.Runtime.Caching/ObjectCache.xml +++ b/xml/System.Runtime.Caching/ObjectCache.xml @@ -89,9 +89,9 @@ Note: is not a singleton, bu method overloads try to insert a cache entry into the cache, without overwriting or removing an existing cache entry that has the same key. The cache entry can be a typed object or a generic object. + The method overloads try to insert a cache entry into the cache, without overwriting or removing an existing cache entry that has the same key. The cache entry can be a typed object or a generic object. - The method overloads and the method overloads have one significant difference. When these methods insert a cache entry, if a matching entry is found in the cache, the method overloads return the existing cache entry, but the method overloads do not. Having these different method overloads enables callers to optimize their code based on whether they need the existing cache entry. In distributed caches, returning an existing value by using the method might be more expensive than returning a Boolean value by using method. + The method overloads and the method overloads have one significant difference. When these methods insert a cache entry, if a matching entry is found in the cache, the method overloads return the existing cache entry, but the method overloads do not. Having these different method overloads enables callers to optimize their code based on whether they need the existing cache entry. In distributed caches, returning an existing value by using the method might be more expensive than returning a Boolean value by using method. ]]> @@ -127,7 +127,7 @@ Note: is not a singleton, bu method overloads are virtual (not abstract) on the class, because the method internally calls . This reduces the number of method overloads that a cache implementer has to provide. If a cache implementation does not require any special behavior for the method, it can just implement the method overloads. + The method overloads are virtual (not abstract) on the class, because the method internally calls . This reduces the number of method overloads that a cache implementer has to provide. If a cache implementation does not require any special behavior for the method, it can just implement the method overloads. ]]> @@ -166,7 +166,7 @@ Note: is not a singleton, bu method overloads are virtual (not abstract) on the class, because the method internally calls . This reduces the number of method overloads that a cache implementer has to provide. If a cache implementation does not require any special behavior for the method, it can just implement the method overloads. + The method overloads are virtual (not abstract) on the class, because the method internally calls . This reduces the number of method overloads that a cache implementer has to provide. If a cache implementation does not require any special behavior for the method, it can just implement the method overloads. ]]> @@ -205,7 +205,7 @@ Note: is not a singleton, bu method overloads are virtual (not abstract) on the class, because the method internally calls . This reduces the number of method overloads that a cache implementer has to provide. If a cache implementation does not require any special behavior for the method, it can just implement the method overloads. + The method overloads are virtual (not abstract) on the class, because the method internally calls . This reduces the number of method overloads that a cache implementer has to provide. If a cache implementation does not require any special behavior for the method, it can just implement the method overloads. ]]> @@ -222,9 +222,9 @@ Note: is not a singleton, bu method overloads insert an entry into the cache. If a cache entry with a matching key already exists, they return the existing entry. The cache entry can be a object or a generic object. + The method overloads insert an entry into the cache. If a cache entry with a matching key already exists, they return the existing entry. The cache entry can be a object or a generic object. - There is one difference between the overloads and the overloads. When these overloaded methods try to insert a cache entry, if an existing entry is found that has a key that matches an existing inserted cache entry, the overloads return the existing cache entry. The overloads do not. + There is one difference between the overloads and the overloads. When these overloaded methods try to insert a cache entry, if an existing entry is found that has a key that matches an existing inserted cache entry, the overloads return the existing cache entry. The overloads do not. ]]> @@ -290,7 +290,7 @@ Note: is not a singleton, bu method overload returns an object value, not a object. + This method overload returns an object value, not a object. ]]> @@ -328,7 +328,7 @@ Note: is not a singleton, bu method returns an object value, not a object. + The method returns an object value, not a object. ]]> @@ -390,7 +390,7 @@ Note: is not a singleton, bu class overrides the base method, the cache implementation must create a object. This specialized change monitor notifies callers when there are changes to the cache entries that are specified in the `keys` parameter. For example, if a monitored item in the `keys` parameter is updated or removed from the cache, the change monitor created by this method triggers an event. + When a derived class overrides the base method, the cache implementation must create a object. This specialized change monitor notifies callers when there are changes to the cache entries that are specified in the `keys` parameter. For example, if a monitored item in the `keys` parameter is updated or removed from the cache, the change monitor created by this method triggers an event. If a cache implementation supports named cache regions, a string value can be specified as the `regionName` parameter. Otherwise, the parameter defaults to `null`. @@ -478,9 +478,9 @@ Note: is not a singleton, bu class. In that case, the method overload will not necessarily return all the information about cached data. However, the method overload enables custom caches to return more than just the cache value. + This method overload exists because some cache implementations might extend the class. In that case, the method overload will not necessarily return all the information about cached data. However, the method overload enables custom caches to return more than just the cache value. - The method is like the method, except that the method returns return the cache entry as a instance. + The method is like the method, except that the method returns return the cache entry as a instance. ]]> @@ -543,7 +543,7 @@ Note: is not a singleton, bu > [!NOTE] > Returning an enumerator is typically a more expensive operation than returning the entire cache entry. - This method is called by the explicit interface implementations that the class has for the and methods. + This method is called by the explicit interface implementations that the class has for the and methods. ]]> @@ -586,7 +586,7 @@ Note: is not a singleton, bu method overload is a performance optimization for distributed caches that support fetching multiple cache entries from the cache during a single network call. + The method overload is a performance optimization for distributed caches that support fetching multiple cache entries from the cache during a single network call. Although a caller can pass one or more keys to the method, there is no guarantee that all keys represent entries in the cache. Therefore, the returned dictionary might contain fewer items than the number of keys that were passed to the method. @@ -636,9 +636,9 @@ Note: is not a singleton, bu method overload is like the method overload, but lets you pass the named region by using optional parameter syntax that is supported by managed languages such as C#. + The method overload is like the method overload, but lets you pass the named region by using optional parameter syntax that is supported by managed languages such as C#. - This method is a virtual method because the class provides a default implementation that passes the `params` array to the method overload. + This method is a virtual method because the class provides a default implementation that passes the `params` array to the method overload. ]]> @@ -755,9 +755,9 @@ Note: is not a singleton, bu method. Internally, a cache implementation could set the absolute expiration of the specified value to the method. However this behavior is ultimately up to the cache implementation. + The behavior of the set accessor of this property is like the method. Internally, a cache implementation could set the absolute expiration of the specified value to the method. However this behavior is ultimately up to the cache implementation. - The behavior of get accessor is like calling the method and using `null` for the region name. + The behavior of get accessor is like calling the method and using `null` for the region name. ]]> @@ -870,7 +870,7 @@ Note: is not a singleton, bu overload methods is an insert-or-update operation. A cache entry is either inserted as a new entry if the specified entry does not exist, or the cache entry is updated with a new value if it already exists. + The typical behavior of the overload methods is an insert-or-update operation. A cache entry is either inserted as a new entry if the specified entry does not exist, or the cache entry is updated with a new value if it already exists. ]]> @@ -1049,7 +1049,7 @@ Note: is not a singleton, bu Developers can use this method to iterate through a generic collection of cache entries. - This is the default implementation that internally calls the method. + This is the default implementation that internally calls the method. ]]> diff --git a/xml/System.Runtime.Caching/SqlChangeMonitor.xml b/xml/System.Runtime.Caching/SqlChangeMonitor.xml index e03f4d83af9..608b168c430 100644 --- a/xml/System.Runtime.Caching/SqlChangeMonitor.xml +++ b/xml/System.Runtime.Caching/SqlChangeMonitor.xml @@ -16,11 +16,11 @@ Provides change monitoring for SQL Server databases. This class cannot be inherited. - class wraps the ADO.NET class and adds change monitoring for SQL Server-based dependencies. Therefore, the class serves as a bridge between the ADO.NET object and the namespace. - + class wraps the ADO.NET class and adds change monitoring for SQL Server-based dependencies. Therefore, the class serves as a bridge between the ADO.NET object and the namespace. + ]]> @@ -44,13 +44,13 @@ An object that represents an ADO.NET object. Initializes a new instance of the class. - method binds the event of the object in `dependency` to the method handler. This enables the change monitor to receive notification of changes in SQL Server databases. - - When you invoke the constructor, you must pass a object as a parameter. When you create a object, you must pass a parameter to the constructor. The constructor for class lets you specify optional information for configuring the instance. - + method binds the event of the object in `dependency` to the method handler. This enables the change monitor to receive notification of changes in SQL Server databases. + + When you invoke the constructor, you must pass a object as a parameter. When you create a object, you must pass a parameter to the constructor. The constructor for class lets you specify optional information for configuring the instance. + ]]> @@ -106,11 +106,11 @@ Gets an identifier for a instance. An identifier for the change monitor. - class generates a GUID for this property. - + class generates a GUID for this property. + ]]> diff --git a/xml/System.Runtime.CompilerServices/AsyncStateMachineAttribute.xml b/xml/System.Runtime.CompilerServices/AsyncStateMachineAttribute.xml index 5b794b05284..0788717d5bb 100644 --- a/xml/System.Runtime.CompilerServices/AsyncStateMachineAttribute.xml +++ b/xml/System.Runtime.CompilerServices/AsyncStateMachineAttribute.xml @@ -74,7 +74,7 @@ ## Examples As the following example shows, you can determine whether a method is marked with [Async](/dotnet/visual-basic/language-reference/modifiers/async) or [async](/dotnet/csharp/language-reference/keywords/async) modifier. In the example, `IsAsyncMethod` performs the following steps: -- Obtains a object for the method name by using . +- Obtains a object for the method name by using . - Obtains a object for the attribute by using [GetType Operator](/dotnet/visual-basic/language-reference/operators/gettype-operator) or [typeof](/dotnet/csharp/language-reference/keywords/typeof). diff --git a/xml/System.Runtime.CompilerServices/CallConvCdecl.xml b/xml/System.Runtime.CompilerServices/CallConvCdecl.xml index 93c71bb3944..3154c78e1ae 100644 --- a/xml/System.Runtime.CompilerServices/CallConvCdecl.xml +++ b/xml/System.Runtime.CompilerServices/CallConvCdecl.xml @@ -77,7 +77,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/CallConvFastcall.xml b/xml/System.Runtime.CompilerServices/CallConvFastcall.xml index 397083a232e..7f966527e74 100644 --- a/xml/System.Runtime.CompilerServices/CallConvFastcall.xml +++ b/xml/System.Runtime.CompilerServices/CallConvFastcall.xml @@ -75,7 +75,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class like , , , and . +- Using methods in the class like , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/CallConvStdcall.xml b/xml/System.Runtime.CompilerServices/CallConvStdcall.xml index ef3f0d93291..c41f5443b41 100644 --- a/xml/System.Runtime.CompilerServices/CallConvStdcall.xml +++ b/xml/System.Runtime.CompilerServices/CallConvStdcall.xml @@ -75,7 +75,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/CallConvThiscall.xml b/xml/System.Runtime.CompilerServices/CallConvThiscall.xml index e0dd490b0fc..45f03c276b8 100644 --- a/xml/System.Runtime.CompilerServices/CallConvThiscall.xml +++ b/xml/System.Runtime.CompilerServices/CallConvThiscall.xml @@ -75,7 +75,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/ConditionalWeakTable`2+CreateValueCallback.xml b/xml/System.Runtime.CompilerServices/ConditionalWeakTable`2+CreateValueCallback.xml index 3e08c135ff4..3d53d04d2b7 100644 --- a/xml/System.Runtime.CompilerServices/ConditionalWeakTable`2+CreateValueCallback.xml +++ b/xml/System.Runtime.CompilerServices/ConditionalWeakTable`2+CreateValueCallback.xml @@ -71,21 +71,21 @@ Represents a method that creates a non-default value to add as part of a key/value pair to a object. An instance of a reference type that represents the value to attach to the specified key. - delegate encapsulates a callback method that is invoked by the method when the key passed to the method is not found in the object. The method passes the callback method the key that represents a managed object to which a property value is to be dynamically attached. The method is responsible for returning the property value to its caller, which, in turn, adds the key/value pair to the table. - - The method is used to return an instance of a reference type that can be attached to the specified key. It enables that instance to be initialized using non-default values. If the key is not found in the table, the method adds a key/value pair in which the value is initialized using default values. - - - -## Examples - The following example defines a `MainClass` class and a `MainInfo` class. `MainInfo` provides information about the `MainClass` instance. It also defines a static (`Shared` in Visual Basic) `CreateAttachedValue` method that can be assigned to the delegate and passed to the method. The example calls the method to add a `MainClass` object and its corresponding `MainInfo` object to a table. The example also illustrates calls to the and methods to add key/value pairs to the table, and a call to the method to retrieve the value that belongs to an existing key. - + delegate encapsulates a callback method that is invoked by the method when the key passed to the method is not found in the object. The method passes the callback method the key that represents a managed object to which a property value is to be dynamically attached. The method is responsible for returning the property value to its caller, which, in turn, adds the key/value pair to the table. + + The method is used to return an instance of a reference type that can be attached to the specified key. It enables that instance to be initialized using non-default values. If the key is not found in the table, the method adds a key/value pair in which the value is initialized using default values. + + + +## Examples + The following example defines a `MainClass` class and a `MainInfo` class. `MainInfo` provides information about the `MainClass` instance. It also defines a static (`Shared` in Visual Basic) `CreateAttachedValue` method that can be assigned to the delegate and passed to the method. The example calls the method to add a `MainClass` object and its corresponding `MainInfo` object to a table. The example also illustrates calls to the and methods to add key/value pairs to the table, and a call to the method to retrieve the value that belongs to an existing key. + :::code language="csharp" source="~/snippets/csharp/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue+CreateValueCallback/Overview/getvalue1.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue+CreateValueCallback/Overview/getvalue1.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue+CreateValueCallback/Overview/getvalue1.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Runtime.CompilerServices/ConditionalWeakTable`2.xml b/xml/System.Runtime.CompilerServices/ConditionalWeakTable`2.xml index 389c82ce934..c6d4e30ecfa 100644 --- a/xml/System.Runtime.CompilerServices/ConditionalWeakTable`2.xml +++ b/xml/System.Runtime.CompilerServices/ConditionalWeakTable`2.xml @@ -110,27 +110,27 @@ class enables language compilers to attach arbitrary properties to managed objects at run time. A object is a dictionary that binds a managed object, which is represented by a key, to its attached property, which is represented by a value. The object's keys are the individual instances of the `TKey` class to which the property is attached, and its values are the property values that are assigned to the corresponding objects. + The class enables language compilers to attach arbitrary properties to managed objects at run time. A object is a dictionary that binds a managed object, which is represented by a key, to its attached property, which is represented by a value. The object's keys are the individual instances of the `TKey` class to which the property is attached, and its values are the property values that are assigned to the corresponding objects. - Keys must be unique; in other words, the class supports one attached value per managed object. Two keys are equal if passing them to the method returns `true`. + Keys must be unique; in other words, the class supports one attached value per managed object. Two keys are equal if passing them to the method returns `true`. > [!NOTE] -> You cannot control equality comparisons by overriding to explicitly set the hash code for a key. The class does not use the method to compute hash codes, and therefore does not invoke overrides. +> You cannot control equality comparisons by overriding to explicitly set the hash code for a key. The class does not use the method to compute hash codes, and therefore does not invoke overrides. - Although the class holds a collection of key/value pairs, it is best thought of as a table rather than a dictionary object. The class differs from a dictionary in several ways: + Although the class holds a collection of key/value pairs, it is best thought of as a table rather than a dictionary object. The class differs from a dictionary in several ways: - It does not persist keys. That is, a key is not kept alive only because it is a member of the collection. - It does not include all the methods (such as `GetEnumerator` or `Contains`) that a dictionary typically has. -- It does not implement the interface. +- It does not implement the interface. - The class differs from other collection objects in its management of the object lifetime of keys stored in the collection. Ordinarily, when an object is stored in a collection, its lifetime lasts until it is removed (and there are no additional references to the object) or until the collection object itself is destroyed. However, in the class, adding a key/value pair to the table does not ensure that the key will persist, even if it can be reached directly from a value stored in the table (for example, if the table contains one key, A, with a value V1, and a second key, B, with a value P2 that contains a reference to A). Instead, automatically removes the key/value entry as soon as no other references to a key exist outside the table. The example provides an illustration. + The class differs from other collection objects in its management of the object lifetime of keys stored in the collection. Ordinarily, when an object is stored in a collection, its lifetime lasts until it is removed (and there are no additional references to the object) or until the collection object itself is destroyed. However, in the class, adding a key/value pair to the table does not ensure that the key will persist, even if it can be reached directly from a value stored in the table (for example, if the table contains one key, A, with a value V1, and a second key, B, with a value P2 that contains a reference to A). Instead, automatically removes the key/value entry as soon as no other references to a key exist outside the table. The example provides an illustration. ## Examples - The following example illustrates that a key stored in the table does not persist after references to it outside the table are destroyed. The example defines two classes: `ManagedClass`, which represents the key in the table, and `ClassData`, which represents the key's value. The example instantiates three objects of each type. It also instantiates a object that represents the second `ManagedClass`, and then destroys the second `ManagedClass` instance. The attempt to retrieve the second `ManagedClass` object from the property indicates that no references to the object remain. + The following example illustrates that a key stored in the table does not persist after references to it outside the table are destroyed. The example defines two classes: `ManagedClass`, which represents the key in the table, and `ClassData`, which represents the key's value. The example instantiates three objects of each type. It also instantiates a object that represents the second `ManagedClass`, and then destroys the second `ManagedClass` instance. The attempt to retrieve the second `ManagedClass` object from the property indicates that no references to the object remain. :::code language="csharp" source="~/snippets/csharp/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue/Overview/example1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue/Overview/example1.vb" id="Snippet1"::: @@ -188,9 +188,9 @@ constructor instantiates an empty table; that is, the table contains no key/value pairs. You can add key/value pairs by calling the , , or method. + The constructor instantiates an empty table; that is, the table contains no key/value pairs. You can add key/value pairs by calling the , , or method. - Every key in a object must be unique. Keys are not unique if they refer to the same object (that is, if passing them as arguments to the method returns `true`). + Every key in a object must be unique. Keys are not unique if they refer to the same object (that is, if passing them as arguments to the method returns `true`). ]]> @@ -253,14 +253,14 @@ object must be unique. Keys are not unique if they refer to the same object (that is, if passing them as arguments to the method returns `true`). + Every key in a object must be unique. Keys are not unique if they refer to the same object (that is, if passing them as arguments to the method returns `true`). If the key is garbage-collected during the addition operation, the existing key/value pair is removed and the new key/value pair is added without an exception being thrown. ## Examples - The following example defines a `MainClass` class and a `MainInfo` class, which provides information about the `MainClass` instance. The example then calls the method to add a `MainClass` object and its attached `MainInfo` object to a table. The example also illustrates calls to the and methods to add key/value pairs to the table, and to the method to retrieve the value of an existing key. + The following example defines a `MainClass` class and a `MainInfo` class, which provides information about the `MainClass` instance. The example then calls the method to add a `MainClass` object and its attached `MainInfo` object to a table. The example also illustrates calls to the and methods to add key/value pairs to the table, and to the method to retrieve the value of an existing key. :::code language="csharp" source="~/snippets/csharp/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue+CreateValueCallback/Overview/getvalue1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue+CreateValueCallback/Overview/getvalue1.vb" id="Snippet1"::: @@ -403,7 +403,7 @@ when the current object is ready to be finalized. + The garbage collector calls when the current object is ready to be finalized. ]]> @@ -611,14 +611,14 @@ ## Remarks If `key` does not exist in the table, the method adds it, along with the object that is instantiated by calling the parameterless constructor of the class defined by the `TValue` generic type parameter. If the `TValue` class has no parameterless constructor, a is thrown. - This is the recommended method of retrieving an existing value or adding a new value to the table if the class of the table's value defines a parameterless constructor. If it does not define a parameterless constructor, you can instead call the method, which relies on a callback-provided method to instantiate the object representing the table's value + This is the recommended method of retrieving an existing value or adding a new value to the table if the class of the table's value defines a parameterless constructor. If it does not define a parameterless constructor, you can instead call the method, which relies on a callback-provided method to instantiate the object representing the table's value - To retrieve the value of an existing key without adding the key/value pair if the key is not found in the table, call the method. + To retrieve the value of an existing key without adding the key/value pair if the key is not found in the table, call the method. ## Examples - The following example defines a `MainClass` class and a `MainInfo` class, which provides information about the `MainClass` instance. The example calls the method to add a `MainClass` object and its attached `MainInfo` object to a table. The example also illustrates calls to the and methods to add key/value pairs to the table, and to the method to retrieve the value of an existing key. + The following example defines a `MainClass` class and a `MainInfo` class, which provides information about the `MainClass` instance. The example calls the method to add a `MainClass` object and its attached `MainInfo` object to a table. The example also illustrates calls to the and methods to add key/value pairs to the table, and to the method to retrieve the value of an existing key. :::code language="csharp" source="~/snippets/csharp/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue+CreateValueCallback/Overview/getvalue1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue+CreateValueCallback/Overview/getvalue1.vb" id="Snippet1"::: @@ -696,16 +696,16 @@ Note: In the .NET for invokes the method that is defined by the `createValueCallback` parameter and passes it the key. A new value is bound to the key in the table and returned as a result. + If `key` does not exist in the table, invokes the method that is defined by the `createValueCallback` parameter and passes it the key. A new value is bound to the key in the table and returned as a result. - Use this method only when the class that represents the table's value does not define a parameterless constructor. If it does define a parameterless constructor, use the method instead. To retrieve the value of an existing key without adding the key/value pair if the key is not found in the table, call the method. + Use this method only when the class that represents the table's value does not define a parameterless constructor. If it does define a parameterless constructor, use the method instead. To retrieve the value of an existing key without adding the key/value pair if the key is not found in the table, call the method. If multiple threads try to create the same key, `createValueCallback` may be invoked multiple times with the same key. Only one of these calls will succeed, and its returned value will be added to the table. Which thread succeeds in creating the value is indeterminate. This rule permits the table to invoke `createValueCallback` outside the internal table lock to prevent deadlocks. ## Examples - The following example defines a `MainClass` class and a `MainInfo` class, which provides information about the `MainClass` instance. It also defines a static (`Shared` in Visual Basic) `CreateAttachedValue` method that can be assigned to the delegate and passed to the method. The example calls the method to add a `MainClass` object and its attached `MainInfo` object to a table. The example also illustrates calls to the and methods to add key/value pairs to the table, and to the method to retrieve the value of an existing key. + The following example defines a `MainClass` class and a `MainInfo` class, which provides information about the `MainClass` instance. It also defines a static (`Shared` in Visual Basic) `CreateAttachedValue` method that can be assigned to the delegate and passed to the method. The example calls the method to add a `MainClass` object and its attached `MainInfo` object to a table. The example also illustrates calls to the and methods to add key/value pairs to the table, and to the method to retrieve the value of an existing key. :::code language="csharp" source="~/snippets/csharp/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue+CreateValueCallback/Overview/getvalue1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue+CreateValueCallback/Overview/getvalue1.vb" id="Snippet1"::: @@ -930,7 +930,7 @@ retrieved. Additionally, it may not return all entries that were present when th ## Remarks -This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. +This member is an explicit interface member implementation. It can be used only when the instance is cast to an interface. The returned enumerator does not extend the lifetime of any object pairs in the table, other than the current one. It does not return entries that have already been collected or that were added after the enumerator was retrieved. Additionally, it may not return all entries that were present when the enumerator was retrieved, for example, entries that were collected or removed after the enumerator was retrieved but before they were enumerated. @@ -1053,7 +1053,7 @@ retrieved. Additionally, it may not return all entries that were present when th ## Examples - The following example defines a `MainClass` class and a `MainInfo` class, which provides information about the `MainClass` instance. The example calls the , , and methods to add key/value pairs to a table. In each case, the example calls the method to confirm that the key/value pair has been added to the table. + The following example defines a `MainClass` class and a `MainInfo` class, which provides information about the `MainClass` instance. The example calls the , , and methods to add key/value pairs to a table. In each case, the example calls the method to confirm that the key/value pair has been added to the table. :::code language="csharp" source="~/snippets/csharp/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue+CreateValueCallback/Overview/getvalue1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/ConditionalWeakTableTKey,TValue+CreateValueCallback/Overview/getvalue1.vb" id="Snippet1"::: diff --git a/xml/System.Runtime.CompilerServices/ContractHelper.xml b/xml/System.Runtime.CompilerServices/ContractHelper.xml index dd75a39b25d..85a9776949d 100644 --- a/xml/System.Runtime.CompilerServices/ContractHelper.xml +++ b/xml/System.Runtime.CompilerServices/ContractHelper.xml @@ -112,11 +112,11 @@ Used by the binary rewriter to activate the default failure behavior. A null reference ( in Visual Basic) if the event was handled and should not trigger a failure; otherwise, returns the localized failure message. - method does not perform the failure behavior (an assert or throw) itself. If the failure is handled by the listeners, the method returns `null`. If the failure is not handled by the listeners, a localized failure message is returned. - + method does not perform the failure behavior (an assert or throw) itself. If the failure is handled by the listeners, the method returns `null`. If the failure is not handled by the listeners, a localized failure message is returned. + ]]> @@ -183,11 +183,11 @@ The inner exception that caused the current exception. Triggers the default failure behavior. - , which causes the **Assert** dialog box to be displayed. You can change that behavior to throw an exception instead of displaying the dialog box. - + , which causes the **Assert** dialog box to be displayed. You can change that behavior to throw an exception instead of displaying the dialog box. + ]]> diff --git a/xml/System.Runtime.CompilerServices/DisablePrivateReflectionAttribute.xml b/xml/System.Runtime.CompilerServices/DisablePrivateReflectionAttribute.xml index c9a30e74207..38317ee672b 100644 --- a/xml/System.Runtime.CompilerServices/DisablePrivateReflectionAttribute.xml +++ b/xml/System.Runtime.CompilerServices/DisablePrivateReflectionAttribute.xml @@ -56,15 +56,15 @@ Indicates that any private members contained in an assembly's types are not available to reflection. - [!NOTE] > The .NET Framework, .NET Core, and .NET runtimes do not consistently enforce this attribute. Developers should not rely on this attribute to restrict access to an assembly's non-public members. - Ordinarily, reflection methods, such a or , can be used to get information about private members at runtime. When applies to an assembly, the attribute makes information about private members in that assembly's types unavailable to runtime reflection. - + Ordinarily, reflection methods, such a or , can be used to get information about private members at runtime. When applies to an assembly, the attribute makes information about private members in that assembly's types unavailable to runtime reflection. + ]]> diff --git a/xml/System.Runtime.CompilerServices/InlineArrayAttribute.xml b/xml/System.Runtime.CompilerServices/InlineArrayAttribute.xml index 34b9b8fe1e4..067ec97c8a7 100644 --- a/xml/System.Runtime.CompilerServices/InlineArrayAttribute.xml +++ b/xml/System.Runtime.CompilerServices/InlineArrayAttribute.xml @@ -36,7 +36,7 @@ This attribute can be used to annotate a `struct` type with a single field. The runtime replicates that field in the actual type layout as many times as is specified. > [!IMPORTANT] -> In .NET 9 and later versions, the default implementations of `Equals()` and `GetHashCode()` for types marked with this attribute throw . You must override both and if they will be used. +> In .NET 9 and later versions, the default implementations of `Equals()` and `GetHashCode()` for types marked with this attribute throw . You must override both and if they will be used. ]]> diff --git a/xml/System.Runtime.CompilerServices/InternalsVisibleToAttribute.xml b/xml/System.Runtime.CompilerServices/InternalsVisibleToAttribute.xml index a732a507a6a..5b9f5e016a1 100644 --- a/xml/System.Runtime.CompilerServices/InternalsVisibleToAttribute.xml +++ b/xml/System.Runtime.CompilerServices/InternalsVisibleToAttribute.xml @@ -135,7 +135,7 @@ The following example provides the source code for the `Friend2` assembly. Note constructor defines a friend assembly, which is an assembly that has access to the internal and private protected types and members of the current assembly. + The constructor defines a friend assembly, which is an assembly that has access to the internal and private protected types and members of the current assembly. Both the current assembly and the friend assembly must be unsigned, or both must be signed with a strong name. (For more information about strong-named assemblies, see [Create and use strong-named assemblies](/dotnet/standard/assembly/create-use-strong-named).) If both are unsigned, the `assemblyName` argument consists of the name of the friend assembly, specified without a directory path or file extension. If both are signed, `assemblyName` consists of the name of the friend assembly without its directory path or file name extension, along with its full public key (but not its public key token). The other components of a strong name, such as those that provide culture, version, or processor architecture information, cannot be specified in the `assemblyName` argument. diff --git a/xml/System.Runtime.CompilerServices/IsBoxed.xml b/xml/System.Runtime.CompilerServices/IsBoxed.xml index a7305580ee3..fe85e41a92a 100644 --- a/xml/System.Runtime.CompilerServices/IsBoxed.xml +++ b/xml/System.Runtime.CompilerServices/IsBoxed.xml @@ -55,7 +55,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/IsByValue.xml b/xml/System.Runtime.CompilerServices/IsByValue.xml index cb495d26aa2..b5da56090e7 100644 --- a/xml/System.Runtime.CompilerServices/IsByValue.xml +++ b/xml/System.Runtime.CompilerServices/IsByValue.xml @@ -55,7 +55,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/IsConst.xml b/xml/System.Runtime.CompilerServices/IsConst.xml index 001b7180d3a..0297a6f3bc7 100644 --- a/xml/System.Runtime.CompilerServices/IsConst.xml +++ b/xml/System.Runtime.CompilerServices/IsConst.xml @@ -57,7 +57,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/IsCopyConstructed.xml b/xml/System.Runtime.CompilerServices/IsCopyConstructed.xml index b82d5b48556..0505bddfcb9 100644 --- a/xml/System.Runtime.CompilerServices/IsCopyConstructed.xml +++ b/xml/System.Runtime.CompilerServices/IsCopyConstructed.xml @@ -63,7 +63,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/IsExplicitlyDereferenced.xml b/xml/System.Runtime.CompilerServices/IsExplicitlyDereferenced.xml index 2962276c293..07b6e39e873 100644 --- a/xml/System.Runtime.CompilerServices/IsExplicitlyDereferenced.xml +++ b/xml/System.Runtime.CompilerServices/IsExplicitlyDereferenced.xml @@ -55,7 +55,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/IsImplicitlyDereferenced.xml b/xml/System.Runtime.CompilerServices/IsImplicitlyDereferenced.xml index 836a1f8c297..ec5c230713c 100644 --- a/xml/System.Runtime.CompilerServices/IsImplicitlyDereferenced.xml +++ b/xml/System.Runtime.CompilerServices/IsImplicitlyDereferenced.xml @@ -55,7 +55,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/IsJitIntrinsic.xml b/xml/System.Runtime.CompilerServices/IsJitIntrinsic.xml index 5d0f6bc1453..184918b0b0d 100644 --- a/xml/System.Runtime.CompilerServices/IsJitIntrinsic.xml +++ b/xml/System.Runtime.CompilerServices/IsJitIntrinsic.xml @@ -53,7 +53,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/IsLong.xml b/xml/System.Runtime.CompilerServices/IsLong.xml index 2bfba86ff6f..a3d978463e7 100644 --- a/xml/System.Runtime.CompilerServices/IsLong.xml +++ b/xml/System.Runtime.CompilerServices/IsLong.xml @@ -55,7 +55,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/IsPinned.xml b/xml/System.Runtime.CompilerServices/IsPinned.xml index 8b9654524fd..8333332c492 100644 --- a/xml/System.Runtime.CompilerServices/IsPinned.xml +++ b/xml/System.Runtime.CompilerServices/IsPinned.xml @@ -52,7 +52,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/IsSignUnspecifiedByte.xml b/xml/System.Runtime.CompilerServices/IsSignUnspecifiedByte.xml index 54257e9a41b..5b1e510ab79 100644 --- a/xml/System.Runtime.CompilerServices/IsSignUnspecifiedByte.xml +++ b/xml/System.Runtime.CompilerServices/IsSignUnspecifiedByte.xml @@ -55,7 +55,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/IsUdtReturn.xml b/xml/System.Runtime.CompilerServices/IsUdtReturn.xml index e201b9bb9fc..c05d9480093 100644 --- a/xml/System.Runtime.CompilerServices/IsUdtReturn.xml +++ b/xml/System.Runtime.CompilerServices/IsUdtReturn.xml @@ -55,7 +55,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/IsVolatile.xml b/xml/System.Runtime.CompilerServices/IsVolatile.xml index 50b35d5cadf..5d23aa437c7 100644 --- a/xml/System.Runtime.CompilerServices/IsVolatile.xml +++ b/xml/System.Runtime.CompilerServices/IsVolatile.xml @@ -72,7 +72,7 @@ You can emit custom modifiers into metadata using one of the following techniques: -- Using methods in the class such as , , , and . +- Using methods in the class such as , , , and . - Generating a Microsoft intermediate language (MSIL) instruction file that contains calls to `modopt` and `modreq`, and assembling the file with the [Ilasm.exe (IL Assembler)](/dotnet/framework/tools/ilasm-exe-il-assembler). diff --git a/xml/System.Runtime.CompilerServices/IteratorStateMachineAttribute.xml b/xml/System.Runtime.CompilerServices/IteratorStateMachineAttribute.xml index d64ca510cdb..595726c6d4f 100644 --- a/xml/System.Runtime.CompilerServices/IteratorStateMachineAttribute.xml +++ b/xml/System.Runtime.CompilerServices/IteratorStateMachineAttribute.xml @@ -77,7 +77,7 @@ ## Examples The following example shows how to determine whether a method is an iterator method. In the example, `IsIteratorMethod` performs the following steps: -- Obtains a object for the method name by using . +- Obtains a object for the method name by using . - Obtains a object for the attribute by using [GetType Operator](/dotnet/visual-basic/language-reference/operators/gettype-operator). diff --git a/xml/System.Runtime.CompilerServices/MethodImplAttribute.xml b/xml/System.Runtime.CompilerServices/MethodImplAttribute.xml index 0390ecf2f92..e9f30bd3254 100644 --- a/xml/System.Runtime.CompilerServices/MethodImplAttribute.xml +++ b/xml/System.Runtime.CompilerServices/MethodImplAttribute.xml @@ -71,7 +71,7 @@ ## Remarks You can apply this attribute to methods or constructors. - This attribute lets you customize the configuration of the method or constructor to which it applies by supplying a value to its class constructor. The members of the enumeration correspond to bit fields in the `CorMethodImpl` metadata table. This means that information on the attribute cannot be retrieved at run time by calling the method; instead, it is retrieved by calling either the `MethodInfo.GetMethodImplementationFlags` or the `ConstructorInfo.GetMethodImplementationFlags` method. + This attribute lets you customize the configuration of the method or constructor to which it applies by supplying a value to its class constructor. The members of the enumeration correspond to bit fields in the `CorMethodImpl` metadata table. This means that information on the attribute cannot be retrieved at run time by calling the method; instead, it is retrieved by calling either the `MethodInfo.GetMethodImplementationFlags` or the `ConstructorInfo.GetMethodImplementationFlags` method. @@ -81,7 +81,7 @@ :::code language="csharp" source="~/snippets/csharp/System.Runtime.CompilerServices/MethodImplAttribute/Overview/methodimplattribute1.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/MethodImplAttribute/Overview/methodimplattribute1.vb" id="Snippet1"::: - The following example then calls the `MethodInfo.GetMethodImplementationFlags` method to determine which flags are set for the `GetCalendarName` method. It also demonstrates that this information is not retrieved by the method. + The following example then calls the `MethodInfo.GetMethodImplementationFlags` method to determine which flags are set for the `GetCalendarName` method. It also demonstrates that this information is not retrieved by the method. :::code language="csharp" source="~/snippets/csharp/System.Runtime.CompilerServices/MethodImplAttribute/Overview/getmethodimplattribute1.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/MethodImplAttribute/Overview/getmethodimplattribute1.vb" id="Snippet2"::: diff --git a/xml/System.Runtime.CompilerServices/RuntimeHelpers+CleanupCode.xml b/xml/System.Runtime.CompilerServices/RuntimeHelpers+CleanupCode.xml index 648a4173ed2..497ca8bc3a1 100644 --- a/xml/System.Runtime.CompilerServices/RuntimeHelpers+CleanupCode.xml +++ b/xml/System.Runtime.CompilerServices/RuntimeHelpers+CleanupCode.xml @@ -61,11 +61,11 @@ to express that an exception was thrown; otherwise, . Represents a method to run when an exception occurs. - delegate with the method. - + delegate with the method. + ]]> diff --git a/xml/System.Runtime.CompilerServices/RuntimeHelpers+TryCode.xml b/xml/System.Runtime.CompilerServices/RuntimeHelpers+TryCode.xml index 7c32758d818..2247d71e8a8 100644 --- a/xml/System.Runtime.CompilerServices/RuntimeHelpers+TryCode.xml +++ b/xml/System.Runtime.CompilerServices/RuntimeHelpers+TryCode.xml @@ -58,11 +58,11 @@ Data to pass to the delegate. Represents a delegate to code that should be run in a try block. - delegate with the method. - + delegate with the method. + ]]> diff --git a/xml/System.Runtime.CompilerServices/RuntimeHelpers.xml b/xml/System.Runtime.CompilerServices/RuntimeHelpers.xml index 7b36f25293b..019c87be9b5 100644 --- a/xml/System.Runtime.CompilerServices/RuntimeHelpers.xml +++ b/xml/System.Runtime.CompilerServices/RuntimeHelpers.xml @@ -68,7 +68,7 @@ method. To reliably set a handle to a specified pre-existing handle, you must ensure that the allocation of the native handle and the subsequent recording of that handle within a object is atomic. Any failure between these operations (such as a thread abort or out-of-memory exception) will result in the native handle being leaked. You can use the method to make sure that the handle is not leaked. + The following example shows how to reliably set handles by using the method. To reliably set a handle to a specified pre-existing handle, you must ensure that the allocation of the native handle and the subsequent recording of that handle within a object is atomic. Any failure between these operations (such as a thread abort or out-of-memory exception) will result in the native handle being leaked. You can use the method to make sure that the handle is not leaked. :::code language="csharp" source="~/snippets/csharp/System.Runtime.CompilerServices/RuntimeHelpers/Overview/sample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/RuntimeHelpers/Overview/sample.vb" id="Snippet1"::: @@ -301,14 +301,14 @@ This method is intended for compiler use rather than use directly in code. `T` m provides information about an artificially limited stack that preserves enough space for an exception to be raised and recovery action to be taken. The artificial stack limit is chosen by the common language runtime to ensure that enough space remains to throw an exception safely. + provides information about an artificially limited stack that preserves enough space for an exception to be raised and recovery action to be taken. The artificial stack limit is chosen by the common language runtime to ensure that enough space remains to throw an exception safely. This method is useful in situations where stack overflow might occur as a result of unbounded recursion. It is intended for use in compiler services scenarios, although it can also be used safely in other development scenarios. If the stack space is sufficient, the exception is not thrown, and most .NET types and members can still be called. > [!NOTE] -> This method is not part of the constrained execution region (CER) support, and should not be confused with the method. +> This method is not part of the constrained execution region (CER) support, and should not be confused with the method. ]]> @@ -377,7 +377,7 @@ This method is intended for compiler use rather than use directly in code. `T` m ## Examples - The following example demonstrates how to compare two objects by using the method. + The following example demonstrates how to compare two objects by using the method. :::code language="csharp" source="~/snippets/csharp/System.Runtime.CompilerServices/RuntimeHelpers/Equals/example.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/RuntimeHelpers/Equals/example.vb" id="Snippet1"::: @@ -586,14 +586,14 @@ This method is intended for compiler use rather than use directly in code. `T` m - If the value being assigned is an immutable value class, the method returns the object itself, instead of a copy of the class. - Compilers of dynamically typed languages can use this method to make sure that boxed value types work identically to unboxed value types. That is, boxed value types get cloned when you pass them around, and they are always passed by value. The compiler can call to assign a value type to an object or to pass a value type as a parameter of a type object. + Compilers of dynamically typed languages can use this method to make sure that boxed value types work identically to unboxed value types. That is, boxed value types get cloned when you pass them around, and they are always passed by value. The compiler can call to assign a value type to an object or to pass a value type as a parameter of a type object. This method is used by compilers. ## Examples - The following example demonstrates how to box a value class by using the method. + The following example demonstrates how to box a value class by using the method. :::code language="csharp" source="~/snippets/csharp/System.Runtime.CompilerServices/RuntimeHelpers/GetObjectValue/example.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/RuntimeHelpers/GetObjectValue/example.vb" id="Snippet1"::: @@ -942,16 +942,16 @@ This method is intended for compiler use rather than use directly in code. `T` m ## Remarks Compilers use this method to mark `catch`, `finally`, and `fault` blocks as constrained execution regions (CERs). Code that is marked as a constrained region must only call other code with strong reliability contracts. It should not allocate or make virtual calls to unprepared or unreliable methods unless it is prepared to handle failures. - Note that no intermediate language opcodes, except `NOP`, are allowed between a call to the method and the `try` block. For more information about CERs, see the classes in the namespace. + Note that no intermediate language opcodes, except `NOP`, are allowed between a call to the method and the `try` block. For more information about CERs, see the classes in the namespace. - CERs that are marked using the method do not work perfectly when a is generated from the `try` block. For more information, see the method. + CERs that are marked using the method do not work perfectly when a is generated from the `try` block. For more information, see the method. - The method calls the method. + The method calls the method. ## Examples - The following example shows how to reliably set handles by using the method. To reliably set a handle to a specified pre-existing handle, you must ensure that the allocation of the native handle and the subsequent recording of that handle within a object is atomic. Any failure between these operations (such as a thread abort or out-of-memory exception) will result in the native handle being leaked. You can use the method to make sure that the handle is not leaked. + The following example shows how to reliably set handles by using the method. To reliably set a handle to a specified pre-existing handle, you must ensure that the allocation of the native handle and the subsequent recording of that handle within a object is atomic. Any failure between these operations (such as a thread abort or out-of-memory exception) will result in the native handle being leaked. You can use the method to make sure that the handle is not leaked. :::code language="csharp" source="~/snippets/csharp/System.Runtime.CompilerServices/RuntimeHelpers/Overview/sample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.CompilerServices/RuntimeHelpers/Overview/sample.vb" id="Snippet1"::: @@ -1020,7 +1020,7 @@ This method is intended for compiler use rather than use directly in code. `T` m method. + Compilers should not call this method directly. Instead, define a CER by calling the method. ]]> @@ -1086,7 +1086,7 @@ This method is intended for compiler use rather than use directly in code. `T` m - Attribute the method by using the attribute. -- Call the method to dynamically prepare the delegate. +- Call the method to dynamically prepare the delegate. For more information, see the article [Keep Your Code Running with the Reliability Features of the .NET Framework](https://go.microsoft.com/fwlink/?LinkId=145491) in the MSDN Magazine. @@ -1212,7 +1212,7 @@ This method is intended for compiler use rather than use directly in code. `T` m method to handle virtual calls that are made inside a constrained execution region (CER). At JIT compilation time, the common language runtime does not usually have enough information about the target of a virtual call. Therefore, the runtime does not initially prepare that segment of the call graph. If the code that is using the CER has enough knowledge to determine the target at any point in time before the CER is actually entered, it can call to perform the same runtime preparation normally done for a CER rooted at the method specified as an argument. + Compilers use the method to handle virtual calls that are made inside a constrained execution region (CER). At JIT compilation time, the common language runtime does not usually have enough information about the target of a virtual call. Therefore, the runtime does not initially prepare that segment of the call graph. If the code that is using the CER has enough knowledge to determine the target at any point in time before the CER is actually entered, it can call to perform the same runtime preparation normally done for a CER rooted at the method specified as an argument. ]]> @@ -1272,9 +1272,9 @@ This method is intended for compiler use rather than use directly in code. `T` m method. The common language runtime cannot prepare constrained execution regions (CERs) rooted in a method that has generic type parameters (either a type parameter on the class containing the method or one on the method itself) when those type parameters are instantiated as reference types. + You can provide generics support for compilers by using the method. The common language runtime cannot prepare constrained execution regions (CERs) rooted in a method that has generic type parameters (either a type parameter on the class containing the method or one on the method itself) when those type parameters are instantiated as reference types. - You can use this overload to pass a specific instantiation (such as an array of types), specifying class type parameters first (if any), followed by method type parameters (if any). The runtime prepares that instantiation of the method. (This is necessary only if the instantiations you use contain at least one reference type parameter.) Thus, you can use a CER-style `try` clause in a generic method (or a nongeneric method on a generic class) and it will work reliably with instantiations of or other value types. To instantiate reference types such as , you must use an explicit method on the CER root method first. + You can use this overload to pass a specific instantiation (such as an array of types), specifying class type parameters first (if any), followed by method type parameters (if any). The runtime prepares that instantiation of the method. (This is necessary only if the instantiations you use contain at least one reference type parameter.) Thus, you can use a CER-style `try` clause in a generic method (or a nongeneric method on a generic class) and it will work reliably with instantiations of or other value types. To instantiate reference types such as , you must use an explicit method on the CER root method first. ]]> @@ -1340,7 +1340,7 @@ This method is intended for compiler use rather than use directly in code. `T` m This method is also used by compilers. - Instead of using the method, you should use a standard CER. That is, if you are planning to use a moderate amount of stack space, call the method immediately before your `try`/`finally` or `try`/`catch` block. If you are calling a recursive method or plan to use a lot of stack space, you must use the method. + Instead of using the method, you should use a standard CER. That is, if you are planning to use a moderate amount of stack space, call the method immediately before your `try`/`finally` or `try`/`catch` block. If you are calling a recursive method or plan to use a lot of stack space, you must use the method. ]]> diff --git a/xml/System.Runtime.CompilerServices/RuntimeWrappedException.xml b/xml/System.Runtime.CompilerServices/RuntimeWrappedException.xml index 53939d306ae..b0900b94e19 100644 --- a/xml/System.Runtime.CompilerServices/RuntimeWrappedException.xml +++ b/xml/System.Runtime.CompilerServices/RuntimeWrappedException.xml @@ -168,7 +168,7 @@ method sets a object with all the exception object data targeted for serialization. During deserialization, the exception is reconstituted from the `SerializationInfo` transmitted over the stream. + The method sets a object with all the exception object data targeted for serialization. During deserialization, the exception is reconstituted from the `SerializationInfo` transmitted over the stream. ]]> diff --git a/xml/System.Runtime.CompilerServices/TupleElementNamesAttribute.xml b/xml/System.Runtime.CompilerServices/TupleElementNamesAttribute.xml index 2cb6e43e81d..bd0e5c04b60 100644 --- a/xml/System.Runtime.CompilerServices/TupleElementNamesAttribute.xml +++ b/xml/System.Runtime.CompilerServices/TupleElementNamesAttribute.xml @@ -154,11 +154,11 @@ A string array that specifies, in a pre-order depth-first traversal of a type's construction, which value tuple occurrences are meant to carry element names. Initializes a new instance of the class. - `,` `)` might be intended to treat the first type argument as a tuple with element names and the second as a tuple without element names. In this case, the appropriate attribute specification should use a `transformNames` value of `{ "name1", "name2", null, null, null}`. - + `,` `)` might be intended to treat the first type argument as a tuple with element names and the second as a tuple without element names. In this case, the appropriate attribute specification should use a `transformNames` value of `{ "name1", "name2", null, null, null}`. + ]]> diff --git a/xml/System.Runtime.CompilerServices/Unsafe.xml b/xml/System.Runtime.CompilerServices/Unsafe.xml index 30dc9707265..777af360b92 100644 --- a/xml/System.Runtime.CompilerServices/Unsafe.xml +++ b/xml/System.Runtime.CompilerServices/Unsafe.xml @@ -62,7 +62,7 @@ This type is typically used by low-level library authors who want to write high- Consider the following example, which reverses the elements within a `Span`. > [!NOTE] -> These examples exist simply for demonstration purposes. In real-world applications, developers should instead use helper functions like , which are better optimized than even these examples. +> These examples exist simply for demonstration purposes. In real-world applications, developers should instead use helper functions like , which are better optimized than even these examples. ```csharp // A safe, verifiable way to reverse a Span. @@ -1033,7 +1033,7 @@ The caller is responsible for ensuring that the resulting managed pointer is pro This API is conceptually similar to C++'s `const_cast<>`. It is the caller's responsibility to ensure that no data is written to the referenced location. The runtime contains internal logic predicated on the assumption that readonly references truly are immutable, and callers who violate this invariant may trigger undefined behavior within the runtime. -`AsRef` is typically used for passing a readonly reference into methods like , which accept mutable managed pointers as arguments. Consider the following example. +`AsRef` is typically used for passing a readonly reference into methods like , which accept mutable managed pointers as arguments. Consider the following example. ```csharp int ComputeSumOfElements(ref int refToFirstElement, nint numElements) @@ -1458,7 +1458,7 @@ static void Copy(ref T destination, void* source) This API corresponds to the `cpblk` opcode. Both the `destination` and `source` pointers are assumed to be pointer-aligned. See [ECMA-335](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), Sec. III.3.30 ("cpblk - copy data from memory to memory") for more information. > [!CAUTION] -> This API is not intended for copying arbitrary-length runs of memory. Consider instead using or for this scenario. +> This API is not intended for copying arbitrary-length runs of memory. Consider instead using or for this scenario. ]]> @@ -1518,7 +1518,7 @@ This API corresponds to the `cpblk` opcode. Both the `destination` and `source` This API corresponds to the `cpblk` opcode. Both the `destination` and `source` pointers are assumed to be pointer-aligned. See [ECMA-335](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), Sec. III.3.30 ("cpblk - copy data from memory to memory") for more information. > [!CAUTION] -> This API is not intended for copying arbitrary-length runs of memory. Consider instead using or for this scenario. +> This API is not intended for copying arbitrary-length runs of memory. Consider instead using or for this scenario. ]]> @@ -1586,7 +1586,7 @@ This API corresponds to the `cpblk` opcode. Both the `destination` and `source` This API corresponds to the `unaligned.1 cpblk` opcode sequence. No alignment assumptions are made about the `destination` or `source` pointers. See [ECMA-335](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), Sec. III.3.30 ("cpblk - copy data from memory to memory") and Sec. III.2.5 ("unaligned. (prefix) - pointer instruction might be unaligned") for more information. > [!CAUTION] -> This API is not intended for copying arbitrary-length runs of memory. Consider instead using or for this scenario. +> This API is not intended for copying arbitrary-length runs of memory. Consider instead using or for this scenario. ]]> @@ -1644,7 +1644,7 @@ This API corresponds to the `unaligned.1 cpblk` opcode sequence. No alignment as This API corresponds to the `unaligned.1 cpblk` opcode sequence. No alignment assumptions are made about the `destination` or `source` pointers. See [ECMA-335](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), Sec. III.3.30 ("cpblk - copy data from memory to memory") and Sec. III.2.5 ("unaligned. (prefix) - pointer instruction might be unaligned") for more information. > [!CAUTION] -> This API is not intended for copying arbitrary-length runs of memory. Consider instead using or for this scenario. +> This API is not intended for copying arbitrary-length runs of memory. Consider instead using or for this scenario. ]]> @@ -1703,7 +1703,7 @@ This API corresponds to the `unaligned.1 cpblk` opcode sequence. No alignment as This API corresponds to the `initblk` opcode. The `startAddress` pointer is assumed to be pointer-aligned. See [ECMA-335](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), Sec. III.3.36 ("initblk - initialize a block of memory to a value") for more information. > [!CAUTION] -> This API is not intended for initializing arbitrary-length runs of memory. Consider instead using for this scenario. +> This API is not intended for initializing arbitrary-length runs of memory. Consider instead using for this scenario. ]]> @@ -1763,7 +1763,7 @@ This API corresponds to the `initblk` opcode. The `startAddress` pointer is assu This API corresponds to the `initblk` opcode. The `startAddress` pointer is assumed to be pointer-aligned. See [ECMA-335](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), Sec. III.3.36 ("initblk - initialize a block of memory to a value") for more information. > [!CAUTION] -> This API is not intended for initializing arbitrary-length runs of memory. Consider instead using for this scenario. +> This API is not intended for initializing arbitrary-length runs of memory. Consider instead using for this scenario. ]]> @@ -1822,7 +1822,7 @@ This API corresponds to the `initblk` opcode. The `startAddress` pointer is assu This API corresponds to the `unaligned.1 initblk` opcode sequence. No alignment assumption is made about the `startAddress` pointer. See [ECMA-335](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), Sec. III.3.36 ("initblk - initialize a block of memory to a value") and Sec. III.2.5 ("unaligned. (prefix) - pointer instruction might be unaligned") for more information. > [!CAUTION] -> This API is not intended for initializing arbitrary-length runs of memory. Consider instead using for this scenario. +> This API is not intended for initializing arbitrary-length runs of memory. Consider instead using for this scenario. ]]> @@ -1880,7 +1880,7 @@ This API corresponds to the `unaligned.1 initblk` opcode sequence. No alignment This API corresponds to the `unaligned.1 initblk` opcode sequence. No alignment assumption is made about the `startAddress` pointer. See [ECMA-335](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), Sec. III.3.36 ("initblk - initialize a block of memory to a value") and Sec. III.2.5 ("unaligned. (prefix) - pointer instruction might be unaligned") for more information. > [!CAUTION] -> This API is not intended for initializing arbitrary-length runs of memory. Consider instead using for this scenario. +> This API is not intended for initializing arbitrary-length runs of memory. Consider instead using for this scenario. ]]> @@ -2602,7 +2602,7 @@ The return value is guaranteed stable if `left` and `right` point to the same ma This API corresponds to the `sizeof` opcode. If `T` is a reference type, the return value is the size of the reference itself (equal to `sizeof(void*)`). See [ECMA-335](https://www.ecma-international.org/publications-and-standards/standards/ecma-335/), Sec. III.4.25 ("sizeof - load the size, in bytes, of a type") for more information. > [!CAUTION] -> This API returns the size of the _managed_ view of the type. For the size of the _unmanaged_ view of the type, such as needed for interop purposes, use . +> This API returns the size of the _managed_ view of the type. For the size of the _unmanaged_ view of the type, such as needed for interop purposes, use . ]]> diff --git a/xml/System.Runtime.ConstrainedExecution/Cer.xml b/xml/System.Runtime.ConstrainedExecution/Cer.xml index 0273fd8e74d..4220a22222b 100644 --- a/xml/System.Runtime.ConstrainedExecution/Cer.xml +++ b/xml/System.Runtime.ConstrainedExecution/Cer.xml @@ -55,31 +55,31 @@ Specifies a method's behavior when called within a constrained execution region. - enumeration specifies the behavior of a method, type, or assembly within a constrained execution region (CER). Use one of the three available values to indicate that the entity will succeed, has no knowledge of a CER, or might (deterministically) be able to report success or failure. - -A CER provides guarantees that the region of code will execute uninterrupted even if an asynchronous exception such as an aborted thread out-of-memory exception, or stack overflow is raised. - + +The enumeration specifies the behavior of a method, type, or assembly within a constrained execution region (CER). Use one of the three available values to indicate that the entity will succeed, has no knowledge of a CER, or might (deterministically) be able to report success or failure. + +A CER provides guarantees that the region of code will execute uninterrupted even if an asynchronous exception such as an aborted thread out-of-memory exception, or stack overflow is raised. + However, the `Cer.None` enumeration value indicates that the method, type, or assembly has no concept of a CER. It does not take advantage of CER guarantees. This implies the following: -- In the face of exceptional conditions the method might fail. - -- The method might or might not report that it failed (it is non-deterministic). - -- The method is not written with CERs in mind (which is the most likely scenario). - -If a method, type, or assembly is not explicitly marked to succeed, it is implicitly marked as `Cer.None`. +- In the face of exceptional conditions the method might fail. + +- The method might or might not report that it failed (it is non-deterministic). + +- The method is not written with CERs in mind (which is the most likely scenario). + +If a method, type, or assembly is not explicitly marked to succeed, it is implicitly marked as `Cer.None`. ## Examples -The following code example demonstrates the use of the enumeration when specifying a constrained execution region for a method. This code example is part of a larger example provided for the constructor. - +The following code example demonstrates the use of the enumeration when specifying a constrained execution region for a method. This code example is part of a larger example provided for the constructor. + :::code language="csharp" source="~/snippets/csharp/System.Runtime.ConstrainedExecution/Cer/Overview/program.cs" id="Snippet3"::: -:::code language="vb" source="~/snippets/visualbasic/System.Runtime.ConstrainedExecution/Cer/Overview/program.vb" id="Snippet3"::: - +:::code language="vb" source="~/snippets/visualbasic/System.Runtime.ConstrainedExecution/Cer/Overview/program.vb" id="Snippet3"::: + ]]> diff --git a/xml/System.Runtime.ConstrainedExecution/Consistency.xml b/xml/System.Runtime.ConstrainedExecution/Consistency.xml index 917f8b64895..76ec1e9e1a9 100644 --- a/xml/System.Runtime.ConstrainedExecution/Consistency.xml +++ b/xml/System.Runtime.ConstrainedExecution/Consistency.xml @@ -55,19 +55,19 @@ Specifies a reliability contract. - enumeration is used as a parameter to the attribute to specify the reliability guarantee on a given method. - - - -## Examples - The following code example demonstrates the use of the enumeration when specifying a constrained execution region for a method. This code example is part of a larger example provided for the constructor. - + enumeration is used as a parameter to the attribute to specify the reliability guarantee on a given method. + + + +## Examples + The following code example demonstrates the use of the enumeration when specifying a constrained execution region for a method. This code example is part of a larger example provided for the constructor. + :::code language="csharp" source="~/snippets/csharp/System.Runtime.ConstrainedExecution/Cer/Overview/program.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.ConstrainedExecution/Cer/Overview/program.vb" id="Snippet3"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.ConstrainedExecution/Cer/Overview/program.vb" id="Snippet3"::: + ]]> diff --git a/xml/System.Runtime.ConstrainedExecution/ReliabilityContractAttribute.xml b/xml/System.Runtime.ConstrainedExecution/ReliabilityContractAttribute.xml index fdcf2caba06..ff08f89f062 100644 --- a/xml/System.Runtime.ConstrainedExecution/ReliabilityContractAttribute.xml +++ b/xml/System.Runtime.ConstrainedExecution/ReliabilityContractAttribute.xml @@ -66,7 +66,7 @@ ## Examples The following code example demonstrates the use of the attribute to document the level of reliability of an assembly. - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.ConstrainedExecution/ReliabilityContractAttribute/ReliabilityContract.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.ConstrainedExecution/ReliabilityContractAttribute/Overview/FxCop.Reliability.ReliabilityContract.vb" id="Snippet1"::: @@ -122,7 +122,7 @@ constructor to create a constrained execution region and a `finally` block that is guaranteed to execute. + The following code example demonstrates the use of the constructor to create a constrained execution region and a `finally` block that is guaranteed to execute. :::code language="csharp" source="~/snippets/csharp/System.Runtime.ConstrainedExecution/Cer/Overview/program.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.ConstrainedExecution/Cer/Overview/program.vb" id="Snippet1"::: diff --git a/xml/System.Runtime.DurableInstancing/InstanceStore.xml b/xml/System.Runtime.DurableInstancing/InstanceStore.xml index 656dc459b70..c93e5c59315 100644 --- a/xml/System.Runtime.DurableInstancing/InstanceStore.xml +++ b/xml/System.Runtime.DurableInstancing/InstanceStore.xml @@ -16,16 +16,16 @@ Represents an instance store. - class. - - Persistence providers may call InstanceHandle.Free on handles passed to TryCommand, even after the command has finished executing. But persistence providers must not hold strong references to InstanceHandle or InstanceOwner objects, as this can prevent InstanceStore from being garbage collected. - + class. + + Persistence providers may call InstanceHandle.Free on handles passed to TryCommand, even after the command has finished executing. But persistence providers must not hold strong references to InstanceHandle or InstanceOwner objects, as this can prevent InstanceStore from being garbage collected. + > [!WARNING] -> Workflow definitions for persisted workflows cannot be changed. If a workflow definition is changed after it is persisted, the workflow runtime will crash when the workflow is reloaded. - +> Workflow definitions for persisted workflows cannot be changed. If a workflow definition is changed after it is persisted, the workflow runtime will crash when the workflow is reloaded. + ]]> @@ -78,11 +78,11 @@ Asynchronously executes persistence commands such as and . The state of the asynchronous operation. - method to execute a persistence command against an instance handle asynchronously. The host obtains the instance handle by invoking the method. The instance handle may be bound to entities that represent the context and subject of the command, such as an instance, instance owner, or instance lock. Only one command may be issued against an instance handle at a time. - + method to execute a persistence command against an instance handle asynchronously. The host obtains the instance handle by invoking the method. The instance handle may be bound to entities that represent the context and subject of the command, such as an instance, instance owner, or instance lock. Only one command may be issued against an instance handle at a time. + ]]> @@ -118,14 +118,14 @@ A persistence provider implements this method, which determines whether a particular persistence command can be executed. If the command can be executed, executes the command asynchronously. The state of the asynchronous operation. - [!WARNING] -> Even though this method is declared as `virtual` rather than `abstract`, there is no implementation. This method must be overridden in order to provide functionality. - +> Even though this method is declared as `virtual` rather than `abstract`, there is no implementation. This method must be overridden in order to provide functionality. + ]]> @@ -298,16 +298,16 @@ Gets or sets the default instance owner. The default instance owner. - [!WARNING] -> Even though this method is declared as `virtual` rather than `abstract`, there is no implementation. This method must be overridden in order to provide functionality. - +> Even though this method is declared as `virtual` rather than `abstract`, there is no implementation. This method must be overridden in order to provide functionality. + ]]> @@ -335,11 +335,11 @@ Ends the asynchronous operation. An InstanceView object representing the known state of the instance after the successful completion of the command. - @@ -367,13 +367,13 @@ Ends an asynchronous operation. A persistence provider implementation should return false if it doesn't support the command passed to the BeginTryCommand method. Otherwise it should return true or throw an exception. - [!WARNING] -> Even though this method is declared as `virtual` rather than `abstract`, there is no implementation. This method must be overridden in order to provide functionality. - +> Even though this method is declared as `virtual` rather than `abstract`, there is no implementation. This method must be overridden in order to provide functionality. + ]]> @@ -430,16 +430,16 @@ Executes a persistence command synchronously. Examples of persistence commands are: and . An InstanceView object representing the known state of the instance after the successful completion of the command. If Execute was called under a transaction, this state may include uncommitted data. Once the transaction is committed successfully, the data in the InstanceView object can be considered committed. - method to execute a persistence command against an instance handle, which the host obtains by invoking the method. The instance handle may be bound to entities that represent the context and subject of the command, such as an instance, instance owner, or instance lock. Only one command may be issued against an instance handle at a time. - + method to execute a persistence command against an instance handle, which the host obtains by invoking the method. The instance handle may be bound to entities that represent the context and subject of the command, such as an instance, instance owner, or instance lock. Only one command may be issued against an instance handle at a time. + > [!WARNING] -> If this method is executed with a , it will create an and bind it to the instance. This means that no other process will be able to access that workflow; if the process ends, the workflow cannot be recovered or executed. If such a workflow is executed again, a will be thrown. -> -> If is not used, the instance store will create a temporary that will be deleted at the end of the process. However, if the process ends before the workflow's final persistence point, this exception will be thrown, unless the period of time specified in the **HostLockRenewalPeriod** parameter has expired. - +> If this method is executed with a , it will create an and bind it to the instance. This means that no other process will be able to access that workflow; if the process ends, the workflow cannot be recovered or executed. If such a workflow is executed again, a will be thrown. +> +> If is not used, the instance store will create a temporary that will be deleted at the end of the process. However, if the process ends before the workflow's final persistence point, this exception will be thrown, unless the period of time specified in the **HostLockRenewalPeriod** parameter has expired. + ]]> @@ -489,11 +489,11 @@ Gets each InstanceOwner object that is bound to a valid instance handle or has not been garbage collected. The owner of the instance. - @@ -628,11 +628,11 @@ A persistence provider implements this method, which determines whether a particular persistence command can be executed and if the command can be executed executes it asynchronously. A persistence provider implementation should return if it doesn't support the command passed as a parameter; otherwise it should return or throw an exception. - to provide the results of the command. - + to provide the results of the command. + ]]> diff --git a/xml/System.Runtime.ExceptionServices/ExceptionDispatchInfo.xml b/xml/System.Runtime.ExceptionServices/ExceptionDispatchInfo.xml index e96a71357b6..55364b22347 100644 --- a/xml/System.Runtime.ExceptionServices/ExceptionDispatchInfo.xml +++ b/xml/System.Runtime.ExceptionServices/ExceptionDispatchInfo.xml @@ -55,11 +55,11 @@ Represents an exception whose state is captured at a certain point in code. - object stores the stack trace information and Watson information that an exception contains at the point where it's captured. The exception can then be thrown at another time and possibly on another thread by calling the method. The exception is thrown as if it had flowed from the point where it was captured to the point where the method is called. +## Remarks + +An object stores the stack trace information and Watson information that an exception contains at the point where it's captured. The exception can then be thrown at another time and possibly on another thread by calling the method. The exception is thrown as if it had flowed from the point where it was captured to the point where the method is called. For an example, see [Capture exceptions to rethrow later](/dotnet/standard/exceptions/best-practices-for-exceptions#capture-exceptions-to-rethrow-later). @@ -116,13 +116,13 @@ For an example, see [Capture exceptions to rethrow later](/dotnet/standard/excep Creates an object that represents the specified exception at the current point in code. An object that represents the specified exception at the current point in code. - object that's returned by this method at another time and possibly on another thread to rethrow the specified exception, as if the exception had flowed from the point where it was captured to the point where it's rethrown. - - If the exception is active when it's captured, the current stack trace information and Watson information that's contained in the exception is stored. If it's inactive, that is, if it has not been thrown, it doesn't have any stack trace or Watson information. - + object that's returned by this method at another time and possibly on another thread to rethrow the specified exception, as if the exception had flowed from the point where it was captured to the point where it's rethrown. + + If the exception is active when it's captured, the current stack trace information and Watson information that's contained in the exception is stored. If it's inactive, that is, if it has not been thrown, it doesn't have any stack trace or Watson information. + ]]> @@ -210,7 +210,7 @@ For an example, see [Capture exceptions to rethrow later](/dotnet/standard/excep ## Remarks This method populates the property from an arbitrary string value. The typical use case is the transmission of objects across processes with high fidelity, allowing preservation of the exception object's stack trace information. .NET does not attempt to parse the provided string value. - + The caller is responsible for canonicalizing line endings if required. can be used to canonicalize line endings. If the caller provides untrusted input to this API, this may result in the exception's stack trace containing embedded null characters, reserved HTML or JSON characters, or other unexpected values. Applications that display an exception's details to the user should always take care to encode the exception information at the point where it's displayed. @@ -263,11 +263,11 @@ If the caller provides untrusted input to this API, this may result in the excep Gets the exception that's represented by the current instance. The exception that's represented by the current instance. - object. It's not intended to be used by application code. Use the method to restore the state of the captured exception and throw it. - + object. It's not intended to be used by application code. Use the method to restore the state of the captured exception and throw it. + ]]> @@ -320,11 +320,11 @@ If the caller provides untrusted input to this API, this may result in the excep Throws the exception that's represented by the current object, after restoring the state that was saved when the exception was captured. - diff --git a/xml/System.Runtime.Hosting/ApplicationActivator.xml b/xml/System.Runtime.Hosting/ApplicationActivator.xml index 47105bb2fc3..d057f663783 100644 --- a/xml/System.Runtime.Hosting/ApplicationActivator.xml +++ b/xml/System.Runtime.Hosting/ApplicationActivator.xml @@ -29,7 +29,7 @@ ## Remarks There is a single designated instance of the class in each to which all activation calls are routed. The for the current can provide its own custom for this purpose. If a custom is not provided, an instance of the default is created. - The following steps describe the behavior of the default method implementation: + The following steps describe the behavior of the default method implementation: 1. Checks if the of the add-in to be activated matches the of the current domain; if not, proceeds to step 2. Otherwise, executes the assembly and returns the result wrapped in an object handle. @@ -37,9 +37,9 @@ 1. Creates a new object using an object containing the activation context for the add-in. - 2. Calls the method to create a new domain using the object. + 2. Calls the method to create a new domain using the object. - 3. The method calls the method to acquire an object for the add-in. If the property returns `true`, the add-in is executed. If not, throws a indicating that execution permission could not be acquired. + 3. The method calls the method to acquire an object for the add-in. If the property returns `true`, the add-in is executed. If not, throws a indicating that execution permission could not be acquired. 4. If the add-in is trusted to run, then a new is created and configured for the of the add-in, and the add-in is loaded and executed. @@ -51,14 +51,14 @@ 1. The custom activator finds a domain that has the same as the add-in that is being activated. -2. If the has never been seen before in the process, the custom activator creates a new for this by calling the method directly, or delegating this activity to the in the base class. +2. If the has never been seen before in the process, the custom activator creates a new for this by calling the method directly, or delegating this activity to the in the base class. -3. If there is an existing domain with the same , then the activator can delegate the method call to the in the target domain. Note that this would be a cross-domain call to an that resides in the target . +3. If there is an existing domain with the same , then the activator can delegate the method call to the in the target domain. Note that this would be a cross-domain call to an that resides in the target . ## Examples - The following code example shows how to obtain an object from the current for a manifest-based application. + The following code example shows how to obtain an object from the current for a manifest-based application. :::code language="csharp" source="~/snippets/csharp/System.Runtime.Hosting/ActivationArguments/Overview/program.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Hosting/ActivationArguments/Overview/program.vb" id="Snippet1"::: diff --git a/xml/System.Runtime.InteropServices.ComTypes/CONNECTDATA.xml b/xml/System.Runtime.InteropServices.ComTypes/CONNECTDATA.xml index 3d53087dab1..eac2ce4d4b1 100644 --- a/xml/System.Runtime.InteropServices.ComTypes/CONNECTDATA.xml +++ b/xml/System.Runtime.InteropServices.ComTypes/CONNECTDATA.xml @@ -58,15 +58,15 @@ Describes a connection that exists to a given connection point. - method. - + method. + For more information, see [CONNECTDATA structure](/windows/win32/api/ocidl/ns-ocidl-connectdata). - - The common language runtime throws an exception when a COM method in native code returns an HRESULT. For more information, see [How to: Map HRESULTs and Exceptions](/dotnet/framework/interop/how-to-map-hresults-and-exceptions). - + + The common language runtime throws an exception when a COM method in native code returns an HRESULT. For more information, see [How to: Map HRESULTs and Exceptions](/dotnet/framework/interop/how-to-map-hresults-and-exceptions). + ]]> diff --git a/xml/System.Runtime.InteropServices.ComTypes/IAdviseSink.xml b/xml/System.Runtime.InteropServices.ComTypes/IAdviseSink.xml index ea6b084d522..68b8285b303 100644 --- a/xml/System.Runtime.InteropServices.ComTypes/IAdviseSink.xml +++ b/xml/System.Runtime.InteropServices.ComTypes/IAdviseSink.xml @@ -63,15 +63,15 @@ Provides a managed definition of the interface. - @@ -120,13 +120,13 @@ Notifies all registered advisory sinks that the object has changed from the running state to the loaded state. This method is called by a server. - notification indicates that an object is making the transition from the running state to the loaded state, so its container can take appropriate measures to ensure orderly shutdown. For example, an object handler must release its pointer to the object. - + notification indicates that an object is making the transition from the running state to the loaded state, so its container can take appropriate measures to ensure orderly shutdown. For example, an object handler must release its pointer to the object. + For more information, see [IAdviseSink::OnClose method](/windows/win32/api/objidl/nf-objidl-iadvisesink-onclose). - + ]]> @@ -181,11 +181,11 @@ A , passed by reference, which defines the storage medium (global memory, disk file, storage object, stream object, Graphics Device Interface (GDI) object, or undefined) and ownership of that medium for the calling data object. Notifies all data objects currently registered advisory sinks that data in the object has changed. - @@ -237,11 +237,11 @@ A pointer to the interface on the new full moniker of the object. Notifies all registered advisory sinks that the object has been renamed. This method is called by a server. - @@ -290,11 +290,11 @@ Notifies all registered advisory sinks that the object has been saved. This method is called by a server. - @@ -348,11 +348,11 @@ The portion of the view that has changed. Currently, only -1 is valid. Notifies an object's registered advisory sinks that its view has changed. This method is called by a server. - diff --git a/xml/System.Runtime.InteropServices.ComTypes/ITypeInfo.xml b/xml/System.Runtime.InteropServices.ComTypes/ITypeInfo.xml index b10c36172f3..4c43b09815f 100644 --- a/xml/System.Runtime.InteropServices.ComTypes/ITypeInfo.xml +++ b/xml/System.Runtime.InteropServices.ComTypes/ITypeInfo.xml @@ -63,13 +63,13 @@ Provides the managed definition of the Component Automation ITypeInfo interface. - @@ -125,11 +125,11 @@ When this method returns, contains a reference to the member. This parameter is passed uninitialized. Retrieves the addresses of static functions or variables, such as those defined in a DLL. - @@ -194,11 +194,11 @@ When this method returns, contains a reference to the created object. This parameter is passed uninitialized. Creates a new instance of a type that describes a component class (coclass). - @@ -252,11 +252,11 @@ When this method returns, contains a reference to the index of the type description within the containing type library. This parameter is passed uninitialized. Retrieves the type library that contains this type description and its index within that type library. - @@ -316,11 +316,11 @@ If not , and the function is defined by an ordinal, then lpwOrdinal is set to point to the ordinal. Retrieves a description or specification of an entry point for a function in a DLL. - @@ -380,11 +380,11 @@ When this method returns, contains the fully qualified name of the Help file. This parameter is passed uninitialized. Retrieves the documentation string, the complete Help file name and path, and the context ID for the Help topic for a specified type description. - @@ -438,13 +438,13 @@ When this method returns, contains a reference to a structure that describes the specified function. This parameter is passed uninitialized. Retrieves the structure that contains information about a specified function. - method. - + method. + For more information, see [ITypeInfo::GetFuncDesc method](/windows/win32/api/oaidl/nf-oaidl-itypeinfo-getfuncdesc). - + ]]> @@ -501,11 +501,11 @@ When this method returns, contains a reference to an array in which name mappings are placed. This parameter is passed uninitialized. Maps between member names and member IDs, and parameter names and parameter IDs. - @@ -559,11 +559,11 @@ When this method returns, contains a reference to the enumeration. This parameter is passed uninitialized. Retrieves the value for one implemented interface or base interface in a type description. - @@ -618,11 +618,11 @@ When this method returns, contains a reference to the string used in marshaling the fields of the structure described by the referenced type description, or returns if there is no information to return. This parameter is passed uninitialized. Retrieves marshaling information. - @@ -681,11 +681,11 @@ When this method returns, contains the number of names in the array. This parameter is passed uninitialized. Retrieves the variable with the specified member ID (or the name of the property or method and its parameters) that corresponds to the specified function ID. - @@ -739,11 +739,11 @@ When this method returns, contains the referenced type description. This parameter is passed uninitialized. Retrieves the referenced type descriptions if a type description references other type descriptions. - @@ -797,11 +797,11 @@ When this method returns, contains a reference to a handle for the implemented interface. This parameter is passed uninitialized. Retrieves the type description of the implemented interface types if a type description describes a COM class. - @@ -853,13 +853,13 @@ When this method returns, contains a reference to the structure that contains the attributes of this type description. This parameter is passed uninitialized. Retrieves a structure that contains the attributes of the type description. - method. - + method. + For more information, see [ITypeInfo::GetTypeAttr method](/windows/win32/api/oaidl/nf-oaidl-itypeinfo-gettypeattr). - + ]]> @@ -911,11 +911,11 @@ When this method returns, contains a reference to the interface of the containing type library. This parameter is passed uninitialized. Retrieves the interface for the type description, which enables a client compiler to bind to the type description's members. - @@ -969,13 +969,13 @@ When this method returns, contains a reference to the structure that describes the specified variable. This parameter is passed uninitialized. Retrieves a structure that describes the specified variable. - method. - + method. + For more information, see [ITypeInfo::GetVarDesc method](/windows/win32/api/oaidl/nf-oaidl-itypeinfo-getvardesc). - + ]]> @@ -1039,22 +1039,22 @@ If returns , indicates the index within rgvarg of the argument with the incorrect type. If more than one argument returns an error, indicates only the first argument with an error. This parameter is passed uninitialized. Invokes a method, or accesses a property of an object, that implements the interface described by the type description. - method. - - Valid values for the `wFlags` parameter are: - -|Value|Description| -|-----------|-----------------| -|DISPATCH_METHOD|The member is accessed as a method. If there is ambiguity, both this flag and the `DISPATCH_PROPERTYGET` flag can be set.| -|DISPATCH_PROPERTYGET|The member is retrieved as a property or data member.| -|DISPATCH_PROPERTYPUT|The member is changed as a property or data member.| -|DISPATCH_PROPERTYPUTREF|The member is changed by using a reference assignment, rather than a value assignment. This value is valid only when the property accepts a reference to an object.| - + method. + + Valid values for the `wFlags` parameter are: + +|Value|Description| +|-----------|-----------------| +|DISPATCH_METHOD|The member is accessed as a method. If there is ambiguity, both this flag and the `DISPATCH_PROPERTYGET` flag can be set.| +|DISPATCH_PROPERTYGET|The member is retrieved as a property or data member.| +|DISPATCH_PROPERTYPUT|The member is changed as a property or data member.| +|DISPATCH_PROPERTYPUTREF|The member is changed by using a reference assignment, rather than a value assignment. This value is valid only when the property accepts a reference to an object.| + For more information, see [ITypeInfo::Invoke method](/windows/win32/api/oaidl/nf-oaidl-itypeinfo-invoke). - + ]]> @@ -1106,11 +1106,11 @@ A reference to the structure to release. Releases a structure previously returned by the method. - @@ -1162,11 +1162,11 @@ A reference to the structure to release. Releases a structure previously returned by the method. - @@ -1218,11 +1218,11 @@ A reference to the structure to release. Releases a structure previously returned by the method. - diff --git a/xml/System.Runtime.InteropServices.ComTypes/ITypeInfo2.xml b/xml/System.Runtime.InteropServices.ComTypes/ITypeInfo2.xml index 101eb243a05..5f3ad7067a4 100644 --- a/xml/System.Runtime.InteropServices.ComTypes/ITypeInfo2.xml +++ b/xml/System.Runtime.InteropServices.ComTypes/ITypeInfo2.xml @@ -902,7 +902,7 @@ method. + The values of the `ppFuncDesc` parameter can be accessed through the method. For more information, see [ITypeInfo::GetFuncDesc method](/windows/win32/api/oaidl/nf-oaidl-itypeinfo-getfuncdesc). @@ -1506,7 +1506,7 @@ method. + The values of the `ppTypeAttr` parameter can be accessed through the method. For more information, see [ITypeInfo::GetTypeAttr method](/windows/win32/api/oaidl/nf-oaidl-itypeinfo-gettypeattr). @@ -1786,7 +1786,7 @@ method. + The values of the `ppVarDesc` parameter can be accessed through the method. For more information, see [ITypeInfo::GetVarDesc method](/windows/win32/api/oaidl/nf-oaidl-itypeinfo-getvardesc). @@ -1910,7 +1910,7 @@ method. + The values of the `pDispParams` parameter can be accessed through the method. Valid values for `wFlags` are: diff --git a/xml/System.Runtime.InteropServices.ComTypes/ITypeLib.xml b/xml/System.Runtime.InteropServices.ComTypes/ITypeLib.xml index 9371e0d95e8..3f16db57ccb 100644 --- a/xml/System.Runtime.InteropServices.ComTypes/ITypeLib.xml +++ b/xml/System.Runtime.InteropServices.ComTypes/ITypeLib.xml @@ -63,13 +63,13 @@ Provides the managed definition of the interface. - @@ -127,20 +127,20 @@ A hash value to speed up the search, computed by the function. If is 0, a value is computed. When this method returns, contains an array of pointers to the type descriptions that contain the name specified in . This parameter is passed uninitialized. An array of the 's of the found items; [i] is the that indexes into the type description specified by [i]. Cannot be . - On entry, indicates how many instances to look for. For example, = 1 can be called to find the first occurrence. The search stops when one instance is found. - + On entry, indicates how many instances to look for. For example, = 1 can be called to find the first occurrence. The search stops when one instance is found. + On exit, indicates the number of instances that were found. If the and values of are identical, there might be more type descriptions that contain the name. Finds occurrences of a type description in a type library. - method passes "abc" as the `szNameBuf` parameter, `szNameBuf` becomes "aBc" when the method returns. - + method passes "abc" as the `szNameBuf` parameter, `szNameBuf` becomes "aBc" when the method returns. + For more information, see [ITypeLib::FindName method](/windows/win32/api/oaidl/nf-oaidl-itypelib-findname). - + ]]> @@ -200,11 +200,11 @@ When this method returns, contains a string that represents the fully qualified name of the Help file. This parameter is passed uninitialized. Retrieves the library's documentation string, the complete Help file name and path, and the context identifier for the library Help topic in the Help file. - @@ -256,13 +256,13 @@ When this method returns, contains a structure that contains the library's attributes. This parameter is passed uninitialized. Retrieves the structure that contains the library's attributes. - method. - + method. + For more information, see [ITypeLib::GetLibAttr method](/windows/win32/api/oaidl/nf-oaidl-itypelib-getlibattr). - + ]]> @@ -314,11 +314,11 @@ When this method returns, contains an instance of a instance for this . This parameter is passed uninitialized. Enables a client compiler to bind to a library's types, variables, constants, and global functions. - @@ -372,11 +372,11 @@ When this method returns, contains an describing the type referenced by . This parameter is passed uninitialized. Retrieves the specified type description in the library. - @@ -426,11 +426,11 @@ Returns the number of type descriptions in the type library. The number of type descriptions in the type library. - @@ -484,11 +484,11 @@ When this method returns, contains the requested interface. This parameter is passed uninitialized. Retrieves the type description that corresponds to the specified GUID. - @@ -542,11 +542,11 @@ When this method returns, contains a reference to the enumeration for the type description. This parameter is passed uninitialized. Retrieves the type of a type description. - @@ -602,13 +602,13 @@ if was found in the type library; otherwise, . - method passes "abc" as the `szNameBuf` parameter, `szNameBuf` becomes "aBc" when the method returns. - + method passes "abc" as the `szNameBuf` parameter, `szNameBuf` becomes "aBc" when the method returns. + For more information, see [ITypeLib::IsName method](/windows/win32/api/oaidl/nf-oaidl-itypelib-isname). - + ]]> @@ -660,11 +660,11 @@ The structure to release. Releases the structure originally obtained from the method. - diff --git a/xml/System.Runtime.InteropServices.ComTypes/ITypeLib2.xml b/xml/System.Runtime.InteropServices.ComTypes/ITypeLib2.xml index ec49ee0070b..830a5ffdfbf 100644 --- a/xml/System.Runtime.InteropServices.ComTypes/ITypeLib2.xml +++ b/xml/System.Runtime.InteropServices.ComTypes/ITypeLib2.xml @@ -67,13 +67,13 @@ Provides a managed definition of the interface. - @@ -134,18 +134,18 @@ A hash value to speed up the search, computed by the function. If is 0, a value is computed. When this method returns, contains an array of pointers to the type descriptions that contain the name specified in . This parameter is passed uninitialized. When this method returns, contains an array of the s of the found items; [i] is the that indexes into the type description specified by [i]. This parameter cannot be . This parameter is passed uninitialized. - On entry, a value, passed by reference, that indicates how many instances to look for. For example, = 1 can be called to find the first occurrence. The search stops when one instance is found. - + On entry, a value, passed by reference, that indicates how many instances to look for. For example, = 1 can be called to find the first occurrence. The search stops when one instance is found. + On exit, indicates the number of instances that were found. If the and values of are identical, there might be more type descriptions that contain the name. Finds occurrences of a type description in a type library. - @@ -308,11 +308,11 @@ When this method returns, contains a string that specifies the fully qualified name of the Help file. This parameter is passed uninitialized. Retrieves the library's documentation string, the complete Help file name and path, and the context identifier for the library Help topic in the Help file. - @@ -428,13 +428,13 @@ When this method returns, contains a structure that contains the library's attributes. This parameter is passed uninitialized. Retrieves the structure that contains the library's attributes. - method. - + method. + For more information, see [ITypeLib::GetLibAttr method](/windows/win32/api/oaidl/nf-oaidl-itypelib-getlibattr). - + ]]> @@ -488,11 +488,11 @@ When this method returns, contains a pointer to a change in the count of unique names. This parameter is passed uninitialized. Returns statistics about a type library that are required for efficient sizing of hash tables. - @@ -547,11 +547,11 @@ When this method returns, contains an instance for this . This parameter is passed uninitialized. Enables a client compiler to bind to a library's types, variables, constants, and global functions. - @@ -608,11 +608,11 @@ When this method returns, contains an describing the type referenced by . This parameter is passed uninitialized. Retrieves the specified type description in the library. - @@ -665,11 +665,11 @@ Returns the number of type descriptions in the type library. The number of type descriptions in the type library. - @@ -726,11 +726,11 @@ When this method returns, contains the requested interface. This parameter is passed uninitialized. Retrieves the type description that corresponds to the specified GUID. - @@ -787,11 +787,11 @@ When this method returns, contains a reference to the enumeration for the type description. This parameter is passed uninitialized. Retrieves the type of a type description. - @@ -850,11 +850,11 @@ if was found in the type library; otherwise, . - @@ -909,11 +909,11 @@ The structure to release. Releases the structure originally obtained from the method. - diff --git a/xml/System.Runtime.InteropServices.CustomMarshalers/EnumerableToDispatchMarshaler.xml b/xml/System.Runtime.InteropServices.CustomMarshalers/EnumerableToDispatchMarshaler.xml index 4fa33827e55..d8aebe1496f 100644 --- a/xml/System.Runtime.InteropServices.CustomMarshalers/EnumerableToDispatchMarshaler.xml +++ b/xml/System.Runtime.InteropServices.CustomMarshalers/EnumerableToDispatchMarshaler.xml @@ -23,11 +23,11 @@ Marshals the COM interface to the .NET Framework interface, and vice versa. - and marshals to `IDispatch` when a member with a DISPID of -4 exists. When you use the Type Library Importer (Tlbimp.exe) to create a class that implements , the CLR uses this custom marshaler automatically to bridge COM enumerators and .NET enumerators. Calling results in `IDispatch.Invoke` being called with a DISPID of -4, and vice versa. - + and marshals to `IDispatch` when a member with a DISPID of -4 exists. When you use the Type Library Importer (Tlbimp.exe) to create a class that implements , the CLR uses this custom marshaler automatically to bridge COM enumerators and .NET enumerators. Calling results in `IDispatch.Invoke` being called with a DISPID of -4, and vice versa. + ]]> @@ -49,7 +49,7 @@ [!NOTE] > This member is removed in the .NET Framework version 2.0 and subsequent versions. @@ -89,11 +89,11 @@ The managed object to be destroyed. Performs necessary cleanup of the managed data when it is no longer needed. - method. - + method. + ]]> @@ -129,11 +129,11 @@ A pointer to the unmanaged data to be destroyed. Performs necessary cleanup of the unmanaged data when it is no longer needed. - method. - + method. + ]]> @@ -164,11 +164,11 @@ Returns an instance of the custom marshaler. An instance of the custom marshaler. - interface definition. - + interface definition. + ]]> @@ -202,11 +202,11 @@ Returns the size in bytes of the unmanaged data to be marshaled. -1 to indicate the type this marshaler handles is not a value type. - @@ -243,11 +243,11 @@ Marshals an object from managed code to unmanaged code. A pointer to the unmanaged object. - @@ -286,11 +286,11 @@ Marshals an object from unmanaged code to managed code. A managed object. - diff --git a/xml/System.Runtime.InteropServices.CustomMarshalers/EnumeratorToEnumVariantMarshaler.xml b/xml/System.Runtime.InteropServices.CustomMarshalers/EnumeratorToEnumVariantMarshaler.xml index 047753319a1..b48aa2e9ccb 100644 --- a/xml/System.Runtime.InteropServices.CustomMarshalers/EnumeratorToEnumVariantMarshaler.xml +++ b/xml/System.Runtime.InteropServices.CustomMarshalers/EnumeratorToEnumVariantMarshaler.xml @@ -23,11 +23,11 @@ Marshals the COM interface to the .NET Framework interface, and vice versa. - and marshals to `IEnumVARIANT`. The CLR automatically uses this class to bridge COM enumerators and .NET enumerators. The type returned by the method in the imported COM class uses `EnumeratorToEnumVariantMarshaler` to map the calls to the `IEnumVARIANT` interface pointer returned by the COM object's member with a DISPID of -4. - + and marshals to `IEnumVARIANT`. The CLR automatically uses this class to bridge COM enumerators and .NET enumerators. The type returned by the method in the imported COM class uses `EnumeratorToEnumVariantMarshaler` to map the calls to the `IEnumVARIANT` interface pointer returned by the COM object's member with a DISPID of -4. + ]]> @@ -49,7 +49,7 @@ [!NOTE] > This member is removed in the .NET Framework version 2.0 and subsequent versions. @@ -89,11 +89,11 @@ The managed object to be destroyed. Performs necessary cleanup of the managed data when it is no longer needed. - method. - + method. + ]]> @@ -129,11 +129,11 @@ A pointer to the unmanaged data to be destroyed. Performs necessary cleanup of the unmanaged data when it is no longer needed. - method. - + method. + ]]> @@ -164,11 +164,11 @@ Returns an instance of the custom marshaler. An instance of the custom marshaler. - interface definition. - + interface definition. + ]]> @@ -202,11 +202,11 @@ Returns the size in bytes of the unmanaged data to be marshaled. -1 to indicate the type this marshaler handles is not a value type. - @@ -243,11 +243,11 @@ Marshals an object from managed code to unmanaged code. A pointer to the unmanaged object. - @@ -286,11 +286,11 @@ Marshals an object from unmanaged code to managed code. A managed object. - diff --git a/xml/System.Runtime.InteropServices.CustomMarshalers/ExpandoToDispatchExMarshaler.xml b/xml/System.Runtime.InteropServices.CustomMarshalers/ExpandoToDispatchExMarshaler.xml index bddf6a9310b..98fb1613cda 100644 --- a/xml/System.Runtime.InteropServices.CustomMarshalers/ExpandoToDispatchExMarshaler.xml +++ b/xml/System.Runtime.InteropServices.CustomMarshalers/ExpandoToDispatchExMarshaler.xml @@ -23,15 +23,15 @@ Marshals the COM interface to either the .NET Framework interface, or to the interface, and vice versa. - @@ -53,7 +53,7 @@ void UseCustomMarshaler([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef [!NOTE] > This member is removed in the .NET Framework version 2.0 and subsequent versions. @@ -93,11 +93,11 @@ void UseCustomMarshaler([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef The managed object to be destroyed. Performs necessary cleanup of the managed data when it is no longer needed. - method. - + method. + ]]> @@ -133,11 +133,11 @@ void UseCustomMarshaler([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef A pointer to the unmanaged data to be destroyed. Performs necessary cleanup of the unmanaged data when it is no longer needed. - method. - + method. + ]]> @@ -168,11 +168,11 @@ void UseCustomMarshaler([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef Returns an instance of the custom marshaler. An instance of the custom marshaler. - interface definition. - + interface definition. + ]]> @@ -208,11 +208,11 @@ void UseCustomMarshaler([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef Returns the size in bytes of the unmanaged data to be marshaled. -1 to indicate the type this marshaler handles is not a value type. - @@ -249,11 +249,11 @@ void UseCustomMarshaler([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef Marshals an object from managed code to unmanaged code. A pointer to the unmanaged object. - @@ -292,11 +292,11 @@ void UseCustomMarshaler([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef Marshals an object from unmanaged code to managed code. A managed object. - diff --git a/xml/System.Runtime.InteropServices.CustomMarshalers/TypeToTypeInfoMarshaler.xml b/xml/System.Runtime.InteropServices.CustomMarshalers/TypeToTypeInfoMarshaler.xml index 1f680efad9b..3423bb155f7 100644 --- a/xml/System.Runtime.InteropServices.CustomMarshalers/TypeToTypeInfoMarshaler.xml +++ b/xml/System.Runtime.InteropServices.CustomMarshalers/TypeToTypeInfoMarshaler.xml @@ -23,15 +23,15 @@ Marshals the unmanaged interface to the managed class, and marshals the managed class to the unmanaged interface. - instance exposed for an `ITypeInfo` interface is based on the metadata that would appear in an imported assembly. - - The Type Library Importer (Tlbimp.exe) marks `ITypeInfo` parameters with the appropriate with the enumeration member when converting signatures that use `ITypeInfo` parameters to signatures that use parameters. - - The same conversion functionality can be accomplished without the custom marshaler, by calling and . - + instance exposed for an `ITypeInfo` interface is based on the metadata that would appear in an imported assembly. + + The Type Library Importer (Tlbimp.exe) marks `ITypeInfo` parameters with the appropriate with the enumeration member when converting signatures that use `ITypeInfo` parameters to signatures that use parameters. + + The same conversion functionality can be accomplished without the custom marshaler, by calling and . + ]]> @@ -53,7 +53,7 @@ [!NOTE] > This member is removed in the .NET Framework version 2.0 and subsequent versions. @@ -93,11 +93,11 @@ The managed object to be destroyed. Performs necessary cleanup of the managed data when it is no longer needed. - method. - + method. + ]]> @@ -133,11 +133,11 @@ A pointer to the unmanaged data to be destroyed. Performs necessary cleanup of the unmanaged data when it is no longer needed. - method. - + method. + ]]> @@ -168,11 +168,11 @@ Returns an instance of the custom marshaler. An instance of the custom marshaler. - interface definition. - + interface definition. + ]]> @@ -206,11 +206,11 @@ Returns the size in bytes of the unmanaged data to be marshaled. -1 to indicate the type this marshaler handles is not a value type. - @@ -247,11 +247,11 @@ Marshals an object from managed code to unmanaged code. A pointer to the unmanaged object. - @@ -290,11 +290,11 @@ Marshals an object from unmanaged code to managed code. A managed object. - diff --git a/xml/System.Runtime.InteropServices.Marshalling/ReadOnlySpanMarshaller`2.xml b/xml/System.Runtime.InteropServices.Marshalling/ReadOnlySpanMarshaller`2.xml index a98f288578f..86cb1c20af8 100644 --- a/xml/System.Runtime.InteropServices.Marshalling/ReadOnlySpanMarshaller`2.xml +++ b/xml/System.Runtime.InteropServices.Marshalling/ReadOnlySpanMarshaller`2.xml @@ -71,7 +71,7 @@ ## Remarks -A marshalled with this marshaller will match the semantics of . +A marshalled with this marshaller will match the semantics of . In particular, this marshaller will pass a non-`null` value for a zero-length span if the span was constructed with a non-`null` value. ]]> diff --git a/xml/System.Runtime.InteropServices.Marshalling/SpanMarshaller`2.xml b/xml/System.Runtime.InteropServices.Marshalling/SpanMarshaller`2.xml index 68016a9b607..53906a6ed03 100644 --- a/xml/System.Runtime.InteropServices.Marshalling/SpanMarshaller`2.xml +++ b/xml/System.Runtime.InteropServices.Marshalling/SpanMarshaller`2.xml @@ -67,7 +67,7 @@ ## Remarks -A marshalled with this marshaller will match the semantics of . +A marshalled with this marshaller will match the semantics of . In particular, this marshaller will pass a non-`null` value for a zero-length span if the span was constructed with a non-`null` value. ]]> diff --git a/xml/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationTokenTable`1.xml b/xml/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationTokenTable`1.xml index 2fa49620a6c..db740241627 100644 --- a/xml/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationTokenTable`1.xml +++ b/xml/System.Runtime.InteropServices.WindowsRuntime/EventRegistrationTokenTable`1.xml @@ -39,7 +39,7 @@ ## Remarks Use this type when you need to manage the addition and removal of events manually. - An instance of this table stores the delegates that represent the event handlers that have been added to an event. To raise the event, invoke the delegate that is returned by the property, if it is not `null`. An instance of this table is required for each event. + An instance of this table stores the delegates that represent the event handlers that have been added to an event. To raise the event, invoke the delegate that is returned by the property, if it is not `null`. An instance of this table is required for each event. ]]> @@ -138,7 +138,7 @@ method to initialize an event registration token table in scenarios where any of several threads can create the table. If this method is called on multiple threads at the same time, the same event registration token table is returned on all threads. + Use the method to initialize an event registration token table in scenarios where any of several threads can create the table. If this method is called on multiple threads at the same time, the same event registration token table is returned on all threads. ]]> diff --git a/xml/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMarshal.xml b/xml/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMarshal.xml index 62b520faefd..1acab8c0b64 100644 --- a/xml/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMarshal.xml +++ b/xml/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMarshal.xml @@ -341,7 +341,7 @@ method to release the [HSTRING](https://go.microsoft.com/fwlink/p/?LinkId=246451) when you are done using it. + Use the method to release the [HSTRING](https://go.microsoft.com/fwlink/p/?LinkId=246451) when you are done using it. ]]> diff --git a/xml/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMetadata.xml b/xml/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMetadata.xml index 3fe3211aa5f..8cbba393a78 100644 --- a/xml/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMetadata.xml +++ b/xml/System.Runtime.InteropServices.WindowsRuntime/WindowsRuntimeMetadata.xml @@ -17,14 +17,14 @@ Provides an event for resolving reflection-only type requests for types that are provided by Windows Metadata files, and methods for performing the resolution. - [!NOTE] -> Sub-namespaces don't imply containment. That is, namespace A.B isn't contained in namespace A. - +> Sub-namespaces don't imply containment. That is, namespace A.B isn't contained in namespace A. + ]]> @@ -89,16 +89,16 @@ Occurs when the resolution of a Windows Metadata file fails in the reflection-only context. - event for managed assemblies. - - See the class. - + event for managed assemblies. + + See the class. + > [!IMPORTANT] -> The event handler for this event should not throw exceptions. - +> The event handler for this event should not throw exceptions. + ]]> @@ -145,11 +145,11 @@ Locates the Windows Metadata files for the specified namespace, given the specified locations to search. An enumerable list of strings that represent the Windows Metadata files that define . - method overload and specifying `null` for the `windowsSdkFilePath` parameter. - + method overload and specifying `null` for the `windowsSdkFilePath` parameter. + ]]> The operating system version does not support the Windows Runtime. @@ -190,11 +190,11 @@ Locates the Windows Metadata files for the specified namespace, given the specified locations to search. An enumerable list of strings that represent the Windows Metadata files that define . - The operating system version does not support the Windows Runtime. diff --git a/xml/System.Runtime.InteropServices/ArrayWithOffset.xml b/xml/System.Runtime.InteropServices/ArrayWithOffset.xml index 597addcaa1d..d62ec1078f1 100644 --- a/xml/System.Runtime.InteropServices/ArrayWithOffset.xml +++ b/xml/System.Runtime.InteropServices/ArrayWithOffset.xml @@ -80,11 +80,11 @@ Encapsulates an array and an offset within the specified array. - @@ -472,7 +472,7 @@ if the value of is the same as the value of ; otherwise, . - .]]> + .]]> @@ -527,7 +527,7 @@ if the value of is not the same as the value of ; otherwise, . - .]]> + .]]> diff --git a/xml/System.Runtime.InteropServices/COMException.xml b/xml/System.Runtime.InteropServices/COMException.xml index eb884081099..3e4f6788f85 100644 --- a/xml/System.Runtime.InteropServices/COMException.xml +++ b/xml/System.Runtime.InteropServices/COMException.xml @@ -139,8 +139,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||A localized error message string.| +||`null`.| +||A localized error message string.| ]]> @@ -199,8 +199,8 @@ |Property|Value| |--------------|-----------| -||`null`| -||`message`| +||`null`| +||`message`| ]]> @@ -333,8 +333,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> @@ -399,8 +399,8 @@ |Property|Value| |--------------|-----------| -||`null`| -||`message`| +||`null`| +||`message`| ]]> diff --git a/xml/System.Runtime.InteropServices/CONNECTDATA.xml b/xml/System.Runtime.InteropServices/CONNECTDATA.xml index e52e1006c59..f201141d87f 100644 --- a/xml/System.Runtime.InteropServices/CONNECTDATA.xml +++ b/xml/System.Runtime.InteropServices/CONNECTDATA.xml @@ -29,13 +29,13 @@ Use instead. - method. - - For more information about `CONNECTDATA`, see the MSDN Library. - + method. + + For more information about `CONNECTDATA`, see the MSDN Library. + ]]> diff --git a/xml/System.Runtime.InteropServices/CollectionsMarshal.xml b/xml/System.Runtime.InteropServices/CollectionsMarshal.xml index 41310c50635..026035f958b 100644 --- a/xml/System.Runtime.InteropServices/CollectionsMarshal.xml +++ b/xml/System.Runtime.InteropServices/CollectionsMarshal.xml @@ -289,7 +289,7 @@ Items should not be added to or removed from the while the ref `TValue` is in use. -The ref `null` can be detected by calling . +The ref `null` can be detected by calling . ]]> diff --git a/xml/System.Runtime.InteropServices/ComAwareEventInfo.xml b/xml/System.Runtime.InteropServices/ComAwareEventInfo.xml index 8f8df06c9a0..43e9c23b048 100644 --- a/xml/System.Runtime.InteropServices/ComAwareEventInfo.xml +++ b/xml/System.Runtime.InteropServices/ComAwareEventInfo.xml @@ -75,11 +75,11 @@ and methods instead of using regular add handler and remove handler methods for events. This occurs if the interface that the corresponding event is defined on needs to be embedded. + Normally, compilers will automatically embed calls to the and methods instead of using regular add handler and remove handler methods for events. This occurs if the interface that the corresponding event is defined on needs to be embedded. You can specify this by embedding the entire assembly that contains the interface by using the **/link** option on the compilers or by setting the **Embed Interop Types** property to `True` in Visual Studio. - The type derives from the class and overrides the and methods. + The type derives from the class and overrides the and methods. ]]> @@ -196,11 +196,11 @@ method except that it allows you to attach events to COM objects. + This method is similar to the method except that it allows you to attach events to COM objects. - If `target` is a COM object, this method adds a delegate to an event by using the method. + If `target` is a COM object, this method adds a delegate to an event by using the method. - facilitates registering COM event sinks that forward calls to corresponding managed delegates. It requires the following information: + facilitates registering COM event sinks that forward calls to corresponding managed delegates. It requires the following information: - The target object itself (`target`). @@ -210,7 +210,7 @@ - The delegate that would be invoked when the COM object triggers the corresponding event (`handler`). - looks up the corresponding COM source interface (specified as the first parameter of the constructor). It then looks up a method on the source interface whose name is identical to the event name. The value of `GuidAttribute` on the source interface is the GUID that is passed to ; the value of `DispIDAttribute` on the method is the DispID value that is passed to . + looks up the corresponding COM source interface (specified as the first parameter of the constructor). It then looks up a method on the source interface whose name is identical to the event name. The value of `GuidAttribute` on the source interface is the GUID that is passed to ; the value of `DispIDAttribute` on the method is the DispID value that is passed to . ]]> @@ -368,7 +368,7 @@ method. + This method calls the method. ]]> @@ -432,7 +432,7 @@ method of the underlying object. + This method calls the method of the underlying object. ]]> @@ -944,11 +944,11 @@ method, except that it allows you to detach events from COM objects. + This method is similar to the method, except that it allows you to detach events from COM objects. - If `target` is a COM object, this method releases a delegate to an event by using the method. + If `target` is a COM object, this method releases a delegate to an event by using the method. - facilitates unregistering COM event sinks that forward calls to corresponding managed delegates. It requires the following information: + facilitates unregistering COM event sinks that forward calls to corresponding managed delegates. It requires the following information: - The target object itself (`target`). @@ -958,7 +958,7 @@ - The delegate that would be invoked when the COM object triggers the corresponding event (`handler`). - looks up the corresponding COM source interface (specified as the first parameter of the constructor). It then it looks up a method on the source interface whose name is identical to the event name. The value of `GuidAttribute` on the source interface is the GUID that is passed to ; the value of `DispIDAttribute` on the method is the DispID value that is passed to . + looks up the corresponding COM source interface (specified as the first parameter of the constructor). It then it looks up a method on the source interface whose name is identical to the event name. The value of `GuidAttribute` on the source interface is the GUID that is passed to ; the value of `DispIDAttribute` on the method is the DispID value that is passed to . ]]> diff --git a/xml/System.Runtime.InteropServices/ComRegisterFunctionAttribute.xml b/xml/System.Runtime.InteropServices/ComRegisterFunctionAttribute.xml index 49c845384d8..d93e0ea77d1 100644 --- a/xml/System.Runtime.InteropServices/ComRegisterFunctionAttribute.xml +++ b/xml/System.Runtime.InteropServices/ComRegisterFunctionAttribute.xml @@ -63,7 +63,7 @@ `ComRegisterFunctionAttribute` enables you to add arbitrary registration code to accommodate the requirements of COM clients. For example, you can update the registry using registration functions from the namespace. If you provide a registration method, you should also apply to an unregistration method, which reverses the operations done in the registration method. -**.NET Framework:** The common language runtime calls the method with this attribute when its containing assembly is registered (directly or indirectly) with the [Regasm.exe (Assembly Registration) tool)](/dotnet/framework/tools/regasm-exe-assembly-registration-tool) or through the method. +**.NET Framework:** The common language runtime calls the method with this attribute when its containing assembly is registered (directly or indirectly) with the [Regasm.exe (Assembly Registration) tool)](/dotnet/framework/tools/regasm-exe-assembly-registration-tool) or through the method. **.NET Core:** The common language runtime calls the method with this attribute when its containing assembly's COM host is registered via the [RegSvr32.exe tool](https://learn.microsoft.com/windows-server/administration/windows-commands/regsvr32). diff --git a/xml/System.Runtime.InteropServices/ComUnregisterFunctionAttribute.xml b/xml/System.Runtime.InteropServices/ComUnregisterFunctionAttribute.xml index 3bf7db1965f..a4bae374968 100644 --- a/xml/System.Runtime.InteropServices/ComUnregisterFunctionAttribute.xml +++ b/xml/System.Runtime.InteropServices/ComUnregisterFunctionAttribute.xml @@ -56,24 +56,24 @@ Specifies the method to call when you unregister an assembly for use from COM; this allows for the execution of user-written code during the unregistration process. - to provide a registration method, you should also provide an unregistration method to reverse the operations done in the registration method. You can have only one unregistration method for a class. -**.NET Framework:** The common language runtime calls the method with this attribute when its containing assembly is unregistered (directly or indirectly) with the [Regasm.exe (Assembly Registration) tool)](/dotnet/framework/tools/regasm-exe-assembly-registration-tool) or through the method. +**.NET Framework:** The common language runtime calls the method with this attribute when its containing assembly is unregistered (directly or indirectly) with the [Regasm.exe (Assembly Registration) tool)](/dotnet/framework/tools/regasm-exe-assembly-registration-tool) or through the method. + + **.NET Core:** The common language runtime calls the method with this attribute when its containing assembly's COM host is unregistered via the [RegSvr32.exe tool](https://learn.microsoft.com/windows-server/administration/windows-commands/regsvr32). + +## Examples + The following example demonstrates applying and to methods with the appropriate signature. - **.NET Core:** The common language runtime calls the method with this attribute when its containing assembly's COM host is unregistered via the [RegSvr32.exe tool](https://learn.microsoft.com/windows-server/administration/windows-commands/regsvr32). - -## Examples - The following example demonstrates applying and to methods with the appropriate signature. - :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_Classic/classic ComRegisterFunctionAttribute Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/ComRegisterFunctionAttribute/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/ComRegisterFunctionAttribute/Overview/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/ComRegisterFunctionAttribute/Overview/source.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Runtime.InteropServices/CriticalHandle.xml b/xml/System.Runtime.InteropServices/CriticalHandle.xml index 89230102cde..12745706098 100644 --- a/xml/System.Runtime.InteropServices/CriticalHandle.xml +++ b/xml/System.Runtime.InteropServices/CriticalHandle.xml @@ -99,7 +99,7 @@ ## Remarks The class is similar to the class, except that implements reference counting. You can use instead of to address performance considerations when you can provide the necessary synchronization more efficiently yourself. - Because the class does not perform reference counting, it does not provide protection from handle recycling security attacks. Because the reference counting algorithm implicitly serializes operations, a certain amount of thread safety is also lost. If you call the or method while an operation that is using the handle is outstanding on another thread, or if you call or from two threads at the same time, the results are non-deterministic. The class still provides the guaranteed critical finalization provided by the class. + Because the class does not perform reference counting, it does not provide protection from handle recycling security attacks. Because the reference counting algorithm implicitly serializes operations, a certain amount of thread safety is also lost. If you call the or method while an operation that is using the handle is outstanding on another thread, or if you call or from two threads at the same time, the results are non-deterministic. The class still provides the guaranteed critical finalization provided by the class. ]]> @@ -223,11 +223,11 @@ or method allows the resources to be freed. Unlike the class, this will always happen immediately since there is no reference count to indicate that other threads are using this handle. Therefore, you must employ a synchronization mechanism to ensure it is safe to call the method. Although most classes that use the class do not need to provide a finalizer, this is sometimes necessary (for example, to flush out file buffers or to write some data back into memory). In this case, the class can provide a finalizer that is guaranteed to run before the critical finalizer runs. + Calling the or method allows the resources to be freed. Unlike the class, this will always happen immediately since there is no reference count to indicate that other threads are using this handle. Therefore, you must employ a synchronization mechanism to ensure it is safe to call the method. Although most classes that use the class do not need to provide a finalizer, this is sometimes necessary (for example, to flush out file buffers or to write some data back into memory). In this case, the class can provide a finalizer that is guaranteed to run before the critical finalizer runs. - Call the or method when you are finished using the object. The method leaves the object in an unusable state. + Call the or method when you are finished using the object. The method leaves the object in an unusable state. - **Note** Always call or before you release your last reference to the object. Otherwise, the resources it is using will not be freed until the garbage collector calls the object's method. + **Note** Always call or before you release your last reference to the object. Otherwise, the resources it is using will not be freed until the garbage collector calls the object's method. ]]> @@ -306,11 +306,11 @@ or method allows the resources to be freed. Unlike the class, this will always happen immediately since there is no reference count to indicate that other threads are using this handle. Therefore, you must employ a synchronization mechanism to ensure it is safe to call the method. Although most classes that use the class do not need to provide a finalizer, this is sometimes necessary (for example, to flush out file buffers or to write some data back into memory). In this case, the class can provide a finalizer that is guaranteed to run before the critical finalizer runs. + Calling the or method allows the resources to be freed. Unlike the class, this will always happen immediately since there is no reference count to indicate that other threads are using this handle. Therefore, you must employ a synchronization mechanism to ensure it is safe to call the method. Although most classes that use the class do not need to provide a finalizer, this is sometimes necessary (for example, to flush out file buffers or to write some data back into memory). In this case, the class can provide a finalizer that is guaranteed to run before the critical finalizer runs. - Call the or method when you are finished using the object. The method leaves the object in an unusable state. + Call the or method when you are finished using the object. The method leaves the object in an unusable state. - **Note** Always call the or method before you release your last reference to the object. Otherwise, the resources it is using will not be freed until the garbage collector calls the object's method. + **Note** Always call the or method before you release your last reference to the object. Otherwise, the resources it is using will not be freed until the garbage collector calls the object's method. ]]> @@ -381,7 +381,7 @@ method with the `disposing` parameter set to `false`. + You should never explicitly call the method with the `disposing` parameter set to `false`. ]]> @@ -448,7 +448,7 @@ method is the destructor for the class. Application code should not call this method directly. + The method is the destructor for the class. Application code should not call this method directly. ]]> @@ -569,11 +569,11 @@ method returns a value indicating whether the object's handle is no longer associated with a native resource. This differs from the definition of the property, which computes whether a given handle is always considered invalid. The method returns a `true` value in the following cases: + The method returns a value indicating whether the object's handle is no longer associated with a native resource. This differs from the definition of the property, which computes whether a given handle is always considered invalid. The method returns a `true` value in the following cases: -- The method was called. +- The method was called. -- The method or method was called and there are no references to the object on other threads. +- The method or method was called and there are no references to the object on other threads. ]]> @@ -706,13 +706,13 @@ method is guaranteed to be called only once, provided that you employ proper synchronization mechanisms to ensure that only one call to the or method is made. The method will not be called if the or property is `true`. Implement this method in your derived classes to execute any code that is required to free the handle. Because one of the functions of is to guarantee prevention of resource leaks, the code in your implementation of must never fail. The garbage collector calls after normal finalizers have been run for objects that were garbage collected at the same time, and guarantees the resources to invoke it and that it will not be interrupted while it is in progress. This method will be prepared as a constrained execution region (CER) at instance construction time (along with all the methods in its statically determinable call graph). Although this prevents thread abort interrupts, you must still be careful not to introduce any fault paths in your overridden method. In particular, apply the attribute to any methods you call from . In most cases this code should be: + The method is guaranteed to be called only once, provided that you employ proper synchronization mechanisms to ensure that only one call to the or method is made. The method will not be called if the or property is `true`. Implement this method in your derived classes to execute any code that is required to free the handle. Because one of the functions of is to guarantee prevention of resource leaks, the code in your implementation of must never fail. The garbage collector calls after normal finalizers have been run for objects that were garbage collected at the same time, and guarantees the resources to invoke it and that it will not be interrupted while it is in progress. This method will be prepared as a constrained execution region (CER) at instance construction time (along with all the methods in its statically determinable call graph). Although this prevents thread abort interrupts, you must still be careful not to introduce any fault paths in your overridden method. In particular, apply the attribute to any methods you call from . In most cases this code should be: `ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)` Additionally, for simple cleanup (for example, calling the Windows API `CloseHandle` on a file handle) you can check the return value for the single platform invoke call. For complex cleanup, you may have a lot of program logic and many method calls, some of which might fail. You must ensure that your program logic has fallback code for each of those cases. - If the method returns `false` for any reason, it generates a [releaseHandleFailed](/dotnet/framework/debug-trace-profile/releasehandlefailed-mda) Managed Debugging Assistant. + If the method returns `false` for any reason, it generates a [releaseHandleFailed](/dotnet/framework/debug-trace-profile/releasehandlefailed-mda) Managed Debugging Assistant. ]]> @@ -780,7 +780,7 @@ method only if you need to support a pre-existing handle (for example, if the handle is returned in a structure) because the .NET Framework COM interop infrastructure does not support marshaling handles in a structure. + Use the method only if you need to support a pre-existing handle (for example, if the handle is returned in a structure) because the .NET Framework COM interop infrastructure does not support marshaling handles in a structure. ]]> @@ -843,9 +843,9 @@ method only when you know that your handle is invalid and you want to mark it as such. Doing so does not change the value of the field; it only marks the handle as invalid. The handle might then contain a potentially stale value. The effect of this call is that no attempt is made to free the resources. + Call the method only when you know that your handle is invalid and you want to mark it as such. Doing so does not change the value of the field; it only marks the handle as invalid. The handle might then contain a potentially stale value. The effect of this call is that no attempt is made to free the resources. - As with the method, use only if you need to support a pre-existing handle. + As with the method, use only if you need to support a pre-existing handle. ]]> diff --git a/xml/System.Runtime.InteropServices/DllImportAttribute.xml b/xml/System.Runtime.InteropServices/DllImportAttribute.xml index e161f8eca62..5f9094e804c 100644 --- a/xml/System.Runtime.InteropServices/DllImportAttribute.xml +++ b/xml/System.Runtime.InteropServices/DllImportAttribute.xml @@ -622,11 +622,11 @@ For additional information about using the platform invoke service to access fun `true` to indicate that the callee will set an error via `SetLastError` on Windows or `errno` on other platforms; otherwise, `false`. The default is `false`. If this field is set to `true`, the runtime marshaler calls `GetLastError` or `errno` and caches the value returned to prevent it from being overwritten by other API calls. - You can retrieve the error code by calling on .NET 6.0 and above - or on .NET 5 and below or .NET Framework. + You can retrieve the error code by calling on .NET 6.0 and above + or on .NET 5 and below or .NET Framework. On .NET, the error information is cleared (set to `0`) before invoking the callee when this field is set to `true`. On .NET Framework, the error information is not cleared. - This means that error information returned by and + This means that error information returned by and on .NET represents only the error information from the last p/invoke with set to `true`. On .NET Framework, the error information can persist from one p/invoke to the next. diff --git a/xml/System.Runtime.InteropServices/ExporterEventKind.xml b/xml/System.Runtime.InteropServices/ExporterEventKind.xml index 49ee13ab78d..d17d0855b9b 100644 --- a/xml/System.Runtime.InteropServices/ExporterEventKind.xml +++ b/xml/System.Runtime.InteropServices/ExporterEventKind.xml @@ -28,11 +28,11 @@ Describes the callbacks that the type library exporter makes when exporting a type library. - method of an object which implements the interface. The value passed identifies the specific kind of event being reported. - + method of an object which implements the interface. The value passed identifies the specific kind of event being reported. + ]]> diff --git a/xml/System.Runtime.InteropServices/ExtensibleClassFactory.xml b/xml/System.Runtime.InteropServices/ExtensibleClassFactory.xml index 45e808af046..a5c8136fa88 100644 --- a/xml/System.Runtime.InteropServices/ExtensibleClassFactory.xml +++ b/xml/System.Runtime.InteropServices/ExtensibleClassFactory.xml @@ -25,20 +25,20 @@ Enables customization of managed objects that extend from unmanaged objects during creation. - method must be called in the `static` initializer of the class that is extending the RCW. Only one object creation callback is permitted per object type. When the extensible RCW is activated, the callback is registered. When the underlying COM object needs to be created, the callback is called to provide a reference to the object. The callback must return an `IUnknown` interface pointer for the base object. - - - -## Examples - Registers a `delegate` that will be called whenever an instance of a managed type that extends from an unmanaged type needs to allocate the aggregated unmanaged object. This `delegate` is expected to allocate and aggregate the unmanaged object and is called in place of a `CoCreateInstance`. This routine must be called in the context of the `static` initializer for the class for which the callbacks will be made. - + method must be called in the `static` initializer of the class that is extending the RCW. Only one object creation callback is permitted per object type. When the extensible RCW is activated, the callback is registered. When the underlying COM object needs to be created, the callback is called to provide a reference to the object. The callback must return an `IUnknown` interface pointer for the base object. + + + +## Examples + Registers a `delegate` that will be called whenever an instance of a managed type that extends from an unmanaged type needs to allocate the aggregated unmanaged object. This `delegate` is expected to allocate and aggregate the unmanaged object and is called in place of a `CoCreateInstance`. This routine must be called in the context of the `static` initializer for the class for which the callbacks will be made. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_Classic/classic ExtensibleClassFactory Example/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/ExtensibleClassFactory/Overview/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/ExtensibleClassFactory/Overview/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/ExtensibleClassFactory/Overview/source.vb" id="Snippet1"::: + ]]> @@ -73,13 +73,13 @@ A that is called in place of . Registers a that is called when an instance of a managed type, that extends from an unmanaged type, needs to allocate the aggregated unmanaged object. - diff --git a/xml/System.Runtime.InteropServices/ExternalException.xml b/xml/System.Runtime.InteropServices/ExternalException.xml index d1a571874ad..8c8e0837c4f 100644 --- a/xml/System.Runtime.InteropServices/ExternalException.xml +++ b/xml/System.Runtime.InteropServices/ExternalException.xml @@ -68,7 +68,7 @@ `ExternalException` uses the HRESULT E_FAIL, which has the value 0x80004005. - `ExternalException` uses the default implementation, which supports reference equality. + `ExternalException` uses the default implementation, which supports reference equality. For a list of initial values for an instance of `ExternalException`, see the `ExternalException` constructors. @@ -131,8 +131,8 @@ |Property|Value| |--------------|-----------| -||A null reference (`Nothing` in Visual Basic).| -||A localized error message string.| +||A null reference (`Nothing` in Visual Basic).| +||A localized error message string.| ]]> @@ -186,8 +186,8 @@ |Property|Value| |--------------|-----------| -||A null reference (`Nothing` in Visual Basic).| -||The error message string.| +||A null reference (`Nothing` in Visual Basic).| +||The error message string.| ]]> @@ -312,8 +312,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> @@ -371,9 +371,9 @@ |Property|Value| |--------------|-----------| -||The HRESULT of the error.| -||A null reference (`Nothing` in Visual Basic).| -||The error message string.| +||The HRESULT of the error.| +||A null reference (`Nothing` in Visual Basic).| +||The error message string.| ]]> diff --git a/xml/System.Runtime.InteropServices/GCHandle.xml b/xml/System.Runtime.InteropServices/GCHandle.xml index 346c2002251..387cf7c8fc2 100644 --- a/xml/System.Runtime.InteropServices/GCHandle.xml +++ b/xml/System.Runtime.InteropServices/GCHandle.xml @@ -83,23 +83,23 @@ Provides a way to access a managed object from unmanaged memory. - structure is used with the enumeration to create a handle corresponding to any managed object. This handle can be one of four types: `Weak`, `WeakTrackResurrection`, `Normal`, or `Pinned`. When the handle has been allocated, you can use it to prevent the managed object from being collected by the garbage collector when an unmanaged client holds the only reference. Without such a handle, the object can be collected by the garbage collector before completing its work on behalf of the unmanaged client. - - You can also use to create a pinned object that returns a memory address to prevent the garbage collector from moving the object in memory. - - When the handle goes out of scope you must explicitly release it by calling the method; otherwise, memory leaks may occur. When you free a pinned handle, the associated object will be unpinned and will become eligible for garbage collection, if there are no other references to it. - - - -## Examples - The following example shows an `App` class that creates a handle to a managed object using the `GCHandle.Alloc` method, which prevents the managed object from being collected. A call to the `EnumWindows` method passes a delegate and a managed object (both declared as managed types, but not shown), and casts the handle to an . The unmanaged function passes the type back to the caller as a parameter of the callback function. - + structure is used with the enumeration to create a handle corresponding to any managed object. This handle can be one of four types: `Weak`, `WeakTrackResurrection`, `Normal`, or `Pinned`. When the handle has been allocated, you can use it to prevent the managed object from being collected by the garbage collector when an unmanaged client holds the only reference. Without such a handle, the object can be collected by the garbage collector before completing its work on behalf of the unmanaged client. + + You can also use to create a pinned object that returns a memory address to prevent the garbage collector from moving the object in memory. + + When the handle goes out of scope you must explicitly release it by calling the method; otherwise, memory leaks may occur. When you free a pinned handle, the associated object will be unpinned and will become eligible for garbage collection, if there are no other references to it. + + + +## Examples + The following example shows an `App` class that creates a handle to a managed object using the `GCHandle.Alloc` method, which prevents the managed object from being collected. A call to the `EnumWindows` method passes a delegate and a managed object (both declared as managed types, but not shown), and casts the handle to an . The unmanaged function passes the type back to the caller as a parameter of the callback function. + :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/GCHandle/Overview/sample.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/GCHandle/Overview/sample.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/GCHandle/Overview/sample.vb" id="Snippet1"::: + ]]> @@ -168,13 +168,13 @@ Retrieves the address of object data in a handle. The address of the pinned data object. - The handle is any type other than . @@ -254,19 +254,19 @@ Allocates a handle for the specified object. A new that protects the object from garbage collection. This must be released with when it is no longer needed. - handles are opaque, which means that you cannot resolve the address of the object it contains through the handle. - - - -## Examples - The following example shows an `App` class that creates a handle to a managed object using the `GCHandle.Alloc` method, which prevents the managed object from being collected. A call to the `EnumWindows` method passes a delegate and a managed object (both declared as managed types, but not shown), and casts the handle to an . The unmanaged function passes the type back to the caller as a parameter of the callback function. - + handles are opaque, which means that you cannot resolve the address of the object it contains through the handle. + + + +## Examples + The following example shows an `App` class that creates a handle to a managed object using the `GCHandle.Alloc` method, which prevents the managed object from being collected. A call to the `EnumWindows` method passes a delegate and a managed object (both declared as managed types, but not shown), and casts the handle to an . The unmanaged function passes the type back to the caller as a parameter of the callback function. + :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/GCHandle/Overview/sample.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/GCHandle/Overview/sample.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/GCHandle/Overview/sample.vb" id="Snippet1"::: + ]]> @@ -404,11 +404,11 @@ if the specified object is equal to the current object; otherwise, . - objects are equal if they point to the same memory handle. - + objects are equal if they point to the same memory handle. + ]]> @@ -516,19 +516,19 @@ Releases a . - is called only once. - - - -## Examples - The following example shows an `App` class that creates a handle to a managed object using the `GCHandle.Alloc` method, which prevents the managed object from being collected. A call to the `EnumWindows` method passes a delegate and a managed object (both declared as managed types, but not shown), and casts the handle to an . The unmanaged function passes the type back to the caller as a parameter of the callback function. - + is called only once. + + + +## Examples + The following example shows an `App` class that creates a handle to a managed object using the `GCHandle.Alloc` method, which prevents the managed object from being collected. A call to the `EnumWindows` method passes a delegate and a managed object (both declared as managed types, but not shown), and casts the handle to an . The unmanaged function passes the type back to the caller as a parameter of the callback function. + :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/GCHandle/Overview/sample.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/GCHandle/Overview/sample.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/GCHandle/Overview/sample.vb" id="Snippet1"::: + ]]> The handle was freed or never initialized. @@ -591,14 +591,14 @@ Returns a new object created from a handle to a managed object. A new object that corresponds to the value parameter. - object. The unmanaged function passes the type back to the caller as a parameter of the callback function. - + object. The unmanaged function passes the type back to the caller as a parameter of the callback function. + :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/GCHandle/Overview/sample.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/GCHandle/Overview/sample.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/GCHandle/Overview/sample.vb" id="Snippet1"::: + ]]> The value of the parameter is . @@ -659,11 +659,11 @@ Returns an identifier for the current object. An identifier for the current object. - method returns an integer representation of the internal memory handle encapsulated by the structure. - + method returns an integer representation of the internal memory handle encapsulated by the structure. + ]]> @@ -723,11 +723,11 @@ if the handle is allocated; otherwise, . - was called on this , or if this is not initialized, the handle is not allocated and this property returns `false`. - + ]]> @@ -787,7 +787,7 @@ if the and parameters are equal; otherwise, . - .]]> + .]]> @@ -863,11 +863,11 @@ A is stored using an internal integer representation. The stored object using an internal integer representation. - from an integer value. - + from an integer value. + ]]> @@ -925,11 +925,11 @@ A is stored using an internal integer representation. The integer value. - . - + . + ]]> @@ -989,7 +989,7 @@ if the and parameters are not equal; otherwise, . - .]]> + .]]> @@ -1056,14 +1056,14 @@ Gets or sets the object this handle represents. The object this handle represents. - . The unmanaged function passes the type back to the caller as a parameter of the callback function. - + . The unmanaged function passes the type back to the caller as a parameter of the callback function. + :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/GCHandle/Overview/sample.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/GCHandle/Overview/sample.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/GCHandle/Overview/sample.vb" id="Snippet1"::: + ]]> The handle was freed, or never initialized. @@ -1121,14 +1121,14 @@ Returns the internal integer representation of a object. An object that represents a object. - object. The unmanaged function passes the type back to the caller as a parameter of the callback function. - + object. The unmanaged function passes the type back to the caller as a parameter of the callback function. + :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/GCHandle/Overview/sample.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/GCHandle/Overview/sample.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/GCHandle/Overview/sample.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Runtime.InteropServices/HandleRef.xml b/xml/System.Runtime.InteropServices/HandleRef.xml index a07655dfe71..514800acd2c 100644 --- a/xml/System.Runtime.InteropServices/HandleRef.xml +++ b/xml/System.Runtime.InteropServices/HandleRef.xml @@ -70,7 +70,7 @@ If you use platform invoke to call a managed object, and the object is not referenced elsewhere after the platform invoke call, it is possible for the garbage collector to finalize the managed object. This action releases the resource and invalidates the handle, causing the platform invoke call to fail. Wrapping a handle with guarantees that the managed object is not garbage collected until the platform invoke call completes. For a description of platform invoke services, see [Consuming Unmanaged DLL Functions](/dotnet/framework/interop/consuming-unmanaged-dll-functions). - The value type, like , is a special type recognized by the interop marshaler. A normal, nonpinned also prevents untimely garbage collection, yet provides better performance. Although using to keep an object alive for the duration of a platform invoke call is preferred, you can also use the method for the same purpose. + The value type, like , is a special type recognized by the interop marshaler. A normal, nonpinned also prevents untimely garbage collection, yet provides better performance. Although using to keep an object alive for the duration of a platform invoke call is preferred, you can also use the method for the same purpose. The constructor takes two parameters: an representing the wrapper, and an representing the unmanaged handle. The interop marshaler passes only the handle to unmanaged code, and guarantees that the wrapper (passed as the first parameter to the constructor of the `HandleRef`) remains alive for the duration of the call. diff --git a/xml/System.Runtime.InteropServices/ICustomFactory.xml b/xml/System.Runtime.InteropServices/ICustomFactory.xml index 0c4f03c3bb6..d8f9150d8de 100644 --- a/xml/System.Runtime.InteropServices/ICustomFactory.xml +++ b/xml/System.Runtime.InteropServices/ICustomFactory.xml @@ -50,11 +50,11 @@ Enables users to write activation code for managed objects that extend . - class with the . When the class is activated, the proxy's method is called by the common language runtime to activate the class. - + class with the . When the class is activated, the proxy's method is called by the common language runtime to activate the class. + ]]> @@ -103,11 +103,11 @@ Creates a new instance of the specified type. A associated with the specified type. - diff --git a/xml/System.Runtime.InteropServices/IRegistrationServices.xml b/xml/System.Runtime.InteropServices/IRegistrationServices.xml index c0c3e6331e5..165b40f51a1 100644 --- a/xml/System.Runtime.InteropServices/IRegistrationServices.xml +++ b/xml/System.Runtime.InteropServices/IRegistrationServices.xml @@ -26,11 +26,11 @@ Provides a set of services for registering and unregistering managed assemblies for use from COM. - @@ -159,29 +159,29 @@ if contains types that were successfully registered; otherwise if the assembly contains no eligible types. - to get an assembly. - + to get an assembly. + ]]> is . - The full name of is . - - -or- - - A method marked with is not . - - -or- - - There is more than one method marked with at a given level of the hierarchy. - - -or- - + The full name of is . + + -or- + + A method marked with is not . + + -or- + + There is more than one method marked with at a given level of the hierarchy. + + -or- + The signature of the method marked with is not valid. @@ -217,11 +217,11 @@ GUID used to register the specified type. Registers the specified type with COM using the specified GUID. - @@ -320,27 +320,27 @@ if contains types that were successfully unregistered; otherwise if the assembly contains no eligible types. - . This method also calls any unregistration functions found in the assembly. - + . This method also calls any unregistration functions found in the assembly. + ]]> is . - The full name of is . - - -or- - - A method marked with is not . - - -or- - - There is more than one method marked with at a given level of the hierarchy. - - -or- - + The full name of is . + + -or- + + A method marked with is not . + + -or- + + There is more than one method marked with at a given level of the hierarchy. + + -or- + The signature of the method marked with is not valid. diff --git a/xml/System.Runtime.InteropServices/ITypeLibExporterNameProvider.xml b/xml/System.Runtime.InteropServices/ITypeLibExporterNameProvider.xml index 9ef34249ead..d22cbd93a4f 100644 --- a/xml/System.Runtime.InteropServices/ITypeLibExporterNameProvider.xml +++ b/xml/System.Runtime.InteropServices/ITypeLibExporterNameProvider.xml @@ -30,11 +30,11 @@ Provides control over the casing of names when exported to a type library. - . You then pass this object as the last parameter to . - + . You then pass this object as the last parameter to . + ]]> @@ -61,11 +61,11 @@ Returns a list of names to control the casing of. An array of strings, where each element contains the name of a type to control casing for. - diff --git a/xml/System.Runtime.InteropServices/ImporterEventKind.xml b/xml/System.Runtime.InteropServices/ImporterEventKind.xml index 48c75221e2b..2b8da0306d0 100644 --- a/xml/System.Runtime.InteropServices/ImporterEventKind.xml +++ b/xml/System.Runtime.InteropServices/ImporterEventKind.xml @@ -28,11 +28,11 @@ Describes the callbacks that the type library importer makes when importing a type library. - method of an object which implements the interface. The value passed identifies the specific kind of event being reported. - + method of an object which implements the interface. The value passed identifies the specific kind of event being reported. + ]]> diff --git a/xml/System.Runtime.InteropServices/InvalidComObjectException.xml b/xml/System.Runtime.InteropServices/InvalidComObjectException.xml index 8a355487b1e..a257f801e87 100644 --- a/xml/System.Runtime.InteropServices/InvalidComObjectException.xml +++ b/xml/System.Runtime.InteropServices/InvalidComObjectException.xml @@ -76,7 +76,7 @@ . + An `InvalidComObjectException` is thrown when an invalid COM object is used. This happens when the `__ComObject` type is used directly, without having a backing class factory. For more information, see . `InvalidComObjectException` uses the HRESULT COR_E_INVALIDCOMOBJECT, which has the value 0x80131527. @@ -148,8 +148,8 @@ |Property Type|Value| |-------------------|-----------| -||`null`.| -||A localized error message string.| +||`null`.| +||A localized error message string.| ]]> @@ -208,8 +208,8 @@ |Property Type|Value| |-------------------|-----------| -||`null`.| -||`message`| +||`null`.| +||`message`| ]]> @@ -341,8 +341,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]>
diff --git a/xml/System.Runtime.InteropServices/InvalidOleVariantTypeException.xml b/xml/System.Runtime.InteropServices/InvalidOleVariantTypeException.xml index dec18e7471c..a86aeca2fe7 100644 --- a/xml/System.Runtime.InteropServices/InvalidOleVariantTypeException.xml +++ b/xml/System.Runtime.InteropServices/InvalidOleVariantTypeException.xml @@ -146,8 +146,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||A localized error message string.| +||`null`.| +||A localized error message string.| ]]>
@@ -206,8 +206,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||`message`| +||`null`.| +||`message`| ]]>
@@ -339,8 +339,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> diff --git a/xml/System.Runtime.InteropServices/Marshal.xml b/xml/System.Runtime.InteropServices/Marshal.xml index 9d907a37b1e..4c9cd6e1e11 100644 --- a/xml/System.Runtime.InteropServices/Marshal.xml +++ b/xml/System.Runtime.InteropServices/Marshal.xml @@ -70,7 +70,7 @@ class are essential to working with unmanaged code. Most methods defined in this class are typically used by developers who want to provide a bridge between the managed and unmanaged programming models. For example, the method copies ANSI characters from a specified string (in the managed heap) to a buffer in the unmanaged heap. It also allocates the target heap of the right size. + The `static` methods defined on the class are essential to working with unmanaged code. Most methods defined in this class are typically used by developers who want to provide a bridge between the managed and unmanaged programming models. For example, the method copies ANSI characters from a specified string (in the managed heap) to a buffer in the unmanaged heap. It also allocates the target heap of the right size. The common language runtime provides specific marshaling capabilities. For details on marshaling behavior, see [Interop Marshaling](/dotnet/framework/interop/interop-marshaling). @@ -151,9 +151,9 @@ , you must decrement the reference count by using a method such as . Do not rely on the return value of , as it can sometimes be unstable. + The common language runtime manages the reference count of a COM object for you, making it unnecessary to use this method directly. In rare cases, such as testing a custom marshaler, you might find it necessary to manipulate an object's lifetime manually. After calling , you must decrement the reference count by using a method such as . Do not rely on the return value of , as it can sometimes be unstable. - You can call , , or to obtain an value that represents an [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) interface pointer. You can also use these methods and the method on managed objects to obtain the COM interfaces represented by the managed object's COM callable wrapper. If you are not familiar with the details of this wrapper type, see [COM Callable Wrapper](/dotnet/framework/interop/com-callable-wrapper). + You can call , , or to obtain an value that represents an [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) interface pointer. You can also use these methods and the method on managed objects to obtain the COM interfaces represented by the managed object's COM callable wrapper. If you are not familiar with the details of this wrapper type, see [COM Callable Wrapper](/dotnet/framework/interop/com-callable-wrapper). ]]> @@ -223,7 +223,7 @@ is one of two memory allocation API methods in the class. ( is the other.) The initial memory content returned is undefined, and the allocated memory can be larger than the requested number of bytes. This method exposes the COM [CoTaskMemAlloc](https://go.microsoft.com/fwlink/?LinkId=148626) function, which is referred to as the COM task memory allocator. + is one of two memory allocation API methods in the class. ( is the other.) The initial memory content returned is undefined, and the allocated memory can be larger than the requested number of bytes. This method exposes the COM [CoTaskMemAlloc](https://go.microsoft.com/fwlink/?LinkId=148626) function, which is referred to as the COM task memory allocator. ]]> @@ -309,16 +309,16 @@ ## Remarks > [!IMPORTANT] -> This native memory allocator is a legacy API that should be used exclusively when called for by specific Win32 APIs on the Windows platform. When targeting .NET 6 or later, use the class on all platforms to allocate native memory. When targeting .NET Framework, use on all platforms to allocate native memory. +> This native memory allocator is a legacy API that should be used exclusively when called for by specific Win32 APIs on the Windows platform. When targeting .NET 6 or later, use the class on all platforms to allocate native memory. When targeting .NET Framework, use on all platforms to allocate native memory. - is one of two memory allocation methods in the class. ( is the other.) This method exposes the Win32 [LocalAlloc](https://go.microsoft.com/fwlink/?LinkId=148628) function from Kernel32.dll. + is one of two memory allocation methods in the class. ( is the other.) This method exposes the Win32 [LocalAlloc](https://go.microsoft.com/fwlink/?LinkId=148628) function from Kernel32.dll. - When calls `LocalAlloc`, it passes a `LMEM_FIXED` flag, which causes the allocated memory to be locked in place. Also, the allocated memory is not zero-filled. + When calls `LocalAlloc`, it passes a `LMEM_FIXED` flag, which causes the allocated memory to be locked in place. Also, the allocated memory is not zero-filled. ## Examples - The following example demonstrates calling the method. This code example is part of a larger example provided for the class. + The following example demonstrates calling the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Marshal/cpp/marshal.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/Overview/Marshal.cs" id="Snippet4"::: @@ -394,13 +394,13 @@ ## Remarks > [!IMPORTANT] -> This native memory allocator is a legacy API that should be used exclusively when called for by specific Win32 APIs on the Windows platform. When targeting .NET 6 or later, use the class on all platforms to allocate native memory. When targeting .NET Framework, use on all platforms to allocate native memory. +> This native memory allocator is a legacy API that should be used exclusively when called for by specific Win32 APIs on the Windows platform. When targeting .NET 6 or later, use the class on all platforms to allocate native memory. When targeting .NET Framework, use on all platforms to allocate native memory. - is one of two memory allocation methods in the class. ( is the other.) This method exposes the Win32 [LocalAlloc](https://go.microsoft.com/fwlink/?LinkID=148628) function from Kernel32.dll. + is one of two memory allocation methods in the class. ( is the other.) This method exposes the Win32 [LocalAlloc](https://go.microsoft.com/fwlink/?LinkID=148628) function from Kernel32.dll. - When calls `LocalAlloc`, it passes a `LMEM_FIXED` flag, which causes the allocated memory to be locked in place. Also, the allocated memory is not zero-filled. + When calls `LocalAlloc`, it passes a `LMEM_FIXED` flag, which causes the allocated memory to be locked in place. Also, the allocated memory is not zero-filled. - For example code, see and . + For example code, see and . ]]> @@ -465,7 +465,7 @@ ## Remarks If there are a lot of references between managed and native code with deep dependency graphs it can take a long time for all the objects to clean up. Each time a GC runs it will free up some number of RCWs, which will in turn release the underlying COM objects. Those COM objects will then release their managed references and make more objects available for cleanup the next time a GC runs, which starts the process over again. - The method provides a way for the application to determine how many cycles of GC.Collect and GC.WaitForPendingFinalizers need to happen in order to clean everything up. + The method provides a way for the application to determine how many cycles of GC.Collect and GC.WaitForPendingFinalizers need to happen in order to clean everything up. ]]> @@ -532,7 +532,7 @@ exposes the COM `BindToMoniker` method, which produces an object that you can cast to any COM interface you require. This method provides the same functionality as the `GetObject` method in Visual Basic 6.0 and Visual Basic 2005. + exposes the COM `BindToMoniker` method, which produces an object that you can cast to any COM interface you require. This method provides the same functionality as the `GetObject` method in Visual Basic 6.0 and Visual Basic 2005. ]]> @@ -598,7 +598,7 @@ is used for object pooling functionality and should never be called by user code directly. + is used for object pooling functionality and should never be called by user code directly. ]]> @@ -657,9 +657,9 @@ To solve this problem: -1. Use the method to turn off automatic cleanup of RCWs, and the message pumping that occurs, on a per-thread basis. This allows developers to opt out of automatic clean-up, and the corresponding message pumping. +1. Use the method to turn off automatic cleanup of RCWs, and the message pumping that occurs, on a per-thread basis. This allows developers to opt out of automatic clean-up, and the corresponding message pumping. -2. Use the method to notify the runtime to clean up all RCWs that are allocated in the current context. This companion method allows developers to precisely control when the runtime performs cleanup in the current context. +2. Use the method to notify the runtime to clean up all RCWs that are allocated in the current context. This companion method allows developers to precisely control when the runtime performs cleanup in the current context. ]]> @@ -747,7 +747,7 @@ ## Examples - The following example copies an array to unmanaged memory by using the overload, and then copies the unmanaged array back to managed memory by using the overload. + The following example copies an array to unmanaged memory by using the overload, and then copies the unmanaged array back to managed memory by using the overload. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/Copy/sample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/Copy/sample.vb" id="Snippet1"::: @@ -1707,7 +1707,7 @@ method. + Unmanaged, C-style arrays do not contain bounds information, which prevents the `startIndex` and `length` parameters from being validated. Therefore, the unmanaged data that corresponds to the `source` parameter populates the managed array regardless of its usefulness. You must initialize the managed array with the appropriate size before calling the method. ]]> @@ -2001,7 +2001,7 @@ method aggregates the inner managed pointer of a managed object with the specified outer pointer, and then returns an inner [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) pointer of the managed object. + The method aggregates the inner managed pointer of a managed object with the specified outer pointer, and then returns an inner [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) pointer of the managed object. ]]> @@ -2076,7 +2076,7 @@ method aggregates the inner managed pointer of a managed object of a specified type with the specified outer pointer, and returns an inner [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) pointer of the managed object. + The method aggregates the inner managed pointer of a managed object of a specified type with the specified outer pointer, and returns an inner [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) pointer of the managed object. ]]> @@ -2164,7 +2164,7 @@ converts one COM class type, typically the base `__ComObject` type, to another COM class type. The input COM object, represented by parameter `o`, is a [Runtime Callable Wrapper (RCW)](/dotnet/framework/interop/runtime-callable-wrapper). + converts one COM class type, typically the base `__ComObject` type, to another COM class type. The input COM object, represented by parameter `o`, is a [Runtime Callable Wrapper (RCW)](/dotnet/framework/interop/runtime-callable-wrapper). Both the `t` and `o` parameters must be classes whose signatures are attributed with . The [Tlbimp.exe (Type Library Importer)](/dotnet/framework/tools/tlbimp-exe-type-library-importer) tool applies this attribute for you when it imports a type library. If you create the RCW manually in source code, you should apply this attribute to the managed signature that represents the original coclass to signify its COM origins. @@ -2262,7 +2262,7 @@ converts a COM object of type `T` to the `TWrapper` COM class type. The input COM object, represented by parameter `o`, is a [Runtime Callable Wrapper (RCW)](/dotnet/framework/interop/runtime-callable-wrapper). + converts a COM object of type `T` to the `TWrapper` COM class type. The input COM object, represented by parameter `o`, is a [Runtime Callable Wrapper (RCW)](/dotnet/framework/interop/runtime-callable-wrapper). Both the `T` generic type parameter and the `o` parameter must be classes whose signatures are attributed with the attribute. The [Tlbimp.exe (Type Library Importer)](/dotnet/framework/tools/tlbimp-exe-type-library-importer) tool applies this attribute for you when it imports a type library. If you create the RCW manually in source code, you should apply this attribute to the managed signature that represents the original coclass to signify its COM origins. @@ -2358,11 +2358,11 @@ method uses this method to prevent memory leaks when reusing memory occupied by a structure. + You can use this method to free reference-type fields, such as strings, of an unmanaged structure. Unlike its fields, a structure can be a value type or a reference type. Value-type structures that contain value-type fields (all blittable) have no references whose memory must be freed. The method uses this method to prevent memory leaks when reusing memory occupied by a structure. - calls the COM [SysFreeString](https://go.microsoft.com/fwlink/?LinkId=148633) function, which, in turn, frees an allocated string. + calls the COM [SysFreeString](https://go.microsoft.com/fwlink/?LinkId=148633) function, which, in turn, frees an allocated string. - In addition to , the class provides two other memory-deallocation methods: and . + In addition to , the class provides two other memory-deallocation methods: and . ]]> @@ -2433,9 +2433,9 @@ method uses this method to prevent memory leaks when reusing memory occupied by a structure. + You can use this method to free reference type fields, such as strings, of an unmanaged structure. Unlike its fields, a structure can be a value type or a reference type. Value type structures that contain value type fields (all blittable) have no references whose memory must be freed. The method uses this method to prevent memory leaks when reusing memory occupied by a structure. - calls the COM [SysFreeString](https://go.microsoft.com/fwlink/?LinkId=148633) function, which, in turn, frees an allocated string. + calls the COM [SysFreeString](https://go.microsoft.com/fwlink/?LinkId=148633) function, which, in turn, frees an allocated string. ]]> @@ -2504,7 +2504,7 @@ method releases the managed reference to a COM object. Calling this method is equivalent to calling the method in a loop until it returns 0 (zero). + The method releases the managed reference to a COM object. Calling this method is equivalent to calling the method in a loop until it returns 0 (zero). When the reference count on the COM object becomes 0, the COM object is usually freed, although this depends on the COM object's implementation and is beyond the control of the runtime. However, the RCW can still exist, waiting to be garbage-collected. @@ -2577,7 +2577,7 @@ and , you can use this method to deallocate memory. calls the COM [SysFreeString](https://go.microsoft.com/fwlink/?LinkID=148633) function, which frees memory allocated by any of the following unmanaged methods: `SysAllocString`, `SysAllocStringByteLen`, `SysAllocStringLen`, `SysReAllocString`, `SysReAllocStringLen`. You can call unmanaged methods such as these with platform invoke. For details, see [Consuming Unmanaged DLL Functions](/dotnet/framework/interop/consuming-unmanaged-dll-functions). + Like and , you can use this method to deallocate memory. calls the COM [SysFreeString](https://go.microsoft.com/fwlink/?LinkID=148633) function, which frees memory allocated by any of the following unmanaged methods: `SysAllocString`, `SysAllocStringByteLen`, `SysAllocStringLen`, `SysReAllocString`, `SysReAllocStringLen`. You can call unmanaged methods such as these with platform invoke. For details, see [Consuming Unmanaged DLL Functions](/dotnet/framework/interop/consuming-unmanaged-dll-functions). ]]> @@ -2642,11 +2642,11 @@ to free any memory allocated by , , or any equivalent unmanaged method. If the `ptr` parameter is `IntPtr.Zero`, the method does nothing. + You can use to free any memory allocated by , , or any equivalent unmanaged method. If the `ptr` parameter is `IntPtr.Zero`, the method does nothing. - exposes the COM [CoTaskMemFree](https://go.microsoft.com/fwlink/?LinkId=148638) function, which frees all bytes so that you can no longer use the memory that the `ptr` parameter points to. + exposes the COM [CoTaskMemFree](https://go.microsoft.com/fwlink/?LinkId=148638) function, which frees all bytes so that you can no longer use the memory that the `ptr` parameter points to. - In addition to , the class provides two other memory-deallocation methods: and . + In addition to , the class provides two other memory-deallocation methods: and . ]]> @@ -2718,18 +2718,18 @@ ## Remarks > [!IMPORTANT] -> This native memory allocator is a legacy API that should be used exclusively when called for by specific Win32 APIs on the Windows platform. When targeting .NET 6 or later, use the class on all platforms to allocate native memory. When targeting .NET Framework, use on all platforms to allocate native memory. +> This native memory allocator is a legacy API that should be used exclusively when called for by specific Win32 APIs on the Windows platform. When targeting .NET 6 or later, use the class on all platforms to allocate native memory. When targeting .NET Framework, use on all platforms to allocate native memory. - You can use to free any memory from the global heap allocated by , , or any equivalent unmanaged API method. If the `hglobal` parameter is the method does nothing. + You can use to free any memory from the global heap allocated by , , or any equivalent unmanaged API method. If the `hglobal` parameter is the method does nothing. - exposes the [LocalFree](https://go.microsoft.com/fwlink/?LinkId=148640) function from Kernel32.DLL, which frees all bytes so that you can no longer use the memory pointed to by `hglobal`. + exposes the [LocalFree](https://go.microsoft.com/fwlink/?LinkId=148640) function from Kernel32.DLL, which frees all bytes so that you can no longer use the memory pointed to by `hglobal`. - In addition to , the class provides two other memory-deallocation API methods: and . + In addition to , the class provides two other memory-deallocation API methods: and . ## Examples - The following example demonstrates calling the method. This code example is part of a larger example provided for the class. + The following example demonstrates calling the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Marshal/cpp/marshal.cpp" id="Snippet4"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/Overview/Marshal.cs" id="Snippet4"::: @@ -2798,7 +2798,7 @@ provides the same functionality as the property. + If the type has a GUID in the metadata, it is returned. Otherwise, a GUID is automatically generated. You can use this method to programmatically determine the COM GUID for any managed type, including COM-invisible types. Class interfaces are the only exception because they do not correspond to a managed type. provides the same functionality as the property. ]]> @@ -2917,7 +2917,7 @@ twice. The first call tries to retrieve a reference to an instance of Microsoft Word (an instance of the `Word.Application` object). The second call tries to retrieve a reference to an instance of Microsoft Excel (an instance of an `Excel.Application` object). +The example calls twice. The first call tries to retrieve a reference to an instance of Microsoft Word (an instance of the `Word.Application` object). The second call tries to retrieve a reference to an instance of Microsoft Excel (an instance of an `Excel.Application` object). The code retrieves a reference to an instance of Microsoft Word successfully. However, because Microsoft Excel is not running, the attempt to retrieve the second object raises a . @@ -3014,11 +3014,11 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho to decrement the reference count once you have finished with the pointer. You must adhere to the rules defined by COM when using raw COM interface pointers. + This method returns an interface pointer that represents the requested interface on the specified object. It is particularly useful if you have an unmanaged method that expects to be passed an interface pointer. Calling an object with this method causes the reference count to increment on the interface pointer before the pointer is returned. Always use to decrement the reference count once you have finished with the pointer. You must adhere to the rules defined by COM when using raw COM interface pointers. - is useful when calling a method that exposes a COM object parameter as an type, or with custom marshaling. Although less common, you can use this method on a managed object to obtain a pointer to the object's COM callable wrapper. For example, you can use on a managed object that is exported to COM to obtain an interface pointer for . You cannot obtain a pointer to a class interface since a class interface lacks the corresponding type to pass to the second parameter (`t`). Instead, use to invoke the members on the default interface of the COM callable wrapper, which is usually an auto-dispatch class interface. + is useful when calling a method that exposes a COM object parameter as an type, or with custom marshaling. Although less common, you can use this method on a managed object to obtain a pointer to the object's COM callable wrapper. For example, you can use on a managed object that is exported to COM to obtain an interface pointer for . You cannot obtain a pointer to a class interface since a class interface lacks the corresponding type to pass to the second parameter (`t`). Instead, use to invoke the members on the default interface of the COM callable wrapper, which is usually an auto-dispatch class interface. - The method overload allows query interface customization by default. To specify whether to apply query interface customization, use the method overload. + The method overload allows query interface customization by default. To specify whether to apply query interface customization, use the method overload. For additional information, see the [COM Callable Wrapper](/dotnet/framework/interop/com-callable-wrapper) and [Runtime Callable Wrapper](/dotnet/framework/interop/runtime-callable-wrapper) articles. @@ -3118,7 +3118,7 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho lets you specify whether to apply query interface customization. Use the overload to apply query interface customization by default. + lets you specify whether to apply query interface customization. Use the overload to apply query interface customization by default. ]]> @@ -3217,11 +3217,11 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho method to decrement the reference count when you have finished with the pointer. You must adhere to the rules defined by COM when using raw COM interface pointers. + This method returns an interface pointer that represents the `TInterface` interface on the specified object. It is particularly useful if you have an unmanaged method that expects to be passed an interface pointer. Calling an object with this method causes the reference count to increment on the interface pointer before the pointer is returned. Always use the method to decrement the reference count when you have finished with the pointer. You must adhere to the rules defined by COM when using raw COM interface pointers. - is useful when calling a method that exposes a COM object parameter as an type, or with custom marshaling. You can also use this method on a managed object to obtain a pointer to the object's COM callable wrapper, although this is less common. For example, you can use on a managed object that is exported to COM to obtain an interface pointer for . + is useful when calling a method that exposes a COM object parameter as an type, or with custom marshaling. You can also use this method on a managed object to obtain a pointer to the object's COM callable wrapper, although this is less common. For example, you can use on a managed object that is exported to COM to obtain an interface pointer for . - The method overload allows query interface customization by default. To specify whether to apply query interface customization, use the method overload. + The method overload allows query interface customization by default. To specify whether to apply query interface customization, use the method overload. For additional information, see the [COM Callable Wrapper](/dotnet/framework/interop/com-callable-wrapper) and [Runtime Callable Wrapper](/dotnet/framework/interop/runtime-callable-wrapper) articles. @@ -3281,7 +3281,7 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho except that it returns `null` if the caller is not in the same context as the object. It is particularly useful if you have an unmanaged method that expects to be passed an interface pointer. + This method is the same as except that it returns `null` if the caller is not in the same context as the object. It is particularly useful if you have an unmanaged method that expects to be passed an interface pointer. ]]> @@ -3371,7 +3371,7 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho retrieves. adds data to the hash table. You should never have to call either method from your code. + All COM objects wrapped in a [Runtime Callable Wrapper](/dotnet/framework/interop/runtime-callable-wrapper) have an associated hash table, which retrieves. adds data to the hash table. You should never have to call either method from your code. ]]> @@ -3430,9 +3430,9 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho provides the opposite functionality of . + The zero-based slot number returned by this method accounts for three [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) and possibly four [IDispatch](/windows/win32/api/oaidl/nn-oaidl-idispatch) methods, making the value of the first available slot either 3 or 7. provides the opposite functionality of . - You can use this method to retrieve slot numbers for members of interfaces that are not visible from COM and for members of private interfaces. The slot numbers returned correspond to the v-table numbers that would be reserved if the type was exposed to COM. COM-invisible members actually occupy a slot in an exposed v-table, even though the COM client cannot use the slot. You cannot use on a class interface by passing from a class. For additional information, see [Introducing the class interface](/dotnet/framework/interop/com-callable-wrapper#introducing-the-class-interface). + You can use this method to retrieve slot numbers for members of interfaces that are not visible from COM and for members of private interfaces. The slot numbers returned correspond to the v-table numbers that would be reserved if the type was exposed to COM. COM-invisible members actually occupy a slot in an exposed v-table, even though the COM client cannot use the slot. You cannot use on a class interface by passing from a class. For additional information, see [Introducing the class interface](/dotnet/framework/interop/com-callable-wrapper#introducing-the-class-interface). ]]> @@ -3517,11 +3517,11 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho and methods to marshal delegates in both directions. With , `ptr` is imported as a . A can be obtained for a managed delegate by calling and passed as a parameter; it can then be called from inside the unmanaged method. Note that the parameter marshaler can also marshal function pointers to delegates. + You can use the and methods to marshal delegates in both directions. With , `ptr` is imported as a . A can be obtained for a managed delegate by calling and passed as a parameter; it can then be called from inside the unmanaged method. Note that the parameter marshaler can also marshal function pointers to delegates. `ptr` is converted to a delegate that invokes the unmanaged method using [the default platform calling convention](/dotnet/standard/native-interop/calling-conventions#platform-default-calling-convention). You can set the calling convention by applying the to the delegate. - The method has the following restrictions: + The method has the following restrictions: - Generics are not supported in interop scenarios. - You can use this method only for pure unmanaged function pointers. @@ -3605,11 +3605,11 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho and methods to marshal delegates in both directions. + You can use the and methods to marshal delegates in both directions. `ptr` is converted to a delegate that invokes the unmanaged method using [the default platform calling convention](/dotnet/standard/native-interop/calling-conventions#platform-default-calling-convention). You can set the calling convention by applying the to the delegate. - The method has the following restrictions: + The method has the following restrictions: - Generics are not supported in interop scenarios. - You can use this method only for pure unmanaged function pointers. @@ -3675,7 +3675,7 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho and in conjunction with to pass slots within a specified range. For additional information, see [Introducing the class interface](/dotnet/framework/interop/com-callable-wrapper#introducing-the-class-interface). + This method returns the zero-based, v-table number for an interface or a class. When used on a class, the slot number returned refers to the class interface for the class. If the class interface is auto-dispatch, this method always returns -1 to indicate that the dispatch-only interface does not expose a v-table to managed clients. You can use and in conjunction with to pass slots within a specified range. For additional information, see [Introducing the class interface](/dotnet/framework/interop/com-callable-wrapper#introducing-the-class-interface). ]]> @@ -3746,7 +3746,7 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho is exposed for compiler support of structured exception handling (SEH) only. If this method is called before an exception is thrown, it returns 0x0. + is exposed for compiler support of structured exception handling (SEH) only. If this method is called before an exception is thrown, it returns 0x0. ]]> @@ -3824,7 +3824,7 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho method to get an based on an HRESULT without having to call the method and catch the exception. + Use the method to get an based on an HRESULT without having to call the method and catch the exception. The current [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) interface is used to construct the exception. @@ -3896,7 +3896,7 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho method to get an based on an HRESULT without having to call the method and catch the exception (thus avoiding the corresponding performance overhead). The `errorInfo` parameter supplies additional information about the error, such as its textual description and the globally unique identifier (GUID) for the interface that defined the error. + Use the method to get an based on an HRESULT without having to call the method and catch the exception (thus avoiding the corresponding performance overhead). The `errorInfo` parameter supplies additional information about the error, such as its textual description and the globally unique identifier (GUID) for the interface that defined the error. Use this method overload if you have custom error information that you have to supply in the conversion. @@ -4002,7 +4002,7 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho is exposed for compiler support of structured exception handling (SEH) only. + is exposed for compiler support of structured exception handling (SEH) only. ]]> @@ -4079,7 +4079,7 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho ## Remarks The delegate `d` is converted to a function pointer that can be passed to unmanaged code using [the default platform calling convention](/dotnet/standard/native-interop/calling-conventions#platform-default-calling-convention). You can set the calling convention by applying the to the delegate. - You must manually keep the delegate from being collected by the garbage collector from managed code. The garbage collector does not track references to unmanaged code. Use to prevent the delegate from being collected before the native call completes: + You must manually keep the delegate from being collected by the garbage collector from managed code. The garbage collector does not track references to unmanaged code. Use to prevent the delegate from being collected before the native call completes: ```csharp var callback = new MyNativeCallback(MyManagedMethod); @@ -4088,7 +4088,7 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho GC.KeepAlive(callback); // Prevent collection — fnPtr does not root the delegate. ``` - A P/Invoke that marshals a delegate handles the on the user's behalf: + A P/Invoke that marshals a delegate handles the on the user's behalf: ```csharp var callback = new MyNativeCallback(MyManagedMethod); @@ -4171,7 +4171,7 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho ## Remarks The delegate `d` is converted to a function pointer that can be passed to unmanaged code by using [the default platform calling convention](/dotnet/standard/native-interop/calling-conventions#platform-default-calling-convention). You can set the calling convention by applying the to the delegate. - You must manually keep the delegate from being collected by the garbage collector from managed code. The garbage collector does not track references to unmanaged code. Use to prevent the delegate from being collected before the native call completes: + You must manually keep the delegate from being collected by the garbage collector from managed code. The garbage collector does not track references to unmanaged code. Use to prevent the delegate from being collected before the native call completes: ```csharp var callback = new MyNativeCallback(MyManagedMethod); @@ -4180,7 +4180,7 @@ The code retrieves a reference to an instance of Microsoft Word successfully. Ho GC.KeepAlive(callback); // Prevent collection — fnPtr does not root the delegate. ``` -A P/Invoke that marshals a delegate handles the on the user's behalf: +A P/Invoke that marshals a delegate handles the on the user's behalf: ```csharp var callback = new MyNativeCallback(MyManagedMethod); @@ -4321,9 +4321,9 @@ A P/Invoke that marshals a delegate handles the on also sets up an [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) interface for the exception that can be obtained by calling the COM GetErrorInfoNEEDGUID function. You can use this function to return an HRESULT value on a managed class implementation of a COM interface where you apply the attribute. Have the attributed method catch all exceptions and use the method to return the appropriate HRESULT value. Allowing an exception to propagate outside the method produces incorrect behavior. (In fact, the common language runtime fails to pass an exception to a COM client that calls such a method through a v-table.) + also sets up an [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) interface for the exception that can be obtained by calling the COM GetErrorInfoNEEDGUID function. You can use this function to return an HRESULT value on a managed class implementation of a COM interface where you apply the attribute. Have the attributed method catch all exceptions and use the method to return the appropriate HRESULT value. Allowing an exception to propagate outside the method produces incorrect behavior. (In fact, the common language runtime fails to pass an exception to a COM client that calls such a method through a v-table.) - Note that the method sets the [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) interface of the current thread. This can cause unexpected results for methods like the methods that default to using the [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) of the current thread if it is set. + Note that the method sets the [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) interface of the current thread. This can cause unexpected results for methods like the methods that default to using the [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) of the current thread if it is set. ]]> @@ -4392,7 +4392,7 @@ A P/Invoke that marshals a delegate handles the on The target function must have had the `setLastError` metadata flag set. For example, the `SetLastError` field of the must be `true`. The process for setting this flag depends on the source language used: C# and C++ are `false` by default, but the `Declare` statement in Visual Basic is `true`. ## Examples - The following example demonstrates how to retrieve an HRESULT corresponding to a Win32 error code using the method. + The following example demonstrates how to retrieve an HRESULT corresponding to a Win32 error code using the method. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/GetHRForLastWin32Error/example.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/GetHRForLastWin32Error/example.vb" id="Snippet1"::: @@ -4458,7 +4458,7 @@ A P/Invoke that marshals a delegate handles the on is useful when calling a method that exposes a COM object parameter as an type, or with custom marshaling. Calling an object with this method causes the reference count to increment on the interface pointer before the pointer is returned. Always use to decrement the reference count once you have finished with the pointer. + In managed code, you seldom work directly with the `IDispatch` interface. However, is useful when calling a method that exposes a COM object parameter as an type, or with custom marshaling. Calling an object with this method causes the reference count to increment on the interface pointer before the pointer is returned. Always use to decrement the reference count once you have finished with the pointer. You can also use this method on a managed object to obtain an interface pointer to the COM callable wrapper for the object. For additional information, see [COM Callable Wrapper](/dotnet/framework/interop/com-callable-wrapper). @@ -4509,7 +4509,7 @@ A P/Invoke that marshals a delegate handles the on except that it returns `null` if the caller is not in the same context as the object. + This method is the same as except that it returns `null` if the caller is not in the same context as the object. ]]> @@ -4561,12 +4561,12 @@ A P/Invoke that marshals a delegate handles the on causes the reference count to increment on the interface pointer before the pointer is returned. Always use to decrement the reference count once you have finished with the pointer. You can apply the to replace standard interop marshaling behavior with this custom marshaler. + This method returns a pointer to an `ITypeInfo` implementation that is based on the original type. Calling an object with causes the reference count to increment on the interface pointer before the pointer is returned. Always use to decrement the reference count once you have finished with the pointer. You can apply the to replace standard interop marshaling behavior with this custom marshaler. ## Examples - The following example demonstrates how to retrieve a pointer to the `ITypeInfo` interface for a type using the method. + The following example demonstrates how to retrieve a pointer to the `ITypeInfo` interface for a type using the method. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/GetITypeInfoForType/example.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/GetITypeInfoForType/example.vb" id="Snippet1"::: @@ -4646,14 +4646,14 @@ A P/Invoke that marshals a delegate handles the on is useful when calling a method that exposes a COM object parameter as an type, or with custom marshaling. Calling an object with this method causes the reference count to increment on the interface pointer before the pointer is returned. Always use to decrement the reference count once you have finished with the pointer. This method provides the opposite functionality of the method. + In managed code, you seldom work directly with the `IUnknown` interface. However, is useful when calling a method that exposes a COM object parameter as an type, or with custom marshaling. Calling an object with this method causes the reference count to increment on the interface pointer before the pointer is returned. Always use to decrement the reference count once you have finished with the pointer. This method provides the opposite functionality of the method. You can also use this method on a managed object to obtain an interface pointer to the [COM Callable Wrapper](/dotnet/framework/interop/com-callable-wrapper) for the object. ## Examples - The following example demonstrates how to retrieve an [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) interface for a managed object using the method. + The following example demonstrates how to retrieve an [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) interface for a managed object using the method. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/GetIUnknownForObject/example.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/GetIUnknownForObject/example.vb" id="Snippet1"::: @@ -4703,12 +4703,12 @@ A P/Invoke that marshals a delegate handles the on except that it returns `null` if the caller is not in the same context as the object. + This method is the same as except that it returns `null` if the caller is not in the same context as the object. ## Examples - The following example demonstrates how to retrieve an `IUnknown` interface for a managed object using the method. + The following example demonstrates how to retrieve an `IUnknown` interface for a managed object using the method. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/GetIUnknownForObjectInContext/example.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/GetIUnknownForObjectInContext/example.vb" id="Snippet1"::: @@ -4761,16 +4761,16 @@ set to `true` or by a call to . +platform invoke usage, use . -This method is functionally equivalent to . It is -named to better reflect the intent of the API and its cross-platform nature. -should be preferred over . +This method is functionally equivalent to . It is +named to better reflect the intent of the API and its cross-platform nature. +should be preferred over . ## Examples The following example defines a p/invoke with -set to `true` and demonstrates using to get the last p/invoke error. +set to `true` and demonstrates using to get the last p/invoke error. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/GetLastPInvokeError/GetLastPInvokeError.cs" id="Snippet1"::: @@ -4848,7 +4848,7 @@ set to `true` and demonstrates using . +platform invoke usage. To get the last platform invoke error, use . ]]> @@ -4914,13 +4914,13 @@ platform invoke usage. To get the last platform invoke error, use exposes the Win32 [GetLastError](/windows/win32/api/errhandlingapi/nf-errhandlingapi-getlasterror) function from Kernel32.DLL. This method exists because it is not reliable to make a direct platform invoke call to `GetLastError` to obtain this information. If you want to access this error code, you must call instead of writing your own platform invoke definition for `GetLastError` and calling it. The common language runtime can make internal calls to APIs that overwrite the `GetLastError` maintained by the operating system. +On Windows systems, exposes the Win32 [GetLastError](/windows/win32/api/errhandlingapi/nf-errhandlingapi-getlasterror) function from Kernel32.DLL. This method exists because it is not reliable to make a direct platform invoke call to `GetLastError` to obtain this information. If you want to access this error code, you must call instead of writing your own platform invoke definition for `GetLastError` and calling it. The common language runtime can make internal calls to APIs that overwrite the `GetLastError` maintained by the operating system. You can use this method to obtain error codes only if you apply the to the method signature and set the field to `true`. The process for this varies depending upon the source language used: C# and C++ are `false` by default, but the `Declare` statement in Visual Basic is `true`. There is a difference in the behavior of the `GetLastWin32Error` method on .NET Core and .NET Framework when is `true`. On .NET Framework, the `GetLastWin32Error` method can retain error information from one P/Invoke call to the next. On .NET Core, error information is cleared before P/Invoke call, and the `GetLastWin32Error` represents only error information from the last method call. -On .NET 6 and later versions, this method is functionally equivalent to , which is named to better reflect the intent of the API and its cross-platform nature. should be preferred over . +On .NET 6 and later versions, this method is functionally equivalent to , which is named to better reflect the intent of the API and its cross-platform nature. should be preferred over . ## Examples The following example calls the `GetLastWin32Error` method. The example first demonstrates calling the method with no error present and then demonstrates calling the method with an error present. @@ -4981,7 +4981,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is exposed for compiler support only. + is exposed for compiler support only. ]]> @@ -5033,7 +5033,7 @@ On .NET 6 and later versions, this method is functionally equivalent to , , or object. The return value depends on the type of managed member that exists in the given COM slot (hence the generalized return type from which all three derive). - The zero-based slot number that is returned by this method accounts for three [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) and possibly four [IDispatch](/windows/win32/api/oaidl/nn-oaidl-idispatch) methods, making the value of the first available slot either 3 or 7. provides the opposite functionality of . You can use and in conjunction with to pass slots within a specified range. + The zero-based slot number that is returned by this method accounts for three [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) and possibly four [IDispatch](/windows/win32/api/oaidl/nn-oaidl-idispatch) methods, making the value of the first available slot either 3 or 7. provides the opposite functionality of . You can use and in conjunction with to pass slots within a specified range. The `memberType` parameter is important only on return. It contains the type of the COM member (a regular method or a property accessor) that corresponds to the returned object. @@ -5278,7 +5278,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is a [Runtime Callable Wrapper](/dotnet/framework/interop/runtime-callable-wrapper), which the common language runtime manages as it does any other managed object. The type of this wrapper is often a base `System.__ComObject` type, which is a hidden type used when the wrapper type is ambiguous. You can still make late-bound calls to such a base type as long as the COM object implements the [IDispatch](/windows/win32/api/oaidl/nn-oaidl-idispatch) interface. Likewise, you can cast the returned object to an appropriate COM interface. + The `pUnk` parameter represents an `IUnknown` interface pointer; however, because all COM interfaces derive directly or indirectly from `IUnknown`, you can pass any COM interface to this method. The object returned by is a [Runtime Callable Wrapper](/dotnet/framework/interop/runtime-callable-wrapper), which the common language runtime manages as it does any other managed object. The type of this wrapper is often a base `System.__ComObject` type, which is a hidden type used when the wrapper type is ambiguous. You can still make late-bound calls to such a base type as long as the COM object implements the [IDispatch](/windows/win32/api/oaidl/nn-oaidl-idispatch) interface. Likewise, you can cast the returned object to an appropriate COM interface. For an object to be wrapped with a specific managed class type (and not a generic wrapper type), you must adhere to the following requirements: @@ -5286,7 +5286,7 @@ On .NET 6 and later versions, this method is functionally equivalent to method. + Alternatively, you can avoid these requirements and still get an object that is wrapped with a specific managed class type by using the method. ]]> @@ -5368,11 +5368,11 @@ On .NET 6 and later versions, this method is functionally equivalent to returns a managed object that corresponds to a raw pointer to an unmanaged VARIANT type. The interopmarshaler performs the identical transformation when exposing a VARIANT type to managed code. + returns a managed object that corresponds to a raw pointer to an unmanaged VARIANT type. The interopmarshaler performs the identical transformation when exposing a VARIANT type to managed code. - provides the opposite functionality of . + provides the opposite functionality of . - When the VARIANT type is VT_ERROR, returns an object of type `Int32` instead of `UInt32`. + When the VARIANT type is VT_ERROR, returns an object of type `Int32` instead of `UInt32`. ]]> @@ -5457,9 +5457,9 @@ On .NET 6 and later versions, this method is functionally equivalent to returns a managed object of type `T` that corresponds to a raw pointer to an unmanaged VARIANT type. The interopmarshaler performs the identical transformation when exposing a VARIANT type to managed code. + returns a managed object of type `T` that corresponds to a raw pointer to an unmanaged VARIANT type. The interopmarshaler performs the identical transformation when exposing a VARIANT type to managed code. - provides the opposite functionality of . + provides the opposite functionality of . ]]> @@ -5542,7 +5542,7 @@ On .NET 6 and later versions, this method is functionally equivalent to returns an array of managed objects that corresponds to a raw pointer to a C-style array of unmanaged VARIANT types. The interopmarshaler performs the identical transformation when exposing a VARIANT type to managed code. The method returns an empty array when the `cVars` parameter is 0. + returns an array of managed objects that corresponds to a raw pointer to a C-style array of unmanaged VARIANT types. The interopmarshaler performs the identical transformation when exposing a VARIANT type to managed code. The method returns an empty array when the `cVars` parameter is 0. The object array (the return value) gets garbage collected as usual. The unmanaged input array or individual VARIANTs in the input array are not freed. Therefore it is your responsibility to free them as appropriate. @@ -5634,7 +5634,7 @@ On .NET 6 and later versions, this method is functionally equivalent to returns an array of `T` that corresponds to a raw pointer to a C-style array of unmanaged VARIANT types. The interopmarshaler performs the identical transformation when exposing a VARIANT type to managed code. The method returns an empty array when the `cVars` parameter is 0. + returns an array of `T` that corresponds to a raw pointer to a C-style array of unmanaged VARIANT types. The interopmarshaler performs the identical transformation when exposing a VARIANT type to managed code. The method returns an empty array when the `cVars` parameter is 0. The returned array is garbage-collected as usual. The unmanaged input array or individual VARIANTs in the input array are not freed. Therefore, it is your responsibility to free them as appropriate. @@ -5741,7 +5741,7 @@ On .NET 6 and later versions, this method is functionally equivalent to and in conjunction with to pass slots within a specified range. For additional information, see [Introducing the class interface](/dotnet/framework/interop/com-callable-wrapper#introducing-the-class-interface). + This method returns the zero-based v-table number for an interface or a class. When used on a class, the slot number that is returned refers to the class interface for the class. If the class interface is auto-dispatch, this method always returns -1 to indicate that the dispatch-only interface does not expose a v-table to managed clients. You can use and in conjunction with to pass slots within a specified range. For additional information, see [Introducing the class interface](/dotnet/framework/interop/com-callable-wrapper#introducing-the-class-interface). ]]> @@ -5863,7 +5863,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is a [Runtime Callable Wrapper (RCW)](/dotnet/framework/interop/runtime-callable-wrapper), which the common language runtime manages as it does any other managed object. + If an object has already been obtained for the `pUnk` parameter, `t` is ignored and the existing object is returned. `pUnk` represents an [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) interface pointer; however, because all COM interfaces derive directly or indirectly from `IUnknown`, you can pass any COM interface to this method. The object returned by is a [Runtime Callable Wrapper (RCW)](/dotnet/framework/interop/runtime-callable-wrapper), which the common language runtime manages as it does any other managed object. ]]> @@ -5916,7 +5916,7 @@ On .NET 6 and later versions, this method is functionally equivalent to returns a instance that is based on the original type. You can apply the to replace standard interop marshaling behavior with this custom marshaler. The [Tlbimp.exe (Type Library Importer)](/dotnet/framework/tools/tlbimp-exe-type-library-importer) tool uses the custom marshaler to translate `ITypeInfo` parameters to parameters. However, if you obtain an `ITypeInfo` interface by some means other than Tlbimp.exe, you can use to manually perform the same translation. + returns a instance that is based on the original type. You can apply the to replace standard interop marshaling behavior with this custom marshaler. The [Tlbimp.exe (Type Library Importer)](/dotnet/framework/tools/tlbimp-exe-type-library-importer) tool uses the custom marshaler to translate `ITypeInfo` parameters to parameters. However, if you obtain an `ITypeInfo` interface by some means other than Tlbimp.exe, you can use to manually perform the same translation. ]]> @@ -6060,7 +6060,7 @@ On .NET 6 and later versions, this method is functionally equivalent to method and passing -1 for its first parameter. + You can also retrieve the name of the type represented by an `ITypeInfo` by calling the method and passing -1 for its first parameter. ]]> @@ -6112,7 +6112,7 @@ On .NET 6 and later versions, this method is functionally equivalent to method and passing -1 for its first parameter. + You can also retrieve the name of the type represented by an `ITypeInfo` object by calling the method and passing -1 for its first parameter. ]]> @@ -6168,7 +6168,7 @@ On .NET 6 and later versions, this method is functionally equivalent to extracts the LIBID directly from an existing type library. This action differs from that of the method, which calculates what the LIBID should be based on the current assembly. + extracts the LIBID directly from an existing type library. This action differs from that of the method, which calculates what the LIBID should be based on the current assembly. For more information about library identifiers, see [Exported Assembly Conversion](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/t1ztw645(v=vs.100)). @@ -6222,7 +6222,7 @@ On .NET 6 and later versions, this method is functionally equivalent to extracts the LIBID directly from an existing type library. This action differs from that of the method, which calculates what the LIBID should be based on the current assembly. + extracts the LIBID directly from an existing type library. This action differs from that of the method, which calculates what the LIBID should be based on the current assembly. For more information about library identifiers, see [Exported Assembly Conversion](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/t1ztw645(v=vs.100)). @@ -6272,7 +6272,7 @@ On .NET 6 and later versions, this method is functionally equivalent to at the assembly level, or it can be generated automatically. The [Tlbimp.exe (Type Library Importer)](/dotnet/framework/tools/tlbimp-exe-type-library-importer) tool calculates a LIBID value based on the identity of the assembly. returns the LIBID that is associated with the , if the attribute is applied. Otherwise, returns the calculated value. Alternatively, you can use the method to extract the actual LIBID from an existing type library. + When assemblies are exported to type libraries, the type library is assigned a LIBID. You can set the LIBID explicitly by applying the at the assembly level, or it can be generated automatically. The [Tlbimp.exe (Type Library Importer)](/dotnet/framework/tools/tlbimp-exe-type-library-importer) tool calculates a LIBID value based on the identity of the assembly. returns the LIBID that is associated with the , if the attribute is applied. Otherwise, returns the calculated value. Alternatively, you can use the method to extract the actual LIBID from an existing type library. See the [Exported Assembly Conversion](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/t1ztw645(v=vs.100)) topic for more information about library identifiers. @@ -6426,7 +6426,7 @@ On .NET 6 and later versions, this method is functionally equivalent to method and passing -1 for its first parameter. + You can also retrieve the type library name by calling the method and passing -1 for its first parameter. ]]> @@ -6480,7 +6480,7 @@ On .NET 6 and later versions, this method is functionally equivalent to method and passing -1 for its first parameter. + You can also retrieve the type library name by calling the method and passing -1 for its first parameter. ]]> @@ -6603,7 +6603,7 @@ On .NET 6 and later versions, this method is functionally equivalent to method ensures that you receive a unique RCW, because it does not match an `IUnknown` pointer to an existing object. Use this method when you have to create a unique RCW that is not impacted by other code that calls the method. + The method ensures that you receive a unique RCW, because it does not match an `IUnknown` pointer to an existing object. Use this method when you have to create a unique RCW that is not impacted by other code that calls the method. ]]> @@ -6657,7 +6657,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is exposed for compiler support only. + is exposed for compiler support only. ]]> @@ -6760,9 +6760,9 @@ On .NET 6 and later versions, this method is functionally equivalent to returns `true` if the class type of the instance is attributed with or if it derives directly or indirectly from a class attributed with . The [Tlbimp.exe (Type Library Importer)](/dotnet/framework/tools/tlbimp-exe-type-library-importer) tool applies this attribute for you when it imports a type library. + returns `true` if the class type of the instance is attributed with or if it derives directly or indirectly from a class attributed with . The [Tlbimp.exe (Type Library Importer)](/dotnet/framework/tools/tlbimp-exe-type-library-importer) tool applies this attribute for you when it imports a type library. - Two other methods also determine whether a specified object represents a COM object, but the requirements for returning `true` differ from this method's requirements. returns `true` if the class (or interface) is attributed with directly; it does not return `true` for derived types. returns `true` if the type is attributed with or derives from a type with the same GUID. + Two other methods also determine whether a specified object represents a COM object, but the requirements for returning `true` differ from this method's requirements. returns `true` if the class (or interface) is attributed with directly; it does not return `true` for derived types. returns `true` if the type is attributed with or derives from a type with the same GUID. ]]> @@ -6824,7 +6824,7 @@ On .NET 6 and later versions, this method is functionally equivalent to enables you to check for COM visibility in one step. Types that are not visible cannot be used from COM. A type is visible if it is `public` and not hidden with the . + enables you to check for COM visibility in one step. Types that are not visible cannot be used from COM. A type is visible if it is `public` and not hidden with the . ]]> @@ -6871,7 +6871,7 @@ On .NET 6 and later versions, this method is functionally equivalent to method returns the stack size (in bytes) needed to represent the parameters of a method signature in unmanaged memory. + The method returns the stack size (in bytes) needed to represent the parameters of a method signature in unmanaged memory. Note that the return value of this method is platform-dependent. For example, a signature with a single integer parameter returns a value of 4 on 32-bit platforms and a value of 8 on 64-bit platforms. @@ -6949,10 +6949,10 @@ On .NET 6 and later versions, this method is functionally equivalent to provides the offset in terms of the unmanaged structure layout, which does not necessarily correspond to the offset of the managed structure layout. Marshaling the structure can transform the layout and alter the offset. The `t` parameter can be a value type or a formatted reference type (with either a sequential or explicit layout). You can obtain the size of the entire layout by using the method. For additional information, see [Default Marshaling for Value Types](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/0t2cwe11(v=vs.100)). + provides the offset in terms of the unmanaged structure layout, which does not necessarily correspond to the offset of the managed structure layout. Marshaling the structure can transform the layout and alter the offset. The `t` parameter can be a value type or a formatted reference type (with either a sequential or explicit layout). You can obtain the size of the entire layout by using the method. For additional information, see [Default Marshaling for Value Types](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/0t2cwe11(v=vs.100)). > [!NOTE] -> Beginning with the .NET Framework version 2.0, may expose private fields. +> Beginning with the .NET Framework version 2.0, may expose private fields. ]]> @@ -7023,10 +7023,10 @@ On .NET 6 and later versions, this method is functionally equivalent to provides the offset in terms of the unmanaged structure layout, which does not necessarily correspond to the offset of the managed structure layout. Marshaling the structure can transform the layout and alter the offset. The `T` generic type parameter can be a value type or a formatted reference type (with either a sequential or explicit layout). You can obtain the size of the entire layout by using the method. For additional information, see [Default Marshaling for Value Types](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/0t2cwe11(v=vs.100)). + provides the offset in terms of the unmanaged structure layout, which does not necessarily correspond to the offset of the managed structure layout. Marshaling the structure can transform the layout and alter the offset. The `T` generic type parameter can be a value type or a formatted reference type (with either a sequential or explicit layout). You can obtain the size of the entire layout by using the method. For additional information, see [Default Marshaling for Value Types](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/0t2cwe11(v=vs.100)). > [!NOTE] -> Beginning with the .NET Framework version 2.0, may expose private fields. +> Beginning with the .NET Framework version 2.0, may expose private fields. ]]> @@ -7095,7 +7095,7 @@ On .NET 6 and later versions, this method is functionally equivalent to on a method outside of platform invoke has no effect. To execute setup tasks on all platform invoke methods in a type, use . + Calling on a method outside of platform invoke has no effect. To execute setup tasks on all platform invoke methods in a type, use . ]]> @@ -7157,7 +7157,7 @@ On .NET 6 and later versions, this method is functionally equivalent to method invokes on every method for a given type. executes one-time method setup tasks without calling each method. You can use only for platform invoke calls. + The method invokes on every method for a given type. executes one-time method setup tasks without calling each method. You can use only for platform invoke calls. ]]> @@ -7238,12 +7238,12 @@ On .NET 6 and later versions, this method is functionally equivalent to is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the and methods. + is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the and methods. ## Examples - The following example uses the method to create a managed string from an unmanaged `char` array. + The following example uses the method to create a managed string from an unmanaged `char` array. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Runtime.InteropServices.Marshal.PtrToStringAnsi-IntPtr/cpp/sample.cpp" id="Snippet1"::: @@ -7313,12 +7313,12 @@ On .NET 6 and later versions, this method is functionally equivalent to is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the and methods. + is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the and methods. ## Examples - The following example uses the method to create a managed string from an unmanaged`char` array. + The following example uses the method to create a managed string from an unmanaged`char` array. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Runtime.InteropServices.Marshal.PtrToStringAnsi-IntPtr-int/cpp/sample.cpp" id="Snippet1"::: @@ -7398,9 +7398,9 @@ On .NET 6 and later versions, this method is functionally equivalent to . Otherwise, this method calls . + If the current platform is Unicode, each ANSI character is widened to a Unicode character and this method calls . Otherwise, this method calls . - is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. provides the opposite functionality of the and methods. + is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. provides the opposite functionality of the and methods. ]]> @@ -7470,9 +7470,9 @@ On .NET 6 and later versions, this method is functionally equivalent to ; on ANSI platforms, it calls . No transformations are done before these methods are called. + On Unicode platforms, this method calls ; on ANSI platforms, it calls . No transformations are done before these methods are called. - is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. provides the opposite functionality of and . + is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. provides the opposite functionality of and . ]]> @@ -7544,7 +7544,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the method. + is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the method. ]]> @@ -7626,7 +7626,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the and methods. + is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the and methods. This API reflects the Windows definition of Unicode, which is a UTF-16 2-byte encoding. On many non-Windows platforms, the `wchar_t` data-type is 4-bytes, not 2-bytes. Consult your compiler to confirm if `wchar_t` can be used or `char16_t` should be used instead. @@ -7696,7 +7696,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the and methods. + is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the and methods. This API reflects the Windows definition of Unicode, which is a UTF-16 2-byte encoding. On many non-Windows platforms, the `wchar_t` data-type is 4-bytes, not 2-bytes. Consult your compiler to confirm if `wchar_t` can be used or `char16_t` should be used instead. @@ -7756,7 +7756,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the methods. + is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the methods. ]]> @@ -7813,7 +7813,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the methods. + is useful for custom marshaling or when mixing managed and unmanaged code. Because this method creates a copy of the unmanaged string's contents, you must free the original string as appropriate. This method provides the opposite functionality of the methods. ]]> @@ -7909,7 +7909,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is often necessary in COM interop and platform invoke when structure parameters are represented as an value. You cannot use this overload method with value types. + is often necessary in COM interop and platform invoke when structure parameters are represented as an value. You cannot use this overload method with value types. If the `ptr` parameter equals , `null` will be returned. ]]> @@ -8003,7 +8003,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is often necessary in COM interop and platform invoke when structure parameters are represented as an value. You can pass a value type to this overload method. In this case, the returned object is a boxed instance. + is often necessary in COM interop and platform invoke when structure parameters are represented as an value. You can pass a value type to this overload method. In this case, the returned object is a boxed instance. If the `ptr` parameter equals , `null` will be returned. ]]> @@ -8088,7 +8088,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is often necessary in COM interop and platform invoke when structure parameters are represented as values. You can pass a value type to this method overload. + is often necessary in COM interop and platform invoke when structure parameters are represented as values. You can pass a value type to this method overload. If the `ptr` parameter equals and `T` is a reference type, `null` is returned. If `ptr` equals and `T` is a value type, a is thrown. ]]> @@ -8172,7 +8172,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is often necessary in COM interop and platform invoke when structure parameters are represented as values. You cannot use this method overload with value types. + is often necessary in COM interop and platform invoke when structure parameters are represented as values. You cannot use this method overload with value types. If the `ptr` parameter equals and `T` is a reference type, `null` is returned. If `ptr` equals and `T` is a value type, a is thrown. ]]> @@ -8259,7 +8259,7 @@ On .NET 6 and later versions, this method is functionally equivalent to method exposes the [IUnknown::QueryInterface](https://go.microsoft.com/fwlink/?LinkID=144867) method of a COM object, which attempts to obtain a specific interface pointer. Using `QueryInterface` on a COM object is the same as performing a cast operation in managed code. Calling an object with this method causes the reference count to increment on the interface pointer before the pointer is returned. Always use to decrement the reference count once you have finished with the pointer. To obtain an value that represents a [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) interface pointer, you can call , , or . + The method exposes the [IUnknown::QueryInterface](https://go.microsoft.com/fwlink/?LinkID=144867) method of a COM object, which attempts to obtain a specific interface pointer. Using `QueryInterface` on a COM object is the same as performing a cast operation in managed code. Calling an object with this method causes the reference count to increment on the interface pointer before the pointer is returned. Always use to decrement the reference count once you have finished with the pointer. To obtain an value that represents a [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) interface pointer, you can call , , or . ]]> @@ -8343,7 +8343,7 @@ On .NET 6 and later versions, this method is functionally equivalent to has an implied offset of 0. This method enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + has an implied offset of 0. This method enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. @@ -8355,7 +8355,7 @@ On .NET 6 and later versions, this method is functionally equivalent to method to read the value of an unmanaged character. + The following example demonstrates how to use the method to read the value of an unmanaged character. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Runtime.InteropServices.Marshal.ReadByte/cpp/sample.cpp" id="Snippet1"::: @@ -8435,19 +8435,19 @@ On .NET 6 and later versions, this method is functionally equivalent to enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet3"::: - The following example demonstrates how to use the method to read the value of an unmanaged character. + The following example demonstrates how to use the method to read the value of an unmanaged character. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Runtime.InteropServices.Marshal.ReadByte-IntPtr-int/cpp/sample.cpp" id="Snippet1"::: @@ -8534,7 +8534,7 @@ On .NET 6 and later versions, this method is functionally equivalent to enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. @@ -8618,19 +8618,19 @@ On .NET 6 and later versions, this method is functionally equivalent to has an implied offset of 0. This method enables direct interaction with an unmanaged C-style `Int16` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + has an implied offset of 0. This method enables direct interaction with an unmanaged C-style `Int16` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet4"::: - The following example demonstrates how to use the method to read the value of an unmanaged `short` variable. + The following example demonstrates how to use the method to read the value of an unmanaged `short` variable. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Runtime.InteropServices.Marshal.ReadInt16/cpp/sample.cpp" id="Snippet1"::: @@ -8710,19 +8710,19 @@ On .NET 6 and later versions, this method is functionally equivalent to enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet4"::: - The following example demonstrates how to use the method to read the value of an unmanaged `short` variable. + The following example demonstrates how to use the method to read the value of an unmanaged `short` variable. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Runtime.InteropServices.Marshal.ReadInt16-IntPtr-Int/cpp/sample.cpp" id="Snippet1"::: @@ -8810,7 +8810,7 @@ On .NET 6 and later versions, this method is functionally equivalent to enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. @@ -8898,19 +8898,19 @@ On .NET 6 and later versions, this method is functionally equivalent to has an implied offset of 0. This method enables direct interaction with an unmanaged C-style `Int32` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + has an implied offset of 0. This method enables direct interaction with an unmanaged C-style `Int32` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet5"::: - The following example demonstrates how to use the method to read the value of an unmanaged `int` variable. + The following example demonstrates how to use the method to read the value of an unmanaged `int` variable. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Runtime.InteropServices.Marshal.ReadInt32/cpp/sample.cpp" id="Snippet1"::: @@ -8994,19 +8994,19 @@ On .NET 6 and later versions, this method is functionally equivalent to enables direct interaction with an unmanaged 32-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + enables direct interaction with an unmanaged 32-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet5"::: - The following example demonstrates how to use the method to read the value of an unmanaged `int` variable. + The following example demonstrates how to use the method to read the value of an unmanaged `int` variable. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Runtime.InteropServices.Marshal.ReadInt32-IntPtr-Int/cpp/sample.cpp" id="Snippet1"::: @@ -9098,7 +9098,7 @@ On .NET 6 and later versions, this method is functionally equivalent to enables direct interaction with an unmanaged 32-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + enables direct interaction with an unmanaged 32-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. @@ -9186,19 +9186,19 @@ On .NET 6 and later versions, this method is functionally equivalent to has an implied offset of 0. This method enables direct interaction with an unmanaged C-style `Int64` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + has an implied offset of 0. This method enables direct interaction with an unmanaged C-style `Int64` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet6"::: - The following example demonstrates how to use the method to read the value of an unmanaged `__int64` variable. + The following example demonstrates how to use the method to read the value of an unmanaged `__int64` variable. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Runtime.InteropServices.Marshal.ReadInt64/cpp/sample.cpp" id="Snippet1"::: @@ -9282,19 +9282,19 @@ On .NET 6 and later versions, this method is functionally equivalent to enables direct interaction with an unmanaged 64-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + enables direct interaction with an unmanaged 64-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet6"::: - The following example demonstrates how to use the method to read the value of an unmanaged `__int64` variable. + The following example demonstrates how to use the method to read the value of an unmanaged `__int64` variable. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/Runtime.InteropServices.Marshal.ReadInt64-IntPtr-Int/cpp/sample.cpp" id="Snippet1"::: @@ -9386,7 +9386,7 @@ On .NET 6 and later versions, this method is functionally equivalent to enables direct interaction with an unmanaged 64-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + enables direct interaction with an unmanaged 64-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. @@ -9474,14 +9474,14 @@ On .NET 6 and later versions, this method is functionally equivalent to has an implied offset of 0. This method enables direct interaction with an unmanaged C-style `IntPtr` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + has an implied offset of 0. This method enables direct interaction with an unmanaged C-style `IntPtr` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet2"::: @@ -9565,14 +9565,14 @@ On .NET 6 and later versions, this method is functionally equivalent to enables direct interaction with an unmanaged C-style `IntPtr` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + enables direct interaction with an unmanaged C-style `IntPtr` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet2"::: @@ -9661,7 +9661,7 @@ On .NET 6 and later versions, this method is functionally equivalent to enables direct interaction with an unmanaged C-style `IntPtr` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. + enables direct interaction with an unmanaged C-style `IntPtr` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before reading its element values. Reading from unaligned memory locations is supported. @@ -9733,7 +9733,7 @@ On .NET 6 and later versions, this method is functionally equivalent to is one of two memory reallocation methods in the class. ( is the other.) The beginning of the reallocated memory content is the same as the original content; however, the entire memory block can be in a different location. This method exposes the COM [CoTaskMemRealloc](https://go.microsoft.com/fwlink/?LinkId=148778) function, which is referred to as the COM task memory allocator. + is one of two memory reallocation methods in the class. ( is the other.) The beginning of the reallocated memory content is the same as the original content; however, the entire memory block can be in a different location. This method exposes the COM [CoTaskMemRealloc](https://go.microsoft.com/fwlink/?LinkId=148778) function, which is referred to as the COM task memory allocator. ]]> @@ -9803,9 +9803,9 @@ On .NET 6 and later versions, this method is functionally equivalent to [!IMPORTANT] -> This native memory allocator is a legacy API that should be used exclusively when called for by specific Win32 APIs on the Windows platform. When targeting .NET 6 or later, use the class on all platforms to allocate native memory. When targeting .NET Framework, use on all platforms to allocate native memory. +> This native memory allocator is a legacy API that should be used exclusively when called for by specific Win32 APIs on the Windows platform. When targeting .NET 6 or later, use the class on all platforms to allocate native memory. When targeting .NET Framework, use on all platforms to allocate native memory. - is one of two memory reallocation API methods in the class. ( is the other.) + is one of two memory reallocation API methods in the class. ( is the other.) This method exposes the Win32 [GlobalReAlloc](https://go.microsoft.com/fwlink/?LinkId=148780) function from Kernel32.dll. The returned pointer can differ from the original. If it is different, the contents of the original memory block have been copied to the new block, and the original memory block has been freed. @@ -9883,14 +9883,14 @@ On .NET 6 and later versions, this method is functionally equivalent to should call . Calling after the reference count has reached zero causes undefined behavior. + The common language runtime manages the reference count of a COM object for you, making it unnecessary to use this method directly. Use this value only for testing purposes. In rare cases, such as testing a custom marshaler, you might find it necessary to manipulate an object's lifetime manually. Only programs that call should call . Calling after the reference count has reached zero causes undefined behavior. - You can call , , or to obtain an value that represents a [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) interface pointer to release. You can also use these methods and the method on managed objects to release the COM interfaces represented by the managed object's [COM Callable Wrapper](/dotnet/framework/interop/com-callable-wrapper). + You can call , , or to obtain an value that represents a [IUnknown](/windows/win32/api/unknwn/nn-unknwn-iunknown) interface pointer to release. You can also use these methods and the method on managed objects to release the COM interfaces represented by the managed object's [COM Callable Wrapper](/dotnet/framework/interop/com-callable-wrapper). ## Examples - The following example demonstrates how to retrieve an `IUnknown` interface for a managed object using the method. The example then releases the interface pointer by calling the method. + The following example demonstrates how to retrieve an `IUnknown` interface for a managed object using the method. The example then releases the interface pointer by calling the method. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/GetIUnknownForObject/example.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/GetIUnknownForObject/example.vb" id="Snippet1"::: @@ -9970,17 +9970,17 @@ On .NET 6 and later versions, this method is functionally equivalent to method decrements the reference count of an RCW. When the reference count reaches zero, the runtime releases all its references on the unmanaged COM object, and throws a if you attempt to use the object further. If the same COM interface is passed more than one time from unmanaged to managed code, the reference count on the wrapper is incremented every time, and calling returns the number of remaining references. + The RCW has a reference count that is incremented every time a COM interface pointer is mapped to it. The method decrements the reference count of an RCW. When the reference count reaches zero, the runtime releases all its references on the unmanaged COM object, and throws a if you attempt to use the object further. If the same COM interface is passed more than one time from unmanaged to managed code, the reference count on the wrapper is incremented every time, and calling returns the number of remaining references. - This method enables you to force an RCW reference count release so that it occurs precisely when you want it to. However, improper use of may cause your application to fail, or may cause an access violation. + This method enables you to force an RCW reference count release so that it occurs precisely when you want it to. However, improper use of may cause your application to fail, or may cause an access violation. - Consider a scenario in which managed code in an application domain is holding onto an RCW that represents a COM component. If you call the method on the RCW, the managed code will be unable to access the RCW and will raise an exception. + Consider a scenario in which managed code in an application domain is holding onto an RCW that represents a COM component. If you call the method on the RCW, the managed code will be unable to access the RCW and will raise an exception. A more serious error may occur if a call to the RCW is executing when the RCW is released. In this case, there is a good chance that the thread making the call will cause an access violation. However, process memory may become corrupted, and the process may continue to run until it fails for reasons that are very difficult to debug. - This risk is compounded when the COM component that is being used is a singleton, for the following reason: The CLR activates COM components by calling the COM [CoCreateInstance](https://go.microsoft.com/fwlink/?LinkID=142894) function, which returns the same interface pointer every time it is called for singleton COM components. Thus, separate and independent pieces of managed code in an application domain can be using the same RCW for a singleton COM component, and if either one calls the method on the COM component, the other will be broken. + This risk is compounded when the COM component that is being used is a singleton, for the following reason: The CLR activates COM components by calling the COM [CoCreateInstance](https://go.microsoft.com/fwlink/?LinkID=142894) function, which returns the same interface pointer every time it is called for singleton COM components. Thus, separate and independent pieces of managed code in an application domain can be using the same RCW for a singleton COM component, and if either one calls the method on the COM component, the other will be broken. - Therefore, use the only if it is absolutely required. If you want to call this method to ensure that a COM component is released at a determined time, consider using the method instead. will release the underlying COM component regardless of how many times it has re-entered the CLR. The internal reference count of the RCW is incremented by one every time the COM component re-enters the CLR. Therefore, you could call the method in a loop until the value returned is zero. This achieves the same result as the method. + Therefore, use the only if it is absolutely required. If you want to call this method to ensure that a COM component is released at a determined time, consider using the method instead. will release the underlying COM component regardless of how many times it has re-entered the CLR. The internal reference count of the RCW is incremented by one every time the COM component re-enters the CLR. Therefore, you could call the method in a loop until the value returned is zero. This achieves the same result as the method. ]]> @@ -10087,7 +10087,7 @@ On .NET 6 and later versions, this method is functionally equivalent to method is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the `BSTR` when finished by calling the method. + The method is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the `BSTR` when finished by calling the method. ]]> @@ -10151,12 +10151,12 @@ On .NET 6 and later versions, this method is functionally equivalent to method is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . The characters of the string are copied as ANSI characters. + The method is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . The characters of the string are copied as ANSI characters. ## Examples - The following example uses the method to marshal and decrypt the contents of a object to a block of unmanaged memory. It then uses the method to zero out and dispose the unmanaged block. + The following example uses the method to marshal and decrypt the contents of a object to a block of unmanaged memory. It then uses the method to zero out and dispose the unmanaged block. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/SecureStringToCoTaskMemAnsi/sample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/SecureStringToCoTaskMemAnsi/sample.vb" id="Snippet1"::: @@ -10223,12 +10223,12 @@ On .NET 6 and later versions, this method is functionally equivalent to method is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling the method. The characters of the string are copied as Unicode characters. + The method is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling the method. The characters of the string are copied as Unicode characters. ## Examples - The following example uses the method to marshal and decrypt the contents of a object to a block of unmanaged memory. It then uses the method to zero out and dispose the unmanaged block. + The following example uses the method to marshal and decrypt the contents of a object to a block of unmanaged memory. It then uses the method to zero out and dispose the unmanaged block. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/SecureStringToCoTaskMemUnicode/sample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/SecureStringToCoTaskMemUnicode/sample.vb" id="Snippet1"::: @@ -10295,12 +10295,12 @@ On .NET 6 and later versions, this method is functionally equivalent to method is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling the method. + The method is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling the method. ## Examples - The following example uses the method to marshal and decrypt the contents of a object to a block of unmanaged memory. It then uses the method to zero out and dispose the unmanaged block. + The following example uses the method to marshal and decrypt the contents of a object to a block of unmanaged memory. It then uses the method to zero out and dispose the unmanaged block. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/SecureStringToGlobalAllocAnsi/sample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/SecureStringToGlobalAllocAnsi/sample.vb" id="Snippet1"::: @@ -10367,12 +10367,12 @@ On .NET 6 and later versions, this method is functionally equivalent to method is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling the method. + The method is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling the method. ## Examples - The following example demonstrates how to use the method with the unmanaged `LogonUser` function to perform impersonation with the class. The example then uses the method to zero out and free the unmanaged string reference. + The following example demonstrates how to use the method with the unmanaged `LogonUser` function to perform impersonation with the class. The example then uses the method to zero out and free the unmanaged string reference. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/SecureStringToGlobalAllocUnicode/sample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/SecureStringToGlobalAllocUnicode/sample.vb" id="Snippet1"::: @@ -10452,7 +10452,7 @@ On .NET 6 and later versions, this method is functionally equivalent to adds data. retrieves data from the hash table. You should never have to call either method from your code. + All COM objects wrapped in a [Runtime Callable Wrapper (RCW)](/dotnet/framework/interop/runtime-callable-wrapper) have an associated hash table, to which adds data. retrieves data from the hash table. You should never have to call either method from your code. ]]> @@ -10508,7 +10508,7 @@ On .NET 6 and later versions, this method is functionally equivalent to . +The last platform invoke error is stored per-thread and can be retrieved using . ]]> @@ -10645,7 +10645,7 @@ The system error is based on the current operating system—that is, `errno` The size returned is the size of the unmanaged object. The unmanaged and managed sizes of an object can differ. For character types, the size is affected by the value applied to that class. - You can use the method to determine how much unmanaged memory to allocate using the and methods. + You can use the method to determine how much unmanaged memory to allocate using the and methods. ]]> @@ -10855,7 +10855,7 @@ The system error is based on the current operating system—that is, `errno` The size returned is the size of the unmanaged object. The unmanaged and managed sizes of an object can differ. For character types, the size is affected by the value applied to that class. - You can use the method to determine how much unmanaged memory to allocate by using the and methods. + You can use the method to determine how much unmanaged memory to allocate by using the and methods. ]]> @@ -10921,7 +10921,7 @@ The system error is based on the current operating system—that is, `errno` is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the `BSTR` when finished by calling . This method provides the opposite functionality of . + is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the `BSTR` when finished by calling . This method provides the opposite functionality of . ]]> @@ -10990,7 +10990,7 @@ The system error is based on the current operating system—that is, `errno` is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . This method provides the opposite functionality of . The characters of the string are copied as ANSI characters. + is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . This method provides the opposite functionality of . The characters of the string are copied as ANSI characters. ]]> @@ -11054,7 +11054,7 @@ The system error is based on the current operating system—that is, `errno` is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . This method provides the opposite functionality of . + is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . This method provides the opposite functionality of . The characters of the string are copied as Unicode characters. @@ -11124,7 +11124,7 @@ The system error is based on the current operating system—that is, `errno` is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . This method provides the opposite functionality of . The characters of the string are copied as Unicode characters. + is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . This method provides the opposite functionality of . The characters of the string are copied as Unicode characters. This API reflects the Windows definition of Unicode, which is a UTF-16 2-byte encoding. On many non-Windows platforms, the `wchar_t` data-type is 4-bytes, not 2-bytes. Consult your compiler to confirm if `wchar_t` can be used or `char16_t` should be used instead. @@ -11186,7 +11186,7 @@ The system error is based on the current operating system—that is, `errno` is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string including a null terminator, always free the memory by calling . This method provides the opposite functionality of . The characters of the string are copied as UTF-8 characters. + is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string including a null terminator, always free the memory by calling . This method provides the opposite functionality of . The characters of the string are copied as UTF-8 characters. ]]> @@ -11256,7 +11256,7 @@ The system error is based on the current operating system—that is, `errno` is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . provides the opposite functionality of . + is useful for custom marshaling or when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . provides the opposite functionality of . This method copies embedded null characters, and includes a terminating null character. @@ -11330,7 +11330,7 @@ The system error is based on the current operating system—that is, `errno` is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . This method provides the opposite functionality of . + is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . This method provides the opposite functionality of . This method copies embedded null characters, and includes a terminating null character. @@ -11406,7 +11406,7 @@ The system error is based on the current operating system—that is, `errno` is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . This method provides the opposite functionality of . + is useful for custom marshaling or for use when mixing managed and unmanaged code. Because this method allocates the unmanaged memory required for a string, always free the memory by calling . This method provides the opposite functionality of . This method copies embedded null characters, and includes a terminating null character. @@ -11504,20 +11504,20 @@ The system error is based on the current operating system—that is, `errno` A formatted class is a reference type whose layout is specified by the attribute, as either or . - copies the contents of `structure` to the pre-allocated block of memory that the `ptr` parameter points to. If `structure` contains reference types that marshal to COM interface pointers (interfaces, classes without layout, and ), the managed objects are kept alive with reference counts. All other reference types (for example, strings and arrays) are marshaled to copies. To release these managed or unmanaged objects, you must call the method before you free the memory block. + copies the contents of `structure` to the pre-allocated block of memory that the `ptr` parameter points to. If `structure` contains reference types that marshal to COM interface pointers (interfaces, classes without layout, and ), the managed objects are kept alive with reference counts. All other reference types (for example, strings and arrays) are marshaled to copies. To release these managed or unmanaged objects, you must call the method before you free the memory block. - If you use the method to copy a different instance to the memory block at a later time, specify `true` for `fDeleteOld` to remove reference counts for reference types in the previous instance. Otherwise, the managed reference types and unmanaged copies are effectively leaked. + If you use the method to copy a different instance to the memory block at a later time, specify `true` for `fDeleteOld` to remove reference counts for reference types in the previous instance. Otherwise, the managed reference types and unmanaged copies are effectively leaked. - The overall pattern for using is as follows: + The overall pattern for using is as follows: -1. On the first call to the method after a memory block has been allocated, `fDeleteOld` must be `false`, because there are no contents to clear. +1. On the first call to the method after a memory block has been allocated, `fDeleteOld` must be `false`, because there are no contents to clear. > [!IMPORTANT] > Specify `true` for `fDeleteOld` only if the block contains valid data. 2. If you copy a different instance to the memory block, and the object contains reference types, `fDeleteOld` must be `true` to free reference types in the old contents. -3. If the object contains reference types, you must call the method before you free the memory block. +3. If the object contains reference types, you must call the method before you free the memory block. > [!NOTE] > To pin an existing structure instead of copying it, use the type to create a pinned handle for the structure. For details on how to pin, see [Copying and Pinning](/dotnet/framework/interop/copying-and-pinning). @@ -11615,20 +11615,20 @@ The system error is based on the current operating system—that is, `errno` ## Remarks A formatted class is a reference type whose layout is specified by the attribute, as either or . - copies the contents of `structure` to the pre-allocated block of memory that the `ptr` parameter points to. If `structure` contains reference types that marshal to COM interface pointers (interfaces, classes without layout, and ), the managed objects are kept alive with reference counts. All other reference types (for example, strings and arrays) are marshaled to copies. To release these managed or unmanaged objects, you must call the method before you free the memory block. + copies the contents of `structure` to the pre-allocated block of memory that the `ptr` parameter points to. If `structure` contains reference types that marshal to COM interface pointers (interfaces, classes without layout, and ), the managed objects are kept alive with reference counts. All other reference types (for example, strings and arrays) are marshaled to copies. To release these managed or unmanaged objects, you must call the method before you free the memory block. - If you use the method to copy a different instance to the memory block at a later time, specify `true` for `fDeleteOld` to remove reference counts for reference types in the previous instance. Otherwise, the managed reference types and unmanaged copies are effectively leaked. + If you use the method to copy a different instance to the memory block at a later time, specify `true` for `fDeleteOld` to remove reference counts for reference types in the previous instance. Otherwise, the managed reference types and unmanaged copies are effectively leaked. - The overall pattern for using is as follows: + The overall pattern for using is as follows: -1. On the first call to the method after a memory block has been allocated, `fDeleteOld` must be `false`, because there are no contents to clear. +1. On the first call to the method after a memory block has been allocated, `fDeleteOld` must be `false`, because there are no contents to clear. > [!IMPORTANT] > Specify `true` for `fDeleteOld` only if the block contains valid data. 2. If you copy a different instance to the memory block, and the object contains reference types, `fDeleteOld` must be `true` to free reference types in the old contents. -3. If the object contains reference types, you must call the method before you free the memory block. +3. If the object contains reference types, you must call the method before you free the memory block. > [!NOTE] > To pin an existing structure instead of copying it, use the type to create a pinned handle for the structure. For details on how to pin, see [Copying and Pinning](/dotnet/framework/interop/copying-and-pinning). @@ -11833,13 +11833,13 @@ The system error is based on the current operating system—that is, `errno` ## Remarks This method creates an exception object for the specified failure HRESULT. If the HRESULT is 0 or positive (a success code), the method returns without creating or throwing an exception. - Note that the method returns an exception based on the [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) interface of the current thread if one is set. When this happens, the `errorCode` parameter is ignored. + Note that the method returns an exception based on the [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) interface of the current thread if one is set. When this happens, the `errorCode` parameter is ignored. - Some failure HRESULTs map to defined exceptions, whereas others do not. If the HRESULT maps to a defined exception, creates an instance of the exception and throws it. Otherwise, it creates an instance of , initializes the error code field with the HRESULT, and throws that exception. When is invoked, it attempts to retrieve extra information regarding the error by using the unmanaged [GetErrorInfo](/windows/win32/api/oleauto/nf-oleauto-geterrorinfo) function. + Some failure HRESULTs map to defined exceptions, whereas others do not. If the HRESULT maps to a defined exception, creates an instance of the exception and throws it. Otherwise, it creates an instance of , initializes the error code field with the HRESULT, and throws that exception. When is invoked, it attempts to retrieve extra information regarding the error by using the unmanaged [GetErrorInfo](/windows/win32/api/oleauto/nf-oleauto-geterrorinfo) function. For the mapping from each HRESULT to its comparable exception class in the .NET Framework, see [How to: Map HRESULTs and Exceptions](/dotnet/framework/interop/how-to-map-hresults-and-exceptions). - Occasionally, might return an exception from a previous COM call. In this case, you can use the following workaround and pass `IntPtr(-1)` as the second parameter (`errorInfo`): + Occasionally, might return an exception from a previous COM call. In this case, you can use the following workaround and pass `IntPtr(-1)` as the second parameter (`errorInfo`): ```csharp public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) @@ -11911,11 +11911,11 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) ## Remarks This method creates an exception object for the specified failure HRESULT. If the HRESULT is 0 or positive (a success code), the method returns without creating or throwing an exception. - The method releases the `errorInfo` parameter, decreasing the COM reference count of the [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) interface. + The method releases the `errorInfo` parameter, decreasing the COM reference count of the [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) interface. - Note that the method returns an exception based on the [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) interface of the current thread if one is set. When this happens, the `errorCode` parameter is ignored. + Note that the method returns an exception based on the [IErrorInfo](/windows/win32/api/oaidl/nn-oaidl-ierrorinfo) interface of the current thread if one is set. When this happens, the `errorCode` parameter is ignored. - Some failure HRESULTs map to defined exceptions, whereas others do not. If the HRESULT maps to a defined exception, creates an instance of the exception and throws it. Otherwise, it creates an instance of , initializes the error code field with the HRESULT, and throws that exception. The `errorInfo` parameter is used to retrieve extra information regarding the error. + Some failure HRESULTs map to defined exceptions, whereas others do not. If the HRESULT maps to a defined exception, creates an instance of the exception and throws it. Otherwise, it creates an instance of , initializes the error code field with the HRESULT, and throws that exception. The `errorInfo` parameter is used to retrieve extra information regarding the error. For the mapping from each HRESULT to its comparable exception class in the .NET Framework, see [How to: Map HRESULTs and Exceptions](/dotnet/framework/interop/how-to-map-hresults-and-exceptions). @@ -12191,7 +12191,7 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. @@ -12278,12 +12278,12 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet3"::: @@ -12372,7 +12372,7 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. ]]> @@ -12455,14 +12455,14 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet4"::: @@ -12541,14 +12541,14 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet4"::: @@ -12629,14 +12629,14 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet4"::: @@ -12710,14 +12710,14 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet4"::: @@ -12803,7 +12803,7 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. @@ -12893,7 +12893,7 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged 16-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. @@ -12978,14 +12978,14 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged 32-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged 32-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet5"::: @@ -13067,14 +13067,14 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged 32-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged 32-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet5"::: @@ -13164,7 +13164,7 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged 32-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged 32-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. @@ -13249,14 +13249,14 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged 64-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged 64-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet6"::: @@ -13338,14 +13338,14 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged 64-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged 64-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet6"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet6"::: @@ -13435,7 +13435,7 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged 64-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged 64-bit signed array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. @@ -13520,14 +13520,14 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged C-style `IntPtr` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged C-style `IntPtr` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet2"::: @@ -13610,14 +13610,14 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) ## Remarks This method writes a 32 bit integer on 32 bit systems, and a 64 bit integer on 64 bit systems. - enables direct interaction with an unmanaged C-style `IntPtr` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged C-style `IntPtr` array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. ## Examples - The following example demonstrates how to read and write to an unmanaged array using the and methods. + The following example demonstrates how to read and write to an unmanaged array using the and methods. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/ReadByte/sample.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/ReadByte/sample.vb" id="Snippet2"::: @@ -13703,7 +13703,7 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. + enables direct interaction with an unmanaged C-style byte array, eliminating the expense of copying an entire unmanaged array (using ) to a separate managed array before setting its element values. Writing to unaligned memory locations is supported. @@ -13771,7 +13771,7 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) method first sets the contents of the BSTR to zero, and then frees the BSTR. + The method first sets the contents of the BSTR to zero, and then frees the BSTR. ]]> @@ -13833,12 +13833,12 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) method first zeros out and then frees unmanaged memory that was allocated using the method. + The method first zeros out and then frees unmanaged memory that was allocated using the method. ## Examples - The following example uses the method to marshal and decrypt the contents of a object to a block of unmanaged memory. It then uses the method to zero out and dispose the unmanaged block. + The following example uses the method to marshal and decrypt the contents of a object to a block of unmanaged memory. It then uses the method to zero out and dispose the unmanaged block. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/SecureStringToCoTaskMemAnsi/sample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/SecureStringToCoTaskMemAnsi/sample.vb" id="Snippet1"::: @@ -13903,7 +13903,7 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) method first zeros out and then frees unmanaged memory that was allocated using the method. + The method first zeros out and then frees unmanaged memory that was allocated using the method. ]]> @@ -13957,7 +13957,7 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) method first zeros out and then frees unmanaged memory that was allocated using the method. + The method first zeros out and then frees unmanaged memory that was allocated using the method. ]]> @@ -14019,12 +14019,12 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) method first zeros out and then frees unmanaged memory that was allocated using the method. + The method first zeros out and then frees unmanaged memory that was allocated using the method. ## Examples - The following example uses the method to marshal and decrypt the contents of a object to a block of unmanaged memory. It then uses the method to zero out and dispose the unmanaged block. + The following example uses the method to marshal and decrypt the contents of a object to a block of unmanaged memory. It then uses the method to zero out and dispose the unmanaged block. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/SecureStringToGlobalAllocAnsi/sample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/SecureStringToGlobalAllocAnsi/sample.vb" id="Snippet1"::: @@ -14089,12 +14089,12 @@ public static void ThrowExceptionForHR(interrorCode,IntPtrerrorInfo) method first zeros out and then frees unmanaged memory that was allocated using the method. + The method first zeros out and then frees unmanaged memory that was allocated using the method. ## Examples - The following example demonstrates how to use the method with the unmanaged `LogonUser` function to perform impersonation with the class. The example then uses the method to zero out and free the unmanaged string reference. + The following example demonstrates how to use the method with the unmanaged `LogonUser` function to perform impersonation with the class. The example then uses the method to zero out and free the unmanaged string reference. :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/Marshal/SecureStringToGlobalAllocUnicode/sample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/Marshal/SecureStringToGlobalAllocUnicode/sample.vb" id="Snippet1"::: diff --git a/xml/System.Runtime.InteropServices/MarshalDirectiveException.xml b/xml/System.Runtime.InteropServices/MarshalDirectiveException.xml index 303e888acb6..7f253f7b4d1 100644 --- a/xml/System.Runtime.InteropServices/MarshalDirectiveException.xml +++ b/xml/System.Runtime.InteropServices/MarshalDirectiveException.xml @@ -146,8 +146,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||A localized error message string.| +||`null`.| +||A localized error message string.| ]]> @@ -206,8 +206,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||`message`| +||`null`.| +||`message`| ]]> @@ -337,8 +337,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> diff --git a/xml/System.Runtime.InteropServices/MemoryMarshal.xml b/xml/System.Runtime.InteropServices/MemoryMarshal.xml index 3c95382a47d..f9a698ca6ec 100644 --- a/xml/System.Runtime.InteropServices/MemoryMarshal.xml +++ b/xml/System.Runtime.InteropServices/MemoryMarshal.xml @@ -251,7 +251,7 @@ ## Remarks > [!CAUTION] -> This method must be used with extreme caution. is used to represent immutable data and other memory that is not meant to be written to. instances created by this method should not be written to. The purpose of this method is to allow variables typed as but only used for reading to store a . +> This method must be used with extreme caution. is used to represent immutable data and other memory that is not meant to be written to. instances created by this method should not be written to. The purpose of this method is to allow variables typed as but only used for reading to store a . ]]> @@ -615,7 +615,7 @@ This method is supported only on platforms that support misaligned memory access ## Remarks -The array must already be pinned before this method is called, and that array must not be unpinned while the buffer that it returns is still in use. Calling this method on an unpinned array could result in memory corruption. +The array must already be pinned before this method is called, and that array must not be unpinned while the buffer that it returns is still in use. Calling this method on an unpinned array could result in memory corruption. ]]> @@ -1268,7 +1268,7 @@ If the span is empty, this method returns a reference to the location where the ## Remarks -This method allows a read-only memory buffer to be used in existing APIs that require a parameter of type . +This method allows a read-only memory buffer to be used in existing APIs that require a parameter of type . ]]> @@ -1342,7 +1342,7 @@ This method allows a read-only memory buffer to be used in existing APIs that re ## Remarks > [!CAUTION] -> is used to represent immutable data. instances returned by this method should not be written to, and the wrapped array instance should only be passed to methods which treat the array contents as read-only. +> is used to represent immutable data. instances returned by this method should not be written to, and the wrapped array instance should only be passed to methods which treat the array contents as read-only. ]]> diff --git a/xml/System.Runtime.InteropServices/NFloat.xml b/xml/System.Runtime.InteropServices/NFloat.xml index 5b8046aa9b5..8c46eef3dec 100644 --- a/xml/System.Runtime.InteropServices/NFloat.xml +++ b/xml/System.Runtime.InteropServices/NFloat.xml @@ -2091,7 +2091,7 @@ This computes `cos(x * Ï€)`. This method correctly handles floating-point values and so `2.0` will return `true` while `2.2` will return `false`. -A return value of `false` does not imply that will return `true`. A number with a fractional portion, for example, `3.3`, is not even or odd. +A return value of `false` does not imply that will return `true`. A number with a fractional portion, for example, `3.3`, is not even or odd. ]]> @@ -2375,7 +2375,7 @@ This method correctly handles floating-point values and so `2.0` and `3.0` will This method correctly handles floating-point values and so `3.0` will return `true` while `3.3` will return `false`. -A return value of `false` does not imply that will return `true`. A number with a fractional portion, for example, `3.3`, is not even or odd. +A return value of `false` does not imply that will return `true`. A number with a fractional portion, for example, `3.3`, is not even or odd. ]]> @@ -2417,7 +2417,7 @@ A return value of `false` does not imply that will return `true`. A complex number, `a + bi` for non-zero `b`, is not positive or negative +A return value of `false` does not imply that will return `true`. A complex number, `a + bi` for non-zero `b`, is not positive or negative ]]> @@ -2880,7 +2880,7 @@ This function checks values against the extended real number line, thus returns ## Remarks -For , this method matches the IEEE 754:2019 `maximum` function. This requires NaN inputs to be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. +For , this method matches the IEEE 754:2019 `maximum` function. This requires NaN inputs to be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. ]]> @@ -2924,7 +2924,7 @@ For , this method matches the IEEE 754: ## Remarks -For , this method matches the IEEE 754:2019 `maximumMagnitude` function. This requires NaN inputs to not be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. +For , this method matches the IEEE 754:2019 `maximumMagnitude` function. This requires NaN inputs to not be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. ]]> @@ -2968,7 +2968,7 @@ For , this method matches the IE ## Remarks -For this method matches the IEEE 754:2019 `maximumMagnitudeNumber` function. This requires NaN inputs to not be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. +For this method matches the IEEE 754:2019 `maximumMagnitudeNumber` function. This requires NaN inputs to not be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. ]]> @@ -3044,7 +3044,7 @@ For this method matches the IEE ## Remarks -For this method matches the IEEE 754:2019 `maximumNumber` function. This requires NaN inputs to not be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. +For this method matches the IEEE 754:2019 `maximumNumber` function. This requires NaN inputs to not be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. ]]> @@ -3116,7 +3116,7 @@ For this method matches the IEEE 754:2 ## Remarks -For , this method matches the IEEE 754:2019 `minimum` function. This requires NaN inputs to be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. +For , this method matches the IEEE 754:2019 `minimum` function. This requires NaN inputs to be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. ]]> @@ -3160,7 +3160,7 @@ For , this method matches the IEEE 754: ## Remarks -For , this method matches the IEEE 754:2019 `minimumMagnitude` function. This requires NaN inputs to not be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. +For , this method matches the IEEE 754:2019 `minimumMagnitude` function. This requires NaN inputs to not be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. ]]> @@ -3204,7 +3204,7 @@ For , this method matches the IE ## Remarks -For this method matches the IEEE 754:2019 `minimumMagnitudeNumber` function. This requires NaN inputs to not be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. +For this method matches the IEEE 754:2019 `minimumMagnitudeNumber` function. This requires NaN inputs to not be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. ]]> @@ -3280,7 +3280,7 @@ For this method matches the IEE ## Remarks -For this method matches the IEEE 754:2019 `minimumNumber` function. This requires NaN inputs to not be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. +For this method matches the IEEE 754:2019 `minimumNumber` function. This requires NaN inputs to not be propagated back to the caller and for `-0.0` to be treated as less than `+0.0`. ]]> diff --git a/xml/System.Runtime.InteropServices/NativeLibrary.xml b/xml/System.Runtime.InteropServices/NativeLibrary.xml index bf6a5bd58b4..54e787a4014 100644 --- a/xml/System.Runtime.InteropServices/NativeLibrary.xml +++ b/xml/System.Runtime.InteropServices/NativeLibrary.xml @@ -211,7 +211,7 @@ Calling this method with an invalid `handle` parameter other than on the calling assembly, if any are present, are used. This method does not invoke the resolver registered using -method. Starting with .NET 5, this method does invoke the method and the event. +method. Starting with .NET 5, this method does invoke the method and the event. ]]> diff --git a/xml/System.Runtime.InteropServices/OSPlatform.xml b/xml/System.Runtime.InteropServices/OSPlatform.xml index 08336a85922..cac4a5a2212 100644 --- a/xml/System.Runtime.InteropServices/OSPlatform.xml +++ b/xml/System.Runtime.InteropServices/OSPlatform.xml @@ -112,18 +112,18 @@ Creates a new instance. An object that represents the operating system. - method with the following strings is equivalent to retrieving the object from the corresponding static property: - -|osPlatform string|OSPlatform property| -|-----------------------|-------------------------| + method with the following strings is equivalent to retrieving the object from the corresponding static property: + +|osPlatform string|OSPlatform property| +|-----------------------|-------------------------| |"FREEBSD"|| -|"LINUX"|| -|"OSX"|| -|"WINDOWS"|| - +|"LINUX"|| +|"OSX"|| +|"WINDOWS"|| + ]]> @@ -199,11 +199,11 @@ if is a instance and its name is the same as the current object. - object is the `osPlatform` string passed to the method. The names of the objects returned by the static properties are "LINUX", "OSX", and "WINDOWS". The method uses ordinal comparison to determine whether the names are the same. - + object is the `osPlatform` string passed to the method. The names of the objects returned by the static properties are "LINUX", "OSX", and "WINDOWS". The method uses ordinal comparison to determine whether the names are the same. + ]]> @@ -258,11 +258,11 @@ if the current instance and are equal; otherwise, . - instances are equal if they have the same name. The name of an object is the `osPlatform` string passed to the method. The names of the objects returned by the static OSPlatform properties are "LINUX", "OSX", and "WINDOWS". The method uses ordinal comparison to determine whether the names are the same. - + instances are equal if they have the same name. The name of an object is the `osPlatform` string passed to the method. The names of the objects returned by the static OSPlatform properties are "LINUX", "OSX", and "WINDOWS". The method uses ordinal comparison to determine whether the names are the same. + ]]> @@ -440,11 +440,11 @@ if and are equal; otherwise, . - instances are equal if they have the same name. The name of an object is the `osPlatform` string passed to the method. The names of the objects returned by the static OSPlatform properties are "FREEBSD", "LINUX", "OSX", and "WINDOWS". The method uses ordinal comparison to determine whether the names are the same. - + instances are equal if they have the same name. The name of an object is the `osPlatform` string passed to the method. The names of the objects returned by the static OSPlatform properties are "FREEBSD", "LINUX", "OSX", and "WINDOWS". The method uses ordinal comparison to determine whether the names are the same. + ]]> @@ -587,11 +587,11 @@ Returns the string representation of this instance. A string that represents this instance. - object is the `osPlatform` string passed to the method. The names of the OSPlatform objects returned by the static OSPlatform properties are "FREEBSD", "LINUX", "OSX", and "WINDOWS". - + object is the `osPlatform` string passed to the method. The names of the OSPlatform objects returned by the static OSPlatform properties are "FREEBSD", "LINUX", "OSX", and "WINDOWS". + ]]> diff --git a/xml/System.Runtime.InteropServices/RegistrationClassContext.xml b/xml/System.Runtime.InteropServices/RegistrationClassContext.xml index 2cdf672a662..ebb7a3147ab 100644 --- a/xml/System.Runtime.InteropServices/RegistrationClassContext.xml +++ b/xml/System.Runtime.InteropServices/RegistrationClassContext.xml @@ -23,13 +23,13 @@ Specifies the set of execution contexts in which a class object will be made available for requests to construct instances. - enumeration are used in the `classContext` parameter of the method. These values are the same as those defined in the COM **CLSCTX** enumeration, which is used as the `dwClsContext` parameter in calls to the COM API `CoRegisterClassObject`. - - For more information about `CoRegisterClassObject` and the **CLSCTX** enumeration, see the MSDN library. - + enumeration are used in the `classContext` parameter of the method. These values are the same as those defined in the COM **CLSCTX** enumeration, which is used as the `dwClsContext` parameter in calls to the COM API `CoRegisterClassObject`. + + For more information about `CoRegisterClassObject` and the **CLSCTX** enumeration, see the MSDN library. + ]]> diff --git a/xml/System.Runtime.InteropServices/RegistrationConnectionType.xml b/xml/System.Runtime.InteropServices/RegistrationConnectionType.xml index 30215e9dd85..1ccf50b51e1 100644 --- a/xml/System.Runtime.InteropServices/RegistrationConnectionType.xml +++ b/xml/System.Runtime.InteropServices/RegistrationConnectionType.xml @@ -23,13 +23,13 @@ Defines the types of connections to a class object. - enumeration are used in the `flags` parameter of the method. These values are the same as those defined in the COM **REGCLS** enumeration, which is used as the `flags` parameter in calls to the COM API `CoRegisterClassObject`. - - For more information about `CoRegisterClassObject` and the **REGCLS** enumeration, see the MSDN library. - + enumeration are used in the `flags` parameter of the method. These values are the same as those defined in the COM **REGCLS** enumeration, which is used as the `flags` parameter in calls to the COM API `CoRegisterClassObject`. + + For more information about `CoRegisterClassObject` and the **REGCLS** enumeration, see the MSDN library. + ]]> diff --git a/xml/System.Runtime.InteropServices/RegistrationServices.xml b/xml/System.Runtime.InteropServices/RegistrationServices.xml index adc91b7dc5a..ae84c4c8510 100644 --- a/xml/System.Runtime.InteropServices/RegistrationServices.xml +++ b/xml/System.Runtime.InteropServices/RegistrationServices.xml @@ -43,13 +43,13 @@ You can use the following methods to assist you in preparing a registration file: -- +- -- +- -- +- -- +- Although these methods help in gathering information to be used in a registration file, they do not actually produce a registration file. Instead, you can use the [Regasm.exe (Assembly Registration Tool)](/dotnet/framework/tools/regasm-exe-assembly-registration-tool) tool with the `/regfile` option to perform this task. methods cannot export and register a type library. To export and register a type library, you can use the [Regasm.exe (Assembly Registration Tool)](/dotnet/framework/tools/regasm-exe-assembly-registration-tool) tool and the [Tlbexp.exe (Type Library Exporter)](/dotnet/framework/tools/tlbexp-exe-type-library-exporter) tool. @@ -219,7 +219,7 @@ ## Remarks `RegisterAssembly` adds the appropriate registry entries for the types in the specified assembly. This method also calls any registration functions found in the assembly. - Use to get an assembly. + Use to get an assembly. ]]> @@ -296,9 +296,9 @@ method is not atomic and can cause unpredictable results when used in a multithreaded context. + This method is equivalent to calling `CoRegisterClassObject` in COM. The method is not atomic and can cause unpredictable results when used in a multithreaded context. - In version 2.0 and later, use the method to unregister a type in COM. + In version 2.0 and later, use the method to unregister a type in COM. Note that using platform invoke to call the unmanaged `CoRegisterClassObject` and `CoDisconnectObject` methods for registration and unregistration of COM objects is not supported. @@ -350,9 +350,9 @@ method is not atomic and can cause unpredictable results when used in a multithreaded context. + This method is equivalent to calling `CoRegisterClassObject` in COM. The method is not atomic and can cause unpredictable results when used in a multithreaded context. - In the .NET Framework version 2.0 and later, use the method to unregister a type in COM. + In the .NET Framework version 2.0 and later, use the method to unregister a type in COM. Note that using platform invoke to call the unmanaged `CoRegisterClassObject` and `CoDisconnectObject` methods for registration and unregistration of COM objects is not supported. @@ -474,7 +474,7 @@ . This method also calls any unregistration functions found in the assembly. + `UnregisterAssembly` removes the registry entries for the types in the specified assembly previously added by . This method also calls any unregistration functions found in the assembly. ]]> diff --git a/xml/System.Runtime.InteropServices/RuntimeEnvironment.xml b/xml/System.Runtime.InteropServices/RuntimeEnvironment.xml index 9a381186ca8..9b3118648f1 100644 --- a/xml/System.Runtime.InteropServices/RuntimeEnvironment.xml +++ b/xml/System.Runtime.InteropServices/RuntimeEnvironment.xml @@ -151,7 +151,7 @@ method. This code example is part of a larger example provided for the class. + The following example demonstrates calling the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/RuntimeEnvironment/cpp/RuntimeEnvironment.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/RuntimeEnvironment/Overview/RuntimeEnvironment.cs" id="Snippet2"::: @@ -211,7 +211,7 @@ method. This code example is part of a larger example provided for the class. + The following example demonstrates calling the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/RuntimeEnvironment/cpp/RuntimeEnvironment.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/RuntimeEnvironment/Overview/RuntimeEnvironment.cs" id="Snippet3"::: @@ -294,7 +294,7 @@ The following table shows the supported combinations for `clsid` and `riid`. |CLSID_TypeNameFactory|IID_TypeNameFactory| |CLSID_CLRStrongName|IID_CLRStrongName| - is similar to the method. + is similar to the method. ]]> @@ -364,7 +364,7 @@ The following table shows the supported combinations for `clsid` and `riid`. is similar to the method. + is similar to the method. ]]> diff --git a/xml/System.Runtime.InteropServices/SEHException.xml b/xml/System.Runtime.InteropServices/SEHException.xml index 65ac630d8fb..f3501914829 100644 --- a/xml/System.Runtime.InteropServices/SEHException.xml +++ b/xml/System.Runtime.InteropServices/SEHException.xml @@ -183,8 +183,8 @@ catch(…) |Property|Value| |--------------|-----------| -||A null reference (`Nothing` in Visual Basic).| -||A localized error message string.| +||A null reference (`Nothing` in Visual Basic).| +||A localized error message string.| ]]> @@ -243,8 +243,8 @@ catch(…) |Property|Value| |--------------|-----------| -||A null reference (`Nothing` in Visual Basic).| -||`message`.| +||A null reference (`Nothing` in Visual Basic).| +||`message`.| ]]> @@ -376,8 +376,8 @@ catch(…) |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> @@ -434,7 +434,7 @@ catch(…) returns `true`, then a filtered exception handler can correct the problem that caused the exception, and the code will continue from the point at which the exception was thrown. + If returns `true`, then a filtered exception handler can correct the problem that caused the exception, and the code will continue from the point at which the exception was thrown. ]]> diff --git a/xml/System.Runtime.InteropServices/SafeArrayRankMismatchException.xml b/xml/System.Runtime.InteropServices/SafeArrayRankMismatchException.xml index 625c610c81f..3bf1ba1d284 100644 --- a/xml/System.Runtime.InteropServices/SafeArrayRankMismatchException.xml +++ b/xml/System.Runtime.InteropServices/SafeArrayRankMismatchException.xml @@ -148,8 +148,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||A localized error message string.| +||`null`.| +||A localized error message string.| ]]> @@ -208,8 +208,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||`message`| +||`null`.| +||`message`| ]]> @@ -341,8 +341,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> diff --git a/xml/System.Runtime.InteropServices/SafeArrayTypeMismatchException.xml b/xml/System.Runtime.InteropServices/SafeArrayTypeMismatchException.xml index cae6b997cc6..39e0d1183b7 100644 --- a/xml/System.Runtime.InteropServices/SafeArrayTypeMismatchException.xml +++ b/xml/System.Runtime.InteropServices/SafeArrayTypeMismatchException.xml @@ -146,8 +146,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||A localized error message string.| +||`null`.| +||A localized error message string.| ]]> @@ -206,8 +206,8 @@ |Property|Value| |--------------|-----------| -||`null`.| -||`message`| +||`null`.| +||`message`| ]]> @@ -339,8 +339,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> diff --git a/xml/System.Runtime.InteropServices/SafeBuffer.xml b/xml/System.Runtime.InteropServices/SafeBuffer.xml index 4b3de3944ec..19f719241c6 100644 --- a/xml/System.Runtime.InteropServices/SafeBuffer.xml +++ b/xml/System.Runtime.InteropServices/SafeBuffer.xml @@ -84,11 +84,11 @@ method before you use any instance of . To avoid races when you store an instance of a object in a static variable, you should use one of the following approaches: + You must call the method before you use any instance of . To avoid races when you store an instance of a object in a static variable, you should use one of the following approaches: - Create a lock when publishing the . -- Create a local variable, initialize the , and then assign the to the static variable, for example, by using the method. +- Create a local variable, initialize the , and then assign the to the static variable, for example, by using the method. > [!NOTE] > Assignments in a static class constructor are implicitly locked. @@ -207,11 +207,11 @@ returns, you should perform bounds checking by verifying that the `pointer` parameter is `null`. If it is not `null`, you must call the method in a constrained execution region (CER). + When returns, you should perform bounds checking by verifying that the `pointer` parameter is `null`. If it is not `null`, you must call the method in a constrained execution region (CER). - calls the method and exposes the pointer. + calls the method and exposes the pointer. - The following example demonstrates how to use the method: + The following example demonstrates how to use the method: ``` byte* pointer = null; diff --git a/xml/System.Runtime.InteropServices/SafeHandle.xml b/xml/System.Runtime.InteropServices/SafeHandle.xml index 9372e08d525..8ea769fd566 100644 --- a/xml/System.Runtime.InteropServices/SafeHandle.xml +++ b/xml/System.Runtime.InteropServices/SafeHandle.xml @@ -177,7 +177,7 @@ Optionally specify `-Fault` to intentionally attempt to leak the handle by abort is never called; thus, it is not recommended to use this parameter value as your code may leak resources. + If the `ownsHandle` parameter is `false`, is never called; thus, it is not recommended to use this parameter value as your code may leak resources. ]]> @@ -242,12 +242,12 @@ Optionally specify `-Fault` to intentionally attempt to leak the handle by abort or method allows the resources to be freed. This might not happen immediately if other threads are using the same safe handle object, but will happen as soon as that is no longer the case. Although most classes that use the class do not need to provide a finalizer, this is sometimes necessary (for example, to flush out file buffers or to write some data back into memory). In this case, the class can provide a finalizer that is guaranteed to run before the critical finalizer runs. + Calling the or method allows the resources to be freed. This might not happen immediately if other threads are using the same safe handle object, but will happen as soon as that is no longer the case. Although most classes that use the class do not need to provide a finalizer, this is sometimes necessary (for example, to flush out file buffers or to write some data back into memory). In this case, the class can provide a finalizer that is guaranteed to run before the critical finalizer runs. - Call the or method when you are finished using the object. + Call the or method when you are finished using the object. > [!NOTE] -> Always call or before you release your last reference to the object. Otherwise, the resources it is using will not be freed until the garbage collector calls the object's method. +> Always call or before you release your last reference to the object. Otherwise, the resources it is using will not be freed until the garbage collector calls the object's method. ]]> @@ -318,7 +318,7 @@ Optionally specify `-Fault` to intentionally attempt to leak the handle by abort method prevents the common language runtime from reclaiming memory used by a handle (which occurs when the runtime calls the method). You can use this method to manually increment the reference count on a instance. returns a Boolean value using a `ref` parameter (`success`) that indicates whether the reference count was incremented successfully. This allows your program logic to back out in case of failure. You should set `success` to `false` before calling . If `success` is `true`, avoid resource leaks by matching the call to with a corresponding call to . + The method prevents the common language runtime from reclaiming memory used by a handle (which occurs when the runtime calls the method). You can use this method to manually increment the reference count on a instance. returns a Boolean value using a `ref` parameter (`success`) that indicates whether the reference count was incremented successfully. This allows your program logic to back out in case of failure. You should set `success` to `false` before calling . If `success` is `true`, avoid resource leaks by matching the call to with a corresponding call to . If this call is successful, it will set the `ref bool success` parameter to `true` and return successfully. If this call is unsuccessful, it will throw an exception and leave the `ref bool success` parameter unmodified. @@ -393,7 +393,7 @@ If this call is successful, it will set the `ref bool success` parameter to `tru You can use this method to retrieve the actual handle value from an instance of the derived class. This method is needed for backwards compatibility because many properties in the .NET Framework return `IntPtr` handle types. `IntPtr` handle types are platform-specific types used to represent a pointer or a handle. > [!CAUTION] -> Using the method can pose security risks because, if the handle has been marked as invalid with , still returns the original, potentially stale handle value. The returned handle can also be recycled at any point. At best, this means the handle might suddenly stop working. At worst, if the handle or the resource that the handle represents is exposed to untrusted code, this can lead to a recycling security attack on the reused or returned handle. For example, an untrusted caller can query data on the handle just returned and receive information for an entirely unrelated resource. See the and the methods for more information about using the method safely. +> Using the method can pose security risks because, if the handle has been marked as invalid with , still returns the original, potentially stale handle value. The returned handle can also be recycled at any point. At best, this means the handle might suddenly stop working. At worst, if the handle or the resource that the handle represents is exposed to untrusted code, this can lead to a recycling security attack on the reused or returned handle. For example, an untrusted caller can query data on the handle just returned and receive information for an entirely unrelated resource. See the and the methods for more information about using the method safely. ]]> @@ -460,10 +460,10 @@ If this call is successful, it will set the `ref bool success` parameter to `tru method is the counterpart to . You should always match a call to the method with a successful call to . + The method is the counterpart to . You should always match a call to the method with a successful call to . > [!CAUTION] -> In the same way that unmatched calls can cause resource leaks, unmatched calls can cause invalid handle states to become visible to other threads. +> In the same way that unmatched calls can cause resource leaks, unmatched calls can cause invalid handle states to become visible to other threads. ]]> @@ -543,12 +543,12 @@ If this call is successful, it will set the `ref bool success` parameter to `tru or method allows the resources to be freed. This might not happen immediately if other threads are using the same instance of the safe handle, but will happen as soon as that is no longer the case. Although most classes using do not need to provide a finalizer, this is sometimes necessary (for example, to flush out file buffers or to write some data back into memory). In this case, they can provide a finalizer that is guaranteed to run before the critical finalizer runs. + Calling the or method allows the resources to be freed. This might not happen immediately if other threads are using the same instance of the safe handle, but will happen as soon as that is no longer the case. Although most classes using do not need to provide a finalizer, this is sometimes necessary (for example, to flush out file buffers or to write some data back into memory). In this case, they can provide a finalizer that is guaranteed to run before the critical finalizer runs. - Call the or method when you are finished using the object. The method leaves the object in an unusable state. + Call the or method when you are finished using the object. The method leaves the object in an unusable state. > [!NOTE] -> Always call the or method before you release your last reference to the object. Otherwise, the resources it is using will not be freed until the garbage collector calls the object's method. +> Always call the or method before you release your last reference to the object. Otherwise, the resources it is using will not be freed until the garbage collector calls the object's method. ]]> @@ -619,7 +619,7 @@ If this call is successful, it will set the `ref bool success` parameter to `tru method with the `disposing` parameter set to `false`. + You should never explicitly call the method with the `disposing` parameter set to `false`. ]]> @@ -682,7 +682,7 @@ If this call is successful, it will set the `ref bool success` parameter to `tru method is the destructor for the class. Application code should not call this method directly. + The method is the destructor for the class. Application code should not call this method directly. ]]> @@ -807,11 +807,11 @@ If this call is successful, it will set the `ref bool success` parameter to `tru method returns a value indicating whether the object's handle is no longer associated with a native resource. This differs from the definition of the property, which computes whether a given handle is always considered invalid. The method returns a `true` value in the following cases: + The method returns a value indicating whether the object's handle is no longer associated with a native resource. This differs from the definition of the property, which computes whether a given handle is always considered invalid. The method returns a `true` value in the following cases: -- The method was called. +- The method was called. -- The method or method was called and there are no references to the object on other threads. +- The method or method was called and there are no references to the object on other threads. ]]> @@ -949,11 +949,11 @@ If this call is successful, it will set the `ref bool success` parameter to `tru method is guaranteed to be called only once and only if the handle is valid as defined by the property. Implement this method in your derived classes to execute any code that is required to free the handle. Because one of the functions of is to guarantee prevention of resource leaks, the code in your implementation of must never fail. The garbage collector calls after normal finalizers have been run for objects that were garbage collected at the same time. The garbage collector guarantees the resources to invoke this method and that the method will not be interrupted while it is in progress. + The method is guaranteed to be called only once and only if the handle is valid as defined by the property. Implement this method in your derived classes to execute any code that is required to free the handle. Because one of the functions of is to guarantee prevention of resource leaks, the code in your implementation of must never fail. The garbage collector calls after normal finalizers have been run for objects that were garbage collected at the same time. The garbage collector guarantees the resources to invoke this method and that the method will not be interrupted while it is in progress. Additionally, for simple cleanup (for example, calling the Windows API `CloseHandle` on a file handle) you can check the return value for the single platform invoke call. For complex cleanup, you may have a lot of program logic and many method calls, some of which might fail. You must ensure that your program logic has fallback code for each of those cases. - If returns `false` for any reason, it generates a [releaseHandleFailed](/dotnet/framework/debug-trace-profile/releasehandlefailed-mda) Managed Debugging Assistant when running on .NET Framework. This helps you detect cases where your attempt to release resources fails. + If returns `false` for any reason, it generates a [releaseHandleFailed](/dotnet/framework/debug-trace-profile/releasehandlefailed-mda) Managed Debugging Assistant when running on .NET Framework. This helps you detect cases where your attempt to release resources fails. ## Examples The following code example releases the handle and is part of a larger example provided for the class. @@ -1030,7 +1030,7 @@ If this call is successful, it will set the `ref bool success` parameter to `tru method only if you need to support a pre-existing handle (for example, if the handle is returned in a structure) because the .NET Framework COM interop infrastructure does not support marshaling output handles in a structure. + Use the method only if you need to support a pre-existing handle (for example, if the handle is returned in a structure) because the .NET Framework COM interop infrastructure does not support marshaling output handles in a structure. ]]> @@ -1097,9 +1097,9 @@ If this call is successful, it will set the `ref bool success` parameter to `tru method only when you know that your handle no longer references a resource. Doing so does not change the value of the field; it only marks the handle as closed. The handle might then contain a potentially stale value. The effect of this call is that no attempt is made to free the resources. + Call the method only when you know that your handle no longer references a resource. Doing so does not change the value of the field; it only marks the handle as closed. The handle might then contain a potentially stale value. The effect of this call is that no attempt is made to free the resources. - As with the method, use only if you need to support a pre-existing handle. + As with the method, use only if you need to support a pre-existing handle. ]]> diff --git a/xml/System.Runtime.InteropServices/TypeIdentifierAttribute.xml b/xml/System.Runtime.InteropServices/TypeIdentifierAttribute.xml index 47a9e777364..4f4fd0e7173 100644 --- a/xml/System.Runtime.InteropServices/TypeIdentifierAttribute.xml +++ b/xml/System.Runtime.InteropServices/TypeIdentifierAttribute.xml @@ -73,7 +73,7 @@ - For types that don't have GUIDs in their type library, it has a constructor that takes two strings (`scope` and `identifier`). These are combined into a GUID and become the key that is used for type equivalence. - Type equivalence is discussed in the topic. + Type equivalence is discussed in the topic. ]]> diff --git a/xml/System.Runtime.InteropServices/TypeLibExporterFlags.xml b/xml/System.Runtime.InteropServices/TypeLibExporterFlags.xml index 55fc5ed7a4f..d0ded6dec90 100644 --- a/xml/System.Runtime.InteropServices/TypeLibExporterFlags.xml +++ b/xml/System.Runtime.InteropServices/TypeLibExporterFlags.xml @@ -32,11 +32,11 @@ Indicates how a type library should be produced. - . - + . + ]]> diff --git a/xml/System.Runtime.InteropServices/TypeLibImporterFlags.xml b/xml/System.Runtime.InteropServices/TypeLibImporterFlags.xml index f97d9ae40e5..7aadd12dff0 100644 --- a/xml/System.Runtime.InteropServices/TypeLibImporterFlags.xml +++ b/xml/System.Runtime.InteropServices/TypeLibImporterFlags.xml @@ -35,7 +35,7 @@ method. + This enumeration is used with the method. ]]> diff --git a/xml/System.Runtime.InteropServices/TypeMapAssociationAttribute`1.xml b/xml/System.Runtime.InteropServices/TypeMapAssociationAttribute`1.xml index 1a92d7e6212..0dd97f8c312 100644 --- a/xml/System.Runtime.InteropServices/TypeMapAssociationAttribute`1.xml +++ b/xml/System.Runtime.InteropServices/TypeMapAssociationAttribute`1.xml @@ -43,9 +43,9 @@ Types used in a managed-to-unmanaged interop operation can use is specified with a flag that preserves constructors for the storage location. -- Calls to with a constant string representing the type name when is specified with a flag that preserves constructors. +- Calls to with a constant string representing the type name when is specified with a flag that preserves constructors. - The type of a method argument to the `newobj` instruction. -- The generic argument to the method. +- The generic argument to the method. - The argument to the `box` instruction. - The argument to the `newarr` instruction. - The argument to the `mkrefany` instruction. diff --git a/xml/System.Runtime.InteropServices/TypeMapAttribute`1.xml b/xml/System.Runtime.InteropServices/TypeMapAttribute`1.xml index ff7f57f30ab..fa73e68b313 100644 --- a/xml/System.Runtime.InteropServices/TypeMapAttribute`1.xml +++ b/xml/System.Runtime.InteropServices/TypeMapAttribute`1.xml @@ -57,8 +57,8 @@ When an application is trimmed, an entry in the External Type Map is included wh - The argument to the `newarr` instruction. - The type of a method argument to the `newobj` instruction if it's a class type. - The owning type of an instance method argument to `call` or `ldftn`, or the owning type of any method argument to `callvirt` or `ldvirtftn`. If the owning type is an interface and the trimming tool can determine that there's only one implementation of the interface, it's free to interpret the method token argument as though it's the method on the only implementing type. -- The generic argument to the method. -- Calls to with a constant string representing the type name. +- The generic argument to the method. +- Calls to with a constant string representing the type name. Many of these instructions can be passed a generic parameter. In that case, the trimming tool should consider type arguments of instantiations of that type as having met one of these rules and include any entries with those types as "trim target" types. diff --git a/xml/System.Runtime.InteropServices/UCOMITypeInfo.xml b/xml/System.Runtime.InteropServices/UCOMITypeInfo.xml index bcd5af090bd..7ae28a9ddd0 100644 --- a/xml/System.Runtime.InteropServices/UCOMITypeInfo.xml +++ b/xml/System.Runtime.InteropServices/UCOMITypeInfo.xml @@ -30,11 +30,11 @@ Use instead. - @@ -67,11 +67,11 @@ On successful return, a reference to the member. Retrieves the addresses of static functions or variables, such as those defined in a DLL. - @@ -104,11 +104,11 @@ On successful return, a reference to the created object. Creates a new instance of a type that describes a component class (coclass). - @@ -139,11 +139,11 @@ On successful return, a reference to the index of the type description within the containing type library. Retrieves the type library that contains this type description and its index within that type library. - @@ -180,11 +180,11 @@ If not , and the function is defined by an ordinal, then lpwOrdinal is set to point to the ordinal. Retrieves a description or specification of an entry point for a function in a DLL. - @@ -221,11 +221,11 @@ On successful return, the fully qualified name of the Help file. Retrieves the documentation string, the complete Help file name and path, and the context ID for the Help topic for a specified type description. - @@ -256,13 +256,13 @@ Reference to a that describes the specified function. Retrieves the structure that contains information about a specified function. - . - - For additional information about `ITypeInfo::GetFuncDesc`, see the MSDN Library. - + . + + For additional information about `ITypeInfo::GetFuncDesc`, see the MSDN Library. + ]]> @@ -295,11 +295,11 @@ Reference to an array in which name mappings are placed. Maps between member names and member IDs, and parameter names and parameter IDs. - @@ -330,11 +330,11 @@ On successful return, a reference to the enumeration. Retrieves the value for one implemented interface or base interface in a type description. - @@ -365,11 +365,11 @@ A reference to the opcode string used in marshaling the fields of the structure described by the referenced type description, or returns if there is no information to return. Retrieves marshaling information. - @@ -404,11 +404,11 @@ On successful return, the number of names in the array. Retrieves the variable with the specified member ID (or the name of the property or method and its parameters) that correspond to the specified function ID. - @@ -439,11 +439,11 @@ On successful return, the referenced type description. If a type description references other type descriptions, it retrieves the referenced type descriptions. - @@ -474,11 +474,11 @@ Reference to a handle for the implemented interface. If a type description describes a COM class, it retrieves the type description of the implemented interface types. - @@ -507,13 +507,13 @@ On successful return, a reference to the structure that contains the attributes of this type description. Retrieves a structure that contains the attributes of the type description. - . - - For additional information about `ITypeInfo::GetTypeAttr`, see the MSDN Library. - + . + + For additional information about `ITypeInfo::GetTypeAttr`, see the MSDN Library. + ]]> @@ -542,11 +542,11 @@ On successful return, a reference to the of the containing type library. Retrieves the interface for the type description, which enables a client compiler to bind to the type description's members. - @@ -577,13 +577,13 @@ On successful return, a reference to the that describes the specified variable. Retrieves a structure that describes the specified variable. - . - - For additional information about `ITypeInfo::GetVarDesc`, see the MSDN Library. - + . + + For additional information about `ITypeInfo::GetVarDesc`, see the MSDN Library. + ]]> @@ -624,22 +624,22 @@ If returns , indicates the index within rgvarg of the argument with incorrect type. If more than one argument returns an error, indicates only the first argument with an error. Invokes a method, or accesses a property of an object, that implements the interface described by the type description. - . - - Valid values for `wFlags` are: - -|Value|Description| -|-----------|-----------------| -|DISPATCH_METHOD|The member is accessed as a method. If there is ambiguity, both this and the `DISPATCH_PROPERTYGET` flag can be set.| -|DISPATCH_PROPERTYGET|The member is retrieved as a property or data member.| -|DISPATCH_PROPERTYPUT|The member is changed as a property or data member.| -|DISPATCH_PROPERTYPUTREF|The member is changed by using a reference assignment, rather than a value assignment. This value is only valid when the property accepts a reference to an object.| - - For additional information about `ITypeInfo::Invoke`, see the MSDN Library. - + . + + Valid values for `wFlags` are: + +|Value|Description| +|-----------|-----------------| +|DISPATCH_METHOD|The member is accessed as a method. If there is ambiguity, both this and the `DISPATCH_PROPERTYGET` flag can be set.| +|DISPATCH_PROPERTYGET|The member is retrieved as a property or data member.| +|DISPATCH_PROPERTYPUT|The member is changed as a property or data member.| +|DISPATCH_PROPERTYPUTREF|The member is changed by using a reference assignment, rather than a value assignment. This value is only valid when the property accepts a reference to an object.| + + For additional information about `ITypeInfo::Invoke`, see the MSDN Library. + ]]> @@ -668,11 +668,11 @@ Reference to the to release. Releases a previously returned by . - @@ -701,11 +701,11 @@ Reference to the to release. Releases a previously returned by . - @@ -734,11 +734,11 @@ Reference to the to release. Releases a previously returned by . - diff --git a/xml/System.Runtime.InteropServices/UCOMITypeLib.xml b/xml/System.Runtime.InteropServices/UCOMITypeLib.xml index fc224ed07c3..6d30b237bcc 100644 --- a/xml/System.Runtime.InteropServices/UCOMITypeLib.xml +++ b/xml/System.Runtime.InteropServices/UCOMITypeLib.xml @@ -42,11 +42,11 @@ Use instead. - @@ -80,18 +80,18 @@ A hash value to speed up the search, computed by the function. If is 0, a value is computed. On successful return, an array of pointers to the type descriptions that contain the name specified in . An array of the 's of the found items; [i] is the that indexes into the type description specified by [i]. Cannot be . - On entry, indicates how many instances to look for. For example, = 1 can be called to find the first occurrence. The search stops when one instance is found. - + On entry, indicates how many instances to look for. For example, = 1 can be called to find the first occurrence. The search stops when one instance is found. + On exit, indicates the number of instances that were found. If the and values of are identical, there might be more type descriptions that contain the name. Finds occurrences of a type description in a type library. - @@ -139,11 +139,11 @@ Returns a string that contains the fully qualified name of the Help file. Retrieves the library's documentation string, the complete Help file name and path, and the context identifier for the library Help topic in the Help file. - @@ -183,13 +183,13 @@ On successful return, a structure that contains the library's attributes. Retrieves the structure that contains the library's attributes. - . - - For additional information about `ITypeLib::GetTypeLibAttr`, see the MSDN Library. - + . + + For additional information about `ITypeLib::GetTypeLibAttr`, see the MSDN Library. + ]]> @@ -218,11 +218,11 @@ On successful return, an instance of a instance for this . Enables a client compiler to bind to a library's types, variables, constants, and global functions. - @@ -253,11 +253,11 @@ On successful return, a describing the type referenced by . Retrieves the specified type description in the library. - @@ -295,11 +295,11 @@ Returns the number of type descriptions in the type library. The number of type descriptions in the type library. - @@ -330,11 +330,11 @@ On successful return, the requested interface. Retrieves the type description that corresponds to the specified GUID. - @@ -370,11 +370,11 @@ A reference to the enumeration for the type description. Retrieves the type of a type description. - @@ -405,11 +405,11 @@ Reference to the enumeration for the type description. Retrieves the type of a type description. - @@ -453,11 +453,11 @@ if was found in the type library; otherwise . - @@ -497,11 +497,11 @@ The to release. Releases the originally obtained from . - diff --git a/xml/System.Runtime.InteropServices/VariantWrapper.xml b/xml/System.Runtime.InteropServices/VariantWrapper.xml index 5f5bc0aaeba..c5eb6c1c95e 100644 --- a/xml/System.Runtime.InteropServices/VariantWrapper.xml +++ b/xml/System.Runtime.InteropServices/VariantWrapper.xml @@ -71,25 +71,25 @@ Marshals data of type from managed to unmanaged code. This class cannot be inherited. - is to add one level of indirection when marshaling a managed type to the corresponding `VARIANT` type. - - You can use this class to wrap an that the interop marshaler passes as `VT_VARIANT | VT_BYREF`. In versions 1.0 and 1.1 of the .NET Framework, it was not possible to marshal variant data of type `VT_VARIANT | VT_BYREF` to unmanaged code. The interop marshaler passed a variant of the managed type (for example, `VT_BSTR | VT_BYREF` for , or `VT_I4 | VT_BYREF` for ), but not `VT_VARIANT | VT_BYREF`. - - One advantage of using `VT_VARIANT | VT_BYREF` variant types is that the type of data can be changed during a method call. For example, you can pass a `VT_VARIANT | VT_BYREF` variant type that contains a `VT_BSTR` and get a variant returned that contains a `VT_I4` after a method call. Because the COM interop marshaler has no way of knowing when to pass `VT_BSTR | VT_BYREF` and when to pass `VT_VARIANT | VT_BYREF`, which points to a variant that contains a `BSTR` for parameters declared as `VARIANT *`, you can instruct the marshaler by using . - - Note that early binding is not supported; you can use only when calling or with a Dispatch-only interface called in an early bound fashion. In C#, you must also use the `ref` keyword to specify `ByRef` semantics for any parameter of type . In Visual Basic, `ByRef` semantics are added automatically for every implicit late binding call. Also note that nesting objects and arrays of objects is not supported. - - - -## Examples - The following code example demonstrates how to use the class to wrap an that the interop marshaler passes as `VT_VARIANT | VT_BYREF`. - + is to add one level of indirection when marshaling a managed type to the corresponding `VARIANT` type. + + You can use this class to wrap an that the interop marshaler passes as `VT_VARIANT | VT_BYREF`. In versions 1.0 and 1.1 of the .NET Framework, it was not possible to marshal variant data of type `VT_VARIANT | VT_BYREF` to unmanaged code. The interop marshaler passed a variant of the managed type (for example, `VT_BSTR | VT_BYREF` for , or `VT_I4 | VT_BYREF` for ), but not `VT_VARIANT | VT_BYREF`. + + One advantage of using `VT_VARIANT | VT_BYREF` variant types is that the type of data can be changed during a method call. For example, you can pass a `VT_VARIANT | VT_BYREF` variant type that contains a `VT_BSTR` and get a variant returned that contains a `VT_I4` after a method call. Because the COM interop marshaler has no way of knowing when to pass `VT_BSTR | VT_BYREF` and when to pass `VT_VARIANT | VT_BYREF`, which points to a variant that contains a `BSTR` for parameters declared as `VARIANT *`, you can instruct the marshaler by using . + + Note that early binding is not supported; you can use only when calling or with a Dispatch-only interface called in an early bound fashion. In C#, you must also use the `ref` keyword to specify `ByRef` semantics for any parameter of type . In Visual Basic, `ByRef` semantics are added automatically for every implicit late binding call. Also note that nesting objects and arrays of objects is not supported. + + + +## Examples + The following code example demonstrates how to use the class to wrap an that the interop marshaler passes as `VT_VARIANT | VT_BYREF`. + :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/VariantWrapper/Overview/sample.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/VariantWrapper/Overview/sample.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/VariantWrapper/Overview/sample.vb" id="Snippet1"::: + ]]> @@ -140,14 +140,14 @@ The object to marshal. Initializes a new instance of the class for the specified parameter. - class to wrap an that the interop marshaler passes as `VT_VARIANT | VT_BYREF`. - + class to wrap an that the interop marshaler passes as `VT_VARIANT | VT_BYREF`. + :::code language="csharp" source="~/snippets/csharp/System.Runtime.InteropServices/VariantWrapper/Overview/sample.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/VariantWrapper/Overview/sample.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.InteropServices/VariantWrapper/Overview/sample.vb" id="Snippet1"::: + ]]> diff --git a/xml/System.Runtime.InteropServices/_Assembly.xml b/xml/System.Runtime.InteropServices/_Assembly.xml index e6d95c9cdeb..a07e4cf140e 100644 --- a/xml/System.Runtime.InteropServices/_Assembly.xml +++ b/xml/System.Runtime.InteropServices/_Assembly.xml @@ -101,7 +101,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The methods locate a type from this assembly and create an instance of it using the system activator. + The methods locate a type from this assembly and create an instance of it using the system activator. ]]> @@ -138,7 +138,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method locates the specified type from this assembly and creates an instance of it using the system activator, using case-sensitive search. + The method locates the specified type from this assembly and creates an instance of it using the system activator, using case-sensitive search. ]]> @@ -178,7 +178,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method locates the specified type from this assembly and creates an instance of it using the system activator, with optional case-sensitive search. + The method locates the specified type from this assembly and creates an instance of it using the system activator, with optional case-sensitive search. ]]> @@ -228,7 +228,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method locates the specified type from this assembly and creates an instance of it using the system activator, with optional case-sensitive search and having the specified culture, arguments, and binding and activation attributes. + The method locates the specified type from this assembly and creates an instance of it using the system activator, with optional case-sensitive search and having the specified culture, arguments, and binding and activation attributes. An example of an activation attribute for the `activationAttributes` parameter is: `URLAttribute(http://hostname/appname/objectURI)`. @@ -301,7 +301,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method determines whether the specified is equal to the current . + The method determines whether the specified is equal to the current . ]]> @@ -421,7 +421,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The methods get the custom attributes for this assembly. + The methods get the custom attributes for this assembly. ]]> @@ -458,7 +458,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets all the custom attributes for this assembly. + The method gets all the custom attributes for this assembly. ]]> @@ -497,7 +497,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets all the custom attributes for this assembly. + The method gets all the custom attributes for this assembly. ]]> @@ -568,7 +568,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets a for the specified file in the file table of the manifest of this assembly. + The method gets a for the specified file in the file table of the manifest of this assembly. ]]> @@ -589,7 +589,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The methods get the files in the file table of an assembly manifest. + The methods get the files in the file table of an assembly manifest. ]]> @@ -623,7 +623,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the files in the file table of an assembly manifest. + The method gets the files in the file table of an assembly manifest. ]]> @@ -661,7 +661,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the files in the file table of an assembly manifest, specifying whether to include resource modules. + The method gets the files in the file table of an assembly manifest, specifying whether to include resource modules. ]]> @@ -695,7 +695,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. + The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. ]]> @@ -716,7 +716,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The methods get all the loaded modules that are part of this assembly. + The methods get all the loaded modules that are part of this assembly. ]]> @@ -750,7 +750,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets all the loaded modules that are part of this assembly. + The method gets all the loaded modules that are part of this assembly. ]]> @@ -788,7 +788,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets all the loaded modules that are part of this assembly, specifying whether to include resource modules. + The method gets all the loaded modules that are part of this assembly, specifying whether to include resource modules. ]]> @@ -825,7 +825,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns information about how the given resource has been persisted. + The method returns information about how the given resource has been persisted. ]]> @@ -859,7 +859,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns the names of all the resources in this assembly. + The method returns the names of all the resources in this assembly. ]]> @@ -880,7 +880,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The methods load the specified manifest resource from this assembly. + The methods load the specified manifest resource from this assembly. ]]> @@ -917,7 +917,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method loads the specified manifest resource from this assembly. + The method loads the specified manifest resource from this assembly. ]]> @@ -956,7 +956,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method loads the specified manifest resource, scoped by the namespace of the specified type, from this assembly. + The method loads the specified manifest resource, scoped by the namespace of the specified type, from this assembly. ]]> @@ -993,7 +993,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the specified module in this assembly. + The method gets the specified module in this assembly. ]]> @@ -1014,7 +1014,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The methods get all the modules that are part of this assembly. + The methods get all the modules that are part of this assembly. ]]> @@ -1048,7 +1048,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets all the modules that are part of this assembly. + The method gets all the modules that are part of this assembly. ]]> @@ -1086,7 +1086,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets all the modules that are part of this assembly, specifying whether to include resource modules. + The method gets all the modules that are part of this assembly, specifying whether to include resource modules. ]]> @@ -1107,7 +1107,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The methods get an for this assembly. + The methods get an for this assembly. ]]> @@ -1141,7 +1141,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets an for this assembly. + The method gets an for this assembly. ]]> @@ -1179,7 +1179,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets an for this assembly, setting the codebase as specified by the `copiedName` parameter. + The method gets an for this assembly, setting the codebase as specified by the `copiedName` parameter. ]]> @@ -1223,7 +1223,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets serialization information with all of the data needed to reinstantiate this assembly. + The method gets serialization information with all of the data needed to reinstantiate this assembly. ]]> @@ -1257,7 +1257,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the objects for all the assemblies referenced by this assembly. + The method gets the objects for all the assemblies referenced by this assembly. ]]> @@ -1278,7 +1278,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The methods get the satellite assembly. + The methods get the satellite assembly. ]]> @@ -1315,7 +1315,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the satellite assembly for the specified culture. + The method gets the satellite assembly for the specified culture. ]]> @@ -1354,7 +1354,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the specified version of the satellite assembly for the specified culture. + The method gets the specified version of the satellite assembly for the specified culture. ]]> @@ -1375,7 +1375,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The methods get the object that represents the specified type. + The methods get the object that represents the specified type. ]]> @@ -1409,7 +1409,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the type of the current instance. + The method gets the type of the current instance. ]]> @@ -1446,7 +1446,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the object with the specified name in the assembly instance. + The method gets the object with the specified name in the assembly instance. ]]> @@ -1486,7 +1486,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the object with the specified name in the assembly instance and optionally throws an exception if the type is not found. + The method gets the object with the specified name in the assembly instance and optionally throws an exception if the type is not found. ]]> @@ -1529,7 +1529,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the object with the specified name in the assembly instance, with the options of ignoring the case, and of throwing an exception if the type is not found. + The method gets the object with the specified name in the assembly instance, with the options of ignoring the case, and of throwing an exception if the type is not found. ]]> @@ -1563,7 +1563,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the types defined in this assembly. + The method gets the types defined in this assembly. ]]> @@ -1637,7 +1637,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method indicates whether a custom attribute identified by the specified is defined. + The method indicates whether a custom attribute identified by the specified is defined. ]]> @@ -1658,7 +1658,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The members load the module internal to this assembly. + The members load the module internal to this assembly. ]]> @@ -1697,7 +1697,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method loads the module, internal to this assembly, with a Common Object File Format (COFF)-based image containing an emitted module, or a resource file. + The method loads the module, internal to this assembly, with a Common Object File Format (COFF)-based image containing an emitted module, or a resource file. ]]> @@ -1738,7 +1738,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method loads the module, internal to this assembly, with a Common Object File Format (COFF)-based image containing an emitted module, or a resource file. The raw bytes representing the symbols for the module are also loaded. + The method loads the module, internal to this assembly, with a Common Object File Format (COFF)-based image containing an emitted module, or a resource file. The raw bytes representing the symbols for the module are also loaded. ]]> @@ -1847,7 +1847,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns the full name of the assembly, also known as the display name. + The method returns the full name of the assembly, also known as the display name. ]]> diff --git a/xml/System.Runtime.InteropServices/_ConstructorInfo.xml b/xml/System.Runtime.InteropServices/_ConstructorInfo.xml index aeb216af496..5b89ad3a7eb 100644 --- a/xml/System.Runtime.InteropServices/_ConstructorInfo.xml +++ b/xml/System.Runtime.InteropServices/_ConstructorInfo.xml @@ -178,7 +178,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method determines whether the specified is equal to the current . + The method determines whether the specified is equal to the current . ]]> @@ -196,7 +196,7 @@ members return all attributes applied to this member. + The members return all attributes applied to this member. ]]> @@ -232,7 +232,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns an array containing all the custom attributes. + The method returns an array containing all the custom attributes. ]]> @@ -270,7 +270,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns an array of custom attributes identified by . + The method returns an array of custom attributes identified by . ]]> @@ -303,7 +303,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. + The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. ]]> @@ -377,7 +377,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The member returns the flags. + The member returns the flags. ]]> @@ -410,7 +410,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the parameters of the specified method or constructor. + The method gets the parameters of the specified method or constructor. ]]> @@ -443,7 +443,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the type of the current instance. + The method gets the type of the current instance. ]]> @@ -604,7 +604,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method invokes the constructor reflected by this with the specified arguments, under the constraints of the specified . + The method invokes the constructor reflected by this with the specified arguments, under the constraints of the specified . ]]> @@ -644,7 +644,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method invokes the method or constructor represented by this object, using the specified parameters. + The method invokes the method or constructor represented by this object, using the specified parameters. ]]> @@ -686,7 +686,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method invokes the constructor reflected by this object with the specified arguments, under the constraints of the specified object. + The method invokes the constructor reflected by this object with the specified arguments, under the constraints of the specified object. ]]> @@ -722,7 +722,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method invokes the constructor reflected by the instance that has the specified parameters, providing default values for the parameters not commonly used. + The method invokes the constructor reflected by the instance that has the specified parameters, providing default values for the parameters not commonly used. ]]> @@ -860,7 +860,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The member indicates whether one or more instances of `attributeType` is applied to this member. + The member indicates whether one or more instances of `attributeType` is applied to this member. ]]> diff --git a/xml/System.Runtime.InteropServices/_EventInfo.xml b/xml/System.Runtime.InteropServices/_EventInfo.xml index 2c5cf5befed..d8cbde45af4 100644 --- a/xml/System.Runtime.InteropServices/_EventInfo.xml +++ b/xml/System.Runtime.InteropServices/_EventInfo.xml @@ -80,7 +80,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method adds an event handler to an event source. + The method adds an event handler to an event source. ]]> @@ -181,7 +181,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method determines whether the specified is equal to the current . + The method determines whether the specified is equal to the current . ]]> @@ -233,7 +233,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The methods return the method used to add an event-handler delegate to the event source. + The methods return the method used to add an event-handler delegate to the event source. ]]> @@ -266,7 +266,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns the method used to add an event-handler delegate to the event source. + The method returns the method used to add an event-handler delegate to the event source. ]]> @@ -303,7 +303,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method retrieves the object for the method of the event and specifies whether to return non-public methods + The method retrieves the object for the method of the event and specifies whether to return non-public methods ]]> @@ -323,7 +323,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The methods return all attributes applied to this member. + The methods return all attributes applied to this member. ]]> @@ -360,7 +360,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method retrieves the object for the method of the event and specifies whether to return non-public methods + The method retrieves the object for the method of the event and specifies whether to return non-public methods ]]> @@ -399,7 +399,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns an array of custom attributes identified by . + The method returns an array of custom attributes identified by . ]]> @@ -432,7 +432,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures such as a hash table. + The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures such as a hash table. ]]> @@ -493,7 +493,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The methods return the method that is called when the event is raised. + The methods return the method that is called when the event is raised. ]]> @@ -526,7 +526,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns the method that is called when the event is raised. + The method returns the method that is called when the event is raised. ]]> @@ -563,7 +563,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns the method that is called when the event is raised and specifies whether to return non-public methods. + The method returns the method that is called when the event is raised and specifies whether to return non-public methods. ]]> @@ -583,7 +583,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns the method used to remove an event-handler delegate from the event source. + The method returns the method used to remove an event-handler delegate from the event source. ]]> @@ -616,7 +616,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns the method used to remove an event-handler delegate from the event source. + The method returns the method used to remove an event-handler delegate from the event source. ]]> @@ -653,7 +653,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method retrieves the object for removing a method of the event and specifies whether to return non-public methods. + The method retrieves the object for removing a method of the event and specifies whether to return non-public methods. ]]> @@ -686,7 +686,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method gets the type of the current instance. + The method gets the type of the current instance. ]]> @@ -843,7 +843,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method indicates whether one or more instances of the `attributeType` parameter are applied to this member. + The method indicates whether one or more instances of the `attributeType` parameter are applied to this member. ]]> @@ -1042,7 +1042,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method removes an event handler from an event source. + The method removes an event handler from an event source. ]]> diff --git a/xml/System.Runtime.InteropServices/_Exception.xml b/xml/System.Runtime.InteropServices/_Exception.xml index a915efd39d3..6c928f9d482 100644 --- a/xml/System.Runtime.InteropServices/_Exception.xml +++ b/xml/System.Runtime.InteropServices/_Exception.xml @@ -75,7 +75,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method determines whether the specified is equal to the current . + The method determines whether the specified is equal to the current . ]]> @@ -108,7 +108,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns the that is the root cause of one or more subsequent exceptions. + The method returns the that is the root cause of one or more subsequent exceptions. ]]> @@ -141,7 +141,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures such as a hash table. + The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures such as a hash table. ]]> @@ -184,7 +184,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method sets the object with information about the exception. + The method sets the object with information about the exception. ]]> @@ -217,7 +217,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method gets the runtime type of the current instance. + The method gets the runtime type of the current instance. ]]> @@ -442,7 +442,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method creates and returns a string representation of the current exception. + The method creates and returns a string representation of the current exception. ]]> diff --git a/xml/System.Runtime.InteropServices/_FieldInfo.xml b/xml/System.Runtime.InteropServices/_FieldInfo.xml index c603d403b96..352fab4c29b 100644 --- a/xml/System.Runtime.InteropServices/_FieldInfo.xml +++ b/xml/System.Runtime.InteropServices/_FieldInfo.xml @@ -144,7 +144,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method determines whether the specified is equal to the current . + The method determines whether the specified is equal to the current . ]]> @@ -228,7 +228,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The methods return all attributes applied to this member. + The methods return all attributes applied to this member. ]]> @@ -264,7 +264,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns an array containing all the custom attributes. + The method returns an array containing all the custom attributes. ]]> @@ -302,7 +302,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns an array of custom attributes identified by . + The method returns an array of custom attributes identified by . ]]> @@ -335,7 +335,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. + The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures like a hash table. ]]> @@ -409,7 +409,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the type of the current instance. + The method gets the type of the current instance. ]]> @@ -515,7 +515,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns the value of a field supported by a given object. + The method returns the value of a field supported by a given object. ]]> @@ -557,7 +557,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns the value of a field supported by a given object. + The method returns the value of a field supported by a given object. ]]> @@ -676,7 +676,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method indicates whether one or more instance of `attributeType` is applied to this member. + The method indicates whether one or more instance of `attributeType` is applied to this member. ]]> @@ -1155,7 +1155,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The methods set the value of the field for the given object to the given value. + The methods set the value of the field for the given object to the given value. ]]> @@ -1192,7 +1192,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method sets the value of the field supported by the given object. + The method sets the value of the field supported by the given object. ]]> @@ -1235,7 +1235,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method sets the value of the field supported by the given object. + The method sets the value of the field supported by the given object. ]]> @@ -1278,7 +1278,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method sets the value of the field supported by the given object. + The method sets the value of the field supported by the given object. ]]> diff --git a/xml/System.Runtime.InteropServices/_MemberInfo.xml b/xml/System.Runtime.InteropServices/_MemberInfo.xml index 4f1d91c0a0d..68250047052 100644 --- a/xml/System.Runtime.InteropServices/_MemberInfo.xml +++ b/xml/System.Runtime.InteropServices/_MemberInfo.xml @@ -116,7 +116,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method determines whether the specified is equal to the current . + The method determines whether the specified is equal to the current . ]]> @@ -136,7 +136,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns all attributes applied to this member. + The method returns all attributes applied to this member. ]]> @@ -173,7 +173,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns an array containing all the custom attributes. + The method returns an array containing all the custom attributes. ]]> @@ -212,7 +212,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns an array of custom attributes identified by . + The method returns an array of custom attributes identified by . ]]> @@ -245,7 +245,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures such as a hash table. + The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures such as a hash table. ]]> @@ -319,7 +319,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method gets the type of the current instance. + The method gets the type of the current instance. ]]> @@ -476,7 +476,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method indicates whether one or more instances of the `attributeType` parameter are applied to this member. + The method indicates whether one or more instances of the `attributeType` parameter are applied to this member. ]]> diff --git a/xml/System.Runtime.InteropServices/_MethodBase.xml b/xml/System.Runtime.InteropServices/_MethodBase.xml index 7f1e320b230..6421dbdd86b 100644 --- a/xml/System.Runtime.InteropServices/_MethodBase.xml +++ b/xml/System.Runtime.InteropServices/_MethodBase.xml @@ -176,7 +176,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method determines whether the specified is equal to the current . + The method determines whether the specified is equal to the current . ]]> @@ -196,7 +196,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The members return all attributes applied to this member. + The members return all attributes applied to this member. ]]> @@ -233,7 +233,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns an array containing all the custom attributes. + The method returns an array containing all the custom attributes. ]]> @@ -272,7 +272,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns an array of custom attributes identified by . + The method returns an array of custom attributes identified by . ]]> @@ -305,7 +305,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures such as a hash table. + The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures such as a hash table. ]]> @@ -379,7 +379,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The member returns the flags. + The member returns the flags. ]]> @@ -412,7 +412,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method gets the parameters of the specified method or constructor. + The method gets the parameters of the specified method or constructor. ]]> @@ -445,7 +445,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the type of the current instance. + The method gets the type of the current instance. ]]> @@ -535,7 +535,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The methods invoke the constructor reflected by the instance that has the specified parameters. + The methods invoke the constructor reflected by the instance that has the specified parameters. ]]> @@ -575,7 +575,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method invokes the method or constructor represented by this object, using the specified parameters. + The method invokes the method or constructor represented by this object, using the specified parameters. ]]> @@ -619,7 +619,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method invokes the constructor reflected by this object with the specified arguments, under the constraints of the specified object. + The method invokes the constructor reflected by this object with the specified arguments, under the constraints of the specified object. ]]> @@ -805,7 +805,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The member indicates whether one or more instances of the `attributeType` parameter are applied to this member. + The member indicates whether one or more instances of the `attributeType` parameter are applied to this member. ]]> diff --git a/xml/System.Runtime.InteropServices/_MethodInfo.xml b/xml/System.Runtime.InteropServices/_MethodInfo.xml index d520ad75b59..b0b5c3bc28b 100644 --- a/xml/System.Runtime.InteropServices/_MethodInfo.xml +++ b/xml/System.Runtime.InteropServices/_MethodInfo.xml @@ -176,7 +176,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method determines whether the specified is equal to the current . + The method determines whether the specified is equal to the current . ]]> @@ -209,7 +209,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns the object for the method on the direct or indirect base class in which the method represented by this instance was first declared. + The method returns the object for the method on the direct or indirect base class in which the method represented by this instance was first declared. ]]> @@ -229,7 +229,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The members return all attributes applied to this member. + The members return all attributes applied to this member. ]]> @@ -266,7 +266,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns an array containing all the custom attributes. + The method returns an array containing all the custom attributes. ]]> @@ -305,7 +305,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns an array of custom attributes identified by . + The method returns an array of custom attributes identified by . ]]> @@ -338,7 +338,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures such as a hash table. + The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures such as a hash table. ]]> @@ -412,7 +412,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The member returns the flags. + The member returns the flags. ]]> @@ -445,7 +445,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method gets the parameters of the specified method or constructor. + The method gets the parameters of the specified method or constructor. ]]> @@ -478,7 +478,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method gets the type of the current instance. + The method gets the type of the current instance. ]]> @@ -568,7 +568,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The methods invoke the constructor reflected by the instance that has the specified parameters. + The methods invoke the constructor reflected by the instance that has the specified parameters. ]]> @@ -606,7 +606,7 @@ method invokes the method or constructor represented by this object, using the specified parameters. + The method invokes the method or constructor represented by this object, using the specified parameters. ]]> @@ -650,7 +650,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method invokes the constructor reflected by this object with the specified arguments, under the constraints of the specified object. + The method invokes the constructor reflected by this object with the specified arguments, under the constraints of the specified object. ]]> @@ -836,7 +836,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The member indicates whether one or more instances of the `attributeType` parameter are applied to this member. + The member indicates whether one or more instances of the `attributeType` parameter are applied to this member. ]]> diff --git a/xml/System.Runtime.InteropServices/_PropertyInfo.xml b/xml/System.Runtime.InteropServices/_PropertyInfo.xml index a4e30f7bbc4..285d942cdd4 100644 --- a/xml/System.Runtime.InteropServices/_PropertyInfo.xml +++ b/xml/System.Runtime.InteropServices/_PropertyInfo.xml @@ -210,7 +210,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method determines whether the specified is equal to the current . + The method determines whether the specified is equal to the current . ]]> @@ -230,7 +230,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The methods return an array of the `get` and `set` accessors on this property. + The methods return an array of the `get` and `set` accessors on this property. ]]> @@ -263,7 +263,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns an array whose elements reflect the public `get`, `set`, and other accessors of the property reflected by the current instance. + The method returns an array whose elements reflect the public `get`, `set`, and other accessors of the property reflected by the current instance. ]]> @@ -300,7 +300,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns an array whose elements reflect the public and, if specified, non-public `get`, `set`, and other accessors of the property reflected by the current instance. + The method returns an array whose elements reflect the public and, if specified, non-public `get`, `set`, and other accessors of the property reflected by the current instance. ]]> @@ -320,7 +320,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The methods return all attributes applied to this member. + The methods return all attributes applied to this member. ]]> @@ -357,7 +357,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns an array containing all the custom attributes. + The method returns an array containing all the custom attributes. ]]> @@ -396,7 +396,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns an array of custom attributes identified by . + The method returns an array of custom attributes identified by . ]]> @@ -416,7 +416,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The methods return a object representing the `get` accessor for this property. + The methods return a object representing the `get` accessor for this property. ]]> @@ -449,7 +449,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns the public `get` accessor for this property. + The method returns the public `get` accessor for this property. ]]> @@ -486,7 +486,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns the public or non-public `get` accessor for this property. + The method returns the public or non-public `get` accessor for this property. ]]> @@ -519,7 +519,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures such as a hash table. + The method serves as a hash function for a particular type. is suitable for use in hashing algorithms and data structures such as a hash table. ]]> @@ -593,7 +593,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns an array of all the index parameters for the property + The method returns an array of all the index parameters for the property ]]> @@ -613,7 +613,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The methods return a object representing the `set` accessor for this property. + The methods return a object representing the `set` accessor for this property. ]]> @@ -646,7 +646,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns the public `set` accessor for this property. + The method returns the public `set` accessor for this property. ]]> @@ -693,7 +693,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns the `set` accessor for this property. + The method returns the `set` accessor for this property. ]]> @@ -726,7 +726,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method gets the type of the current instance. + The method gets the type of the current instance. ]]> @@ -816,7 +816,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The methods return the value of the property. + The methods return the value of the property. ]]> @@ -854,7 +854,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns a literal value associated with the property by a compiler. + The method returns a literal value associated with the property by a compiler. ]]> @@ -898,7 +898,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method returns the value of a property having the specified binding, index, and . + The method returns the value of a property having the specified binding, index, and . ]]> @@ -985,7 +985,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method indicates whether one or more instance of the `attributeType` parameter is applied to this member. + The method indicates whether one or more instance of the `attributeType` parameter is applied to this member. ]]> @@ -1166,7 +1166,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method sets the property value for the given object to the given value. + The method sets the property value for the given object to the given value. ]]> @@ -1205,7 +1205,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method sets the value of the property with optional index values for index properties. + The method sets the value of the property with optional index values for index properties. ]]> @@ -1250,7 +1250,7 @@ ## Remarks This method is for access to managed classes from unmanaged code and should not be called from managed code. - The method sets the property value for the given object to the given value. + The method sets the property value for the given object to the given value. ]]> diff --git a/xml/System.Runtime.InteropServices/_Type.xml b/xml/System.Runtime.InteropServices/_Type.xml index 4224e70255d..6ac459fbe3d 100644 --- a/xml/System.Runtime.InteropServices/_Type.xml +++ b/xml/System.Runtime.InteropServices/_Type.xml @@ -223,7 +223,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method determines if the underlying system type of the current is the same as the underlying system type of the specified or . + The method determines if the underlying system type of the current is the same as the underlying system type of the specified or . . @@ -262,7 +262,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method determines if the underlying system type of the current is the same as the underlying system type of the specified . + The method determines if the underlying system type of the current is the same as the underlying system type of the specified . ]]> @@ -299,7 +299,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method determines if the underlying system type of the current is the same as the underlying system type of the specified . + The method determines if the underlying system type of the current is the same as the underlying system type of the specified . ]]> @@ -341,7 +341,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns an array of objects representing a filtered list of interfaces implemented or inherited by the current . + The method returns an array of objects representing a filtered list of interfaces implemented or inherited by the current . ]]> @@ -393,7 +393,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns a filtered array of objects of the specified member type. + The method returns a filtered array of objects of the specified member type. ]]> @@ -458,7 +458,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the number of dimensions in an . + The method gets the number of dimensions in an . ]]> @@ -478,7 +478,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets a specific constructor of the current . + The method gets a specific constructor of the current . ]]> @@ -518,7 +518,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for a public instance constructor whose parameters match the types in the specified array. + The method searches for a public instance constructor whose parameters match the types in the specified array. ]]> @@ -576,7 +576,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for a constructor whose parameters match the specified argument types and modifiers, using the specified binding constraints. + The method searches for a constructor whose parameters match the specified argument types and modifiers, using the specified binding constraints. ]]> @@ -632,7 +632,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for a constructor whose parameters match the specified argument types and modifiers, using the specified binding constraints and the specified calling convention. + The method searches for a constructor whose parameters match the specified argument types and modifiers, using the specified binding constraints and the specified calling convention. ]]> @@ -652,7 +652,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the constructors of the current . + The method gets the constructors of the current . ]]> @@ -685,7 +685,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns all the public constructors defined for the current . + The method returns all the public constructors defined for the current . ]]> @@ -725,7 +725,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the constructors defined for the current , using the specified . + The method searches for the constructors defined for the current , using the specified . ]]> @@ -745,7 +745,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns all attributes applied to this member. + The method returns all attributes applied to this member. ]]> @@ -781,7 +781,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns all attributes applied to this member. + The method returns all attributes applied to this member. ]]> @@ -819,7 +819,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns all attributes applied to this member. + The method returns all attributes applied to this member. ]]> @@ -856,7 +856,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the members defined for the current whose is set. + The method searches for the members defined for the current whose is set. ]]> @@ -893,7 +893,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns the of the object encompassed or referred to by the current array, pointer or reference type. + The method returns the of the object encompassed or referred to by the current array, pointer or reference type. ]]> @@ -913,7 +913,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets a specific event declared or inherited by the current . + The method gets a specific event declared or inherited by the current . ]]> @@ -957,7 +957,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for events that are declared or inherited by the current , using the specified binding constraints. + The method searches for events that are declared or inherited by the current , using the specified binding constraints. ]]> @@ -999,7 +999,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns the object representing the specified event, using the specified binding constraints. + The method returns the object representing the specified event, using the specified binding constraints. ]]> @@ -1019,7 +1019,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the events that are declared or inherited by the current . + The method gets the events that are declared or inherited by the current . ]]> @@ -1056,7 +1056,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns all the public events that are declared or inherited by the current . + The method returns all the public events that are declared or inherited by the current . ]]> @@ -1100,7 +1100,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for events that are declared or inherited by the current , using the specified binding constraints. + The method searches for events that are declared or inherited by the current , using the specified binding constraints. ]]> @@ -1120,7 +1120,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets a specific field of the current . + The method gets a specific field of the current . ]]> @@ -1156,7 +1156,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the public field with the specified name. + The method searches for the public field with the specified name. ]]> @@ -1198,7 +1198,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified field, using the specified binding constraints. + The method searches for the specified field, using the specified binding constraints. ]]> @@ -1218,7 +1218,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets a specific field of the current . + The method gets a specific field of the current . ]]> @@ -1255,7 +1255,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns all the public fields of the current . + The method returns all the public fields of the current . ]]> @@ -1299,7 +1299,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the fields defined for the current , using the specified binding constraints. + The method searches for the fields defined for the current , using the specified binding constraints. ]]> @@ -1332,7 +1332,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method. + The method. ]]> @@ -1393,7 +1393,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets a specific interface implemented or inherited by the current . + The method gets a specific interface implemented or inherited by the current . ]]> @@ -1429,7 +1429,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the interface with the specified name. + The method searches for the interface with the specified name. ]]> @@ -1472,7 +1472,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified interface, specifying whether to do a case-sensitive search. + The method searches for the specified interface, specifying whether to do a case-sensitive search. ]]> @@ -1508,7 +1508,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns an interface mapping for the specified interface type. + The method returns an interface mapping for the specified interface type. ]]> @@ -1545,7 +1545,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets all the interfaces implemented or inherited by the current . + The method gets all the interfaces implemented or inherited by the current . ]]> @@ -1565,7 +1565,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the specified members of the current . + The method gets the specified members of the current . ]]> @@ -1601,7 +1601,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the public members with the specified name. + The method searches for the public members with the specified name. ]]> @@ -1643,7 +1643,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified members, using the specified binding constraints. + The method searches for the specified members, using the specified binding constraints. ]]> @@ -1687,7 +1687,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified members of the specified member type, using the specified binding constraints. + The method searches for the specified members of the specified member type, using the specified binding constraints. ]]> @@ -1707,7 +1707,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the members (properties, methods, fields, events, and so on) of the current . + The method gets the members (properties, methods, fields, events, and so on) of the current . ]]> @@ -1744,7 +1744,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns all the public members of the current . + The method returns all the public members of the current . ]]> @@ -1788,7 +1788,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the members defined for the current , using the specified binding constraints. + The method searches for the members defined for the current , using the specified binding constraints. ]]> @@ -1808,7 +1808,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method. + The method. ]]> @@ -1844,7 +1844,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the public method with the specified name. + The method searches for the public method with the specified name. ]]> @@ -1886,7 +1886,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified method, using the specified binding constraints. + The method searches for the specified method, using the specified binding constraints. ]]> @@ -1928,7 +1928,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified public method whose parameters match the specified argument types. + The method searches for the specified public method whose parameters match the specified argument types. ]]> @@ -1972,7 +1972,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified public method whose parameters match the specified argument types and modifiers. + The method searches for the specified public method whose parameters match the specified argument types and modifiers. ]]> @@ -2028,7 +2028,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified method whose parameters match the specified argument types and modifiers, using the specified binding constraints. + The method searches for the specified method whose parameters match the specified argument types and modifiers, using the specified binding constraints. ]]> @@ -2086,7 +2086,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified method whose parameters match the specified argument types and modifiers, using the specified binding constraints and the specified calling convention. + The method searches for the specified method whose parameters match the specified argument types and modifiers, using the specified binding constraints and the specified calling convention. ]]> @@ -2106,7 +2106,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the methods of the current . + The method gets the methods of the current . ]]> @@ -2143,7 +2143,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns all the public methods of the current . + The method returns all the public methods of the current . ]]> @@ -2187,7 +2187,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the methods defined for the current , using the specified binding constraints. + The method searches for the methods defined for the current , using the specified binding constraints. ]]> @@ -2207,7 +2207,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets a specific type nested within the current . + The method gets a specific type nested within the current . ]]> @@ -2243,7 +2243,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the public nested type with the specified name. + The method searches for the public nested type with the specified name. ]]> @@ -2285,7 +2285,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified nested type, using the specified binding constraints. + The method searches for the specified nested type, using the specified binding constraints. ]]> @@ -2305,7 +2305,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the types nested within the current . + The method gets the types nested within the current . ]]> @@ -2342,7 +2342,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns all the types nested within the current . + The method returns all the types nested within the current . ]]> @@ -2404,7 +2404,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the properties of the current . + The method gets the properties of the current . ]]> @@ -2441,7 +2441,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns all the public properties of the current . + The method returns all the public properties of the current . ]]> @@ -2485,7 +2485,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the properties of the current , using the specified binding constraints. + The method searches for the properties of the current , using the specified binding constraints. ]]> @@ -2505,7 +2505,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets a specific property of the current . + The method gets a specific property of the current . ]]> @@ -2541,7 +2541,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the public property with the specified name. + The method searches for the public property with the specified name. ]]> @@ -2583,7 +2583,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified property, using the specified binding constraints. + The method searches for the specified property, using the specified binding constraints. ]]> @@ -2621,7 +2621,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the public property with the specified name and return type. + The method searches for the public property with the specified name and return type. ]]> @@ -2663,7 +2663,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified public property whose parameters match the specified argument types. + The method searches for the specified public property whose parameters match the specified argument types. ]]> @@ -2707,7 +2707,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified public property whose parameters match the specified argument types. + The method searches for the specified public property whose parameters match the specified argument types. ]]> @@ -2753,7 +2753,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified public property whose parameters match the specified argument types and modifiers. + The method searches for the specified public property whose parameters match the specified argument types and modifiers. ]]> @@ -2811,7 +2811,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method searches for the specified property whose parameters match the specified argument types and modifiers, using the specified binding constraints. + The method searches for the specified property whose parameters match the specified argument types and modifiers, using the specified binding constraints. ]]> @@ -2844,7 +2844,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method gets the current . + The method gets the current . ]]> @@ -3046,7 +3046,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method invokes a specific member of the current . + The method invokes a specific member of the current . . @@ -3104,7 +3104,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method invokes the specified member, using the specified binding constraints and matching the specified argument list. + The method invokes the specified member, using the specified binding constraints and matching the specified argument list. ]]> @@ -3166,7 +3166,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method invokes the specified member, using the specified binding constraints and matching the specified argument list and culture. + The method invokes the specified member, using the specified binding constraints and matching the specified argument list and culture. ]]> @@ -3232,7 +3232,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method invokes the specified member, using the specified binding constraints and matching the specified argument list, modifiers, and culture. + The method invokes the specified member, using the specified binding constraints and matching the specified argument list, modifiers, and culture. ]]> @@ -3603,7 +3603,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method indicates whether one or more instance of `attributeType` is applied to this member. + The method indicates whether one or more instance of `attributeType` is applied to this member. ]]> @@ -3739,7 +3739,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method determines whether the specified object is an instance of the current . + The method determines whether the specified object is an instance of the current . ]]> @@ -4304,7 +4304,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method determines whether the class represented by the current derives from the class represented by the specified . + The method determines whether the class represented by the current derives from the class represented by the specified . ]]> @@ -4563,7 +4563,7 @@ ## Remarks This method is for access to managed classes from unmanaged code, and should not be called from managed code. - The method returns the name of the current . + The method returns the name of the current . ]]> diff --git a/xml/System.Runtime.Loader/AssemblyLoadContext+ContextualReflectionScope.xml b/xml/System.Runtime.Loader/AssemblyLoadContext+ContextualReflectionScope.xml index be3a7404a8b..d111d69163f 100644 --- a/xml/System.Runtime.Loader/AssemblyLoadContext+ContextualReflectionScope.xml +++ b/xml/System.Runtime.Loader/AssemblyLoadContext+ContextualReflectionScope.xml @@ -38,7 +38,7 @@ ### Remarks -This is an implementation detail of the APIs. It is a struct, to avoid heap allocation. It is required to be public to avoid boxing. +This is an implementation detail of the APIs. It is a struct, to avoid heap allocation. It is required to be public to avoid boxing. ]]> diff --git a/xml/System.Runtime.Loader/AssemblyLoadContext.xml b/xml/System.Runtime.Loader/AssemblyLoadContext.xml index 1f32a6dec7c..9223dd5f032 100644 --- a/xml/System.Runtime.Loader/AssemblyLoadContext.xml +++ b/xml/System.Runtime.Loader/AssemblyLoadContext.xml @@ -637,7 +637,7 @@ Implementations of this method can return an assembly loaded into any loads an assembly by resolving the . This triggers a full resolution. The resolution fallback sequence follows this process: + loads an assembly by resolving the . This triggers a full resolution. The resolution fallback sequence follows this process: 1. The method calls . @@ -1158,7 +1158,7 @@ The OS handle returned by this method can be used with methods of the ). +This event is raised if the native library cannot be resolved by the default resolution logic (including ). ]]> diff --git a/xml/System.Runtime.Remoting.Activation/ActivatorLevel.xml b/xml/System.Runtime.Remoting.Activation/ActivatorLevel.xml index 1f9d09574e4..94e2a708894 100644 --- a/xml/System.Runtime.Remoting.Activation/ActivatorLevel.xml +++ b/xml/System.Runtime.Remoting.Activation/ActivatorLevel.xml @@ -28,11 +28,11 @@ Defines the appropriate position for a in the chain of activators. - . Because each activator is responsible for calling the next one in the chain, an activator can position itself anywhere in the chain. The enumerator helps activators find the appropriate position in the chain. - + . Because each activator is responsible for calling the next one in the chain, an activator can position itself anywhere in the chain. The enumerator helps activators find the appropriate position in the chain. + ]]> diff --git a/xml/System.Runtime.Remoting.Activation/IActivator.xml b/xml/System.Runtime.Remoting.Activation/IActivator.xml index 639aaa914cd..f4f19a81a22 100644 --- a/xml/System.Runtime.Remoting.Activation/IActivator.xml +++ b/xml/System.Runtime.Remoting.Activation/IActivator.xml @@ -98,7 +98,7 @@ is used to locate the right position in the chain when adding an activator. + The is used to locate the right position in the chain when adding an activator. ]]> diff --git a/xml/System.Runtime.Remoting.Activation/IConstructionCallMessage.xml b/xml/System.Runtime.Remoting.Activation/IConstructionCallMessage.xml index 50be5bb8840..47c90fc4043 100644 --- a/xml/System.Runtime.Remoting.Activation/IConstructionCallMessage.xml +++ b/xml/System.Runtime.Remoting.Activation/IConstructionCallMessage.xml @@ -35,7 +35,7 @@ and before the thread returns to the user code, a is sent to the remote application. When the construction message arrives at the remote application, it is processed by a remoting activator (either the default one, or one that is specified in the property) and a new object is created. The remoting application then returns a to the local application. The contains an instance of , which packages information about the remote object. The remoting infrastructure converts the instance into a proxy to the remote object, which is returned to the user code. + When the user creates an instance of a new client-activated object by calling `new` or and before the thread returns to the user code, a is sent to the remote application. When the construction message arrives at the remote application, it is processed by a remoting activator (either the default one, or one that is specified in the property) and a new object is created. The remoting application then returns a to the local application. The contains an instance of , which packages information about the remote object. The remoting infrastructure converts the instance into a proxy to the remote object, which is returned to the user code. ]]> @@ -174,7 +174,7 @@ indexer allows you to specify additional attributes to use during object activation. The user specifies the in the `activationAttributes` parameter to . + The indexer allows you to specify additional attributes to use during object activation. The user specifies the in the `activationAttributes` parameter to . ]]> @@ -211,7 +211,7 @@ contains the list of properties that were contributed by various attributes in the construction call message. These properties are used to create the context in which the server object is activated. + A new object's context is generally chosen based on metadata attributes of the class. The context selection mechanism is extensible through custom attributes, also known as static context properties, which are compiled into the class metadata. When activating an object remotely, the contains the list of properties that were contributed by various attributes in the construction call message. These properties are used to create the context in which the server object is activated. ]]> diff --git a/xml/System.Runtime.Remoting.Activation/UrlAttribute.xml b/xml/System.Runtime.Remoting.Activation/UrlAttribute.xml index 58c7ef44ca4..83da50cc20d 100644 --- a/xml/System.Runtime.Remoting.Activation/UrlAttribute.xml +++ b/xml/System.Runtime.Remoting.Activation/UrlAttribute.xml @@ -36,7 +36,7 @@ is passed in the activation attributes array as a parameter to when creating activated objects with the method. + The is passed in the activation attributes array as a parameter to when creating activated objects with the method. For more information about using attributes, see [Attributes](/dotnet/standard/attributes/). @@ -142,7 +142,7 @@ method. + This method overrides the default method. ]]> @@ -217,7 +217,7 @@ does not contribute any properties to the new context because it is used by the remoting infrastructure to force the creation of the context and the server object inside the context at the specified URL. + does not contribute any properties to the new context because it is used by the remoting infrastructure to force the creation of the context and the server object inside the context at the specified URL. ]]> diff --git a/xml/System.Runtime.Remoting.Channels.Http/HttpChannel.xml b/xml/System.Runtime.Remoting.Channels.Http/HttpChannel.xml index 5db54a52839..7338ebd338f 100644 --- a/xml/System.Runtime.Remoting.Channels.Http/HttpChannel.xml +++ b/xml/System.Runtime.Remoting.Channels.Http/HttpChannel.xml @@ -50,7 +50,7 @@ Channels are used by the .NET Framework remoting infrastructure to transport remote calls. When a client makes a call to a remote object, the call is serialized into a message that is sent by a client channel and received by a server channel. It is then deserialized and processed. Any returned values are transmitted by the server channel and received by the client channel. - A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For a list of these configuration properties, see [Channel and Formatter Configuration Properties](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/kw7c6kwc(v=vs.100)). + A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For a list of these configuration properties, see [Channel and Formatter Configuration Properties](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/kw7c6kwc(v=vs.100)). @@ -253,7 +253,7 @@ is called and a is created. + The current property is used when is called and a is created. ]]> @@ -288,7 +288,7 @@ . + Every registered channel has a unique name. The name is used to retrieve a specific channel when calling . ]]> @@ -432,12 +432,12 @@ method returns a channel message sink that delivers messages to either the specified URL or the channel data object. If the `uri` parameter is `null`, `remoteChannelData` is used as a target for the sink. Either the `url` or `remoteChannelData` parameters can be `null`, but not both. + The method returns a channel message sink that delivers messages to either the specified URL or the channel data object. If the `uri` parameter is `null`, `remoteChannelData` is used as a target for the sink. Either the `url` or `remoteChannelData` parameters can be `null`, but not both. ## Examples - The following code example shows how to use the method. This code example is part of a larger example provided for the class. + The following code example shows how to use the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Channels.Http.HttpClientChannel/CPP/client.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Http/HttpChannel/Overview/client.cs" id="Snippet11"::: @@ -477,7 +477,7 @@ . + This method is used by . ]]> @@ -511,7 +511,7 @@ . + This property need not be set explicitly, as it is sufficient to set the ensureSecurity parameter of . ]]> @@ -626,7 +626,7 @@ method. This code example is part of a larger example provided for the class. + The following code example shows how to use the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Channels.Http.HttpClientChannel/CPP/client.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Http/HttpChannel/Overview/client.cs" id="Snippet13"::: diff --git a/xml/System.Runtime.Remoting.Channels.Http/HttpClientChannel.xml b/xml/System.Runtime.Remoting.Channels.Http/HttpClientChannel.xml index fa46d30c473..f1497274ed8 100644 --- a/xml/System.Runtime.Remoting.Channels.Http/HttpClientChannel.xml +++ b/xml/System.Runtime.Remoting.Channels.Http/HttpClientChannel.xml @@ -47,7 +47,7 @@ By default, the uses a SOAP formatter to serialize all messages. - A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For a list of these configuration properties, see [Channel and Formatter Configuration Properties](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/kw7c6kwc(v=vs.100)). + A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For a list of these configuration properties, see [Channel and Formatter Configuration Properties](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/kw7c6kwc(v=vs.100)). @@ -225,7 +225,7 @@ . + Every registered channel has a unique name. The name is used to retrieve a specific channel when calling . ]]> @@ -299,7 +299,7 @@ method returns a channel message sink that delivers messages to either the specified URL or the channel data object. If the `uri` parameter is `null`, `remoteChannelData` is used as a target for the sink. Either the `url` or `remoteChannelData` parameters can be `null`, but not both. + The method returns a channel message sink that delivers messages to either the specified URL or the channel data object. If the `uri` parameter is `null`, `remoteChannelData` is used as a target for the sink. Either the `url` or `remoteChannelData` parameters can be `null`, but not both. @@ -448,7 +448,7 @@ method. This code example is part of a larger example provided for the class. + The following code example shows how to use the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Channels.Http.HttpClientChannel/CPP/client.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Http/HttpChannel/Overview/client.cs" id="Snippet13"::: diff --git a/xml/System.Runtime.Remoting.Channels.Http/HttpRemotingHandler.xml b/xml/System.Runtime.Remoting.Channels.Http/HttpRemotingHandler.xml index c231f8d93c4..350ac2cc04f 100644 --- a/xml/System.Runtime.Remoting.Channels.Http/HttpRemotingHandler.xml +++ b/xml/System.Runtime.Remoting.Channels.Http/HttpRemotingHandler.xml @@ -22,11 +22,11 @@ Implements an ASP.NET handler that forwards requests to the remoting HTTP channel. - classes, rather than conventional ASP or ASP.NET Web pages, responds to these specific requests. HTTP handlers provide a way of interacting with the low-level request and response services of the IIS Web server, and provide functionality similar to ISAPI extensions but with a simpler programming model. - + classes, rather than conventional ASP or ASP.NET Web pages, responds to these specific requests. HTTP handlers provide a way of interacting with the low-level request and response services of the IIS Web server, and provide functionality similar to ISAPI extensions but with a simpler programming model. + ]]> @@ -82,11 +82,11 @@ The constructor ignores the parameter. Initializes a new instance of the class with default values. - constructor instead. - + constructor instead. + ]]> @@ -145,11 +145,11 @@ A that provides references to the intrinsic server objects (for example, , , , and ) used to service HTTP requests. Enables processing of HTTP Web requests by the current instance. - methods, see . - + methods, see . + ]]> diff --git a/xml/System.Runtime.Remoting.Channels.Http/HttpRemotingHandlerFactory.xml b/xml/System.Runtime.Remoting.Channels.Http/HttpRemotingHandlerFactory.xml index f0c7e9810cf..b8995bd55cb 100644 --- a/xml/System.Runtime.Remoting.Channels.Http/HttpRemotingHandlerFactory.xml +++ b/xml/System.Runtime.Remoting.Channels.Http/HttpRemotingHandlerFactory.xml @@ -22,11 +22,11 @@ Initializes new instances of the class. - class. - + class. + ]]> @@ -84,11 +84,11 @@ Returns an instance of the class. A new that processes the request. - . - + . + ]]> diff --git a/xml/System.Runtime.Remoting.Channels.Http/HttpServerChannel.xml b/xml/System.Runtime.Remoting.Channels.Http/HttpServerChannel.xml index d1f760d065a..41f02e4419f 100644 --- a/xml/System.Runtime.Remoting.Channels.Http/HttpServerChannel.xml +++ b/xml/System.Runtime.Remoting.Channels.Http/HttpServerChannel.xml @@ -39,7 +39,7 @@ The accepts messages serialized in either binary or SOAP format. - A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For a list of these configuration properties, see the documentation for . + A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For a list of these configuration properties, see the documentation for . @@ -351,7 +351,7 @@ . + Every registered channel has a unique name. This name is used to retrieve a specific channel when calling . ]]> @@ -492,7 +492,7 @@ method. This code example is part of a larger example provided for the class. + The following code example shows how to use the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Channels.Http.HttpServerChannel/CPP/server.cpp" id="Snippet22"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Http/HttpServerChannel/Overview/server.cs" id="Snippet22"::: @@ -532,12 +532,12 @@ . + The current method is used by . ## Examples - The following code example shows how to use the method. This code example is part of a larger example provided for the class. + The following code example shows how to use the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpChannel.GetUrlsFromUri/CPP/class1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Http/HttpServerChannel/GetUrlsForUri/class1.cs" id="Snippet1"::: @@ -638,7 +638,7 @@ method. This code example is part of a larger example provided for the class. + The following code example shows how to use the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Channels.Http.HttpServerChannel/CPP/server.cpp" id="Snippet25"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Http/HttpServerChannel/Overview/server.cs" id="Snippet25"::: @@ -679,7 +679,7 @@ ## Remarks It is not necessary to call this method to begin listening on a newly initialized channel. - Use this method to restart listening on a channel after the method has been called to stop listening on the channel. + Use this method to restart listening on a channel after the method has been called to stop listening on the channel. If your channel uses a dynamically assigned port number, your port number might change when you restart listening. @@ -717,7 +717,7 @@ method. + Use this method to stop listening on a channel. To restart listening, use the method. If your channel uses a dynamically assigned port number, your port number might change when you restart listening. diff --git a/xml/System.Runtime.Remoting.Channels.Ipc/IpcChannel.xml b/xml/System.Runtime.Remoting.Channels.Ipc/IpcChannel.xml index cf90e1a408f..6b1f3088983 100644 --- a/xml/System.Runtime.Remoting.Channels.Ipc/IpcChannel.xml +++ b/xml/System.Runtime.Remoting.Channels.Ipc/IpcChannel.xml @@ -283,7 +283,7 @@ . The default name is "ipc". + Every registered channel has a unique name. The name is used to retrieve a specific channel when calling . The default name is "ipc". @@ -371,14 +371,14 @@ method returns a channel message sink that delivers messages to either the specified URL or channel data object. If the `uri` parameter is `null`, `remoteChannelData` is used as a target for the sink. Either the `url` or `remoteChannelData` parameters can be `null`, but not both. + The method returns a channel message sink that delivers messages to either the specified URL or channel data object. If the `uri` parameter is `null`, `remoteChannelData` is used as a target for the sink. Either the `url` or `remoteChannelData` parameters can be `null`, but not both. Channel sinks provide a plug-in point that allows access to the underlying messages flowing through the channel as well as the stream used by the transport mechanism to send messages to a remote object. Channel sinks are linked together in a chain of `ChannelSinkProviders` and all channel messages flow through this chain of sinks before the message is finally serialized and transported. ## Examples - The following code example shows how to use the method. This code example is part of a larger example provided for the class. + The following code example shows how to use the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Channels.Ipc.IpcChannel/CPP/client.cpp" id="Snippet22"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Ipc/IpcChannel/Overview/client.cs" id="Snippet22"::: @@ -417,12 +417,12 @@ . + This method is used by . ## Examples - The following code example shows how to use the method. This code example is part of a larger example provided for the class. + The following code example shows how to use the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Channels.Ipc.IpcChannel/CPP/server.cpp" id="Snippet19"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Ipc/IpcChannel/Overview/server.cs" id="Snippet19"::: @@ -457,7 +457,7 @@ . + This property need not be set explicitly, as it is sufficient to set the ensureSecurity parameter of . ]]> @@ -500,7 +500,7 @@ ## Examples - The following code example shows how to use the method. This code example is part of a larger example provided for the class. + The following code example shows how to use the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Channels.Ipc.IpcChannel/CPP/server.cpp" id="Snippet19"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Ipc/IpcChannel/Overview/server.cs" id="Snippet19"::: @@ -540,7 +540,7 @@ ## Remarks It is not necessary to call this method to begin listening on a newly initialized channel. - Use this method to restart listening on a channel after the method has been called. + Use this method to restart listening on a channel after the method has been called. The `data` parameter can be used to pass a specific initialization state to the channel. If you do not want to pass a specific state to the channel, set `data` to `null`. @@ -577,7 +577,7 @@ method. + Use this method to stop listening on a channel. To restart listening, use the method. The `data` parameter can be used to pass a specific initialization state to the channel. If you do not want to pass a specific state to the channel, set `data` to `null`. diff --git a/xml/System.Runtime.Remoting.Channels.Ipc/IpcClientChannel.xml b/xml/System.Runtime.Remoting.Channels.Ipc/IpcClientChannel.xml index 4668a64f6d5..d16fda943b4 100644 --- a/xml/System.Runtime.Remoting.Channels.Ipc/IpcClientChannel.xml +++ b/xml/System.Runtime.Remoting.Channels.Ipc/IpcClientChannel.xml @@ -41,7 +41,7 @@ By default, the class uses a binary formatter to serialize all messages. - A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For a list of these configuration properties, see the documentation for the constructor. + A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For a list of these configuration properties, see the documentation for the constructor. @@ -218,7 +218,7 @@ method. The default name is "ipc client". + Every registered channel has a unique name. The name is used to retrieve a specific channel when calling the method. The default name is "ipc client". @@ -306,12 +306,12 @@ method returns a channel message sink that delivers messages to either the specified URL or the channel data object. If the `uri` parameter is `null`, `remoteChannelData` is used as a target for the sink. Either the `url` or `remoteChannelData` parameters can be `null`, but not both. + The method returns a channel message sink that delivers messages to either the specified URL or the channel data object. If the `uri` parameter is `null`, `remoteChannelData` is used as a target for the sink. Either the `url` or `remoteChannelData` parameters can be `null`, but not both. ## Examples - The following code example shows how to use the method. + The following code example shows how to use the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Channels.Ipc.IpcClientChannel/CPP/client.cpp" id="Snippet22"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Ipc/IpcClientChannel/.ctor/client.cs" id="Snippet22"::: @@ -378,7 +378,7 @@ method. + The following code example shows how to use the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Channels.Ipc.IpcClientChannel/CPP/client.cpp" id="Snippet24"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Ipc/IpcClientChannel/.ctor/client.cs" id="Snippet24"::: diff --git a/xml/System.Runtime.Remoting.Channels.Ipc/IpcServerChannel.xml b/xml/System.Runtime.Remoting.Channels.Ipc/IpcServerChannel.xml index 0b039642e9d..a529a35a61a 100644 --- a/xml/System.Runtime.Remoting.Channels.Ipc/IpcServerChannel.xml +++ b/xml/System.Runtime.Remoting.Channels.Ipc/IpcServerChannel.xml @@ -41,7 +41,7 @@ The instance accepts messages serialized in either binary or SOAP format. - A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing an collection to the constructor). For a list of these configuration properties, see the documentation for the constructor. + A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing an collection to the constructor). For a list of these configuration properties, see the documentation for the constructor. > [!CAUTION] > When setting the `exclusiveAddressUse` property to `false` in the `properties` argument, several objects can be registered for the same named pipe. In such a case requests can go to any of the channels registered. This setting is considered secure only if ALCs are also used. @@ -338,7 +338,7 @@ method. The default name is "ipc server". + Every registered channel has a unique name. The name is used to retrieve a specific channel when calling the method. The default name is "ipc server". @@ -421,7 +421,7 @@ ## Examples - The following code example illustrates how to use the method. + The following code example illustrates how to use the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Remoting_Ipc/CPP/server.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Ipc/IpcClientChannel/Overview/server.cs" id="Snippet12"::: @@ -460,12 +460,12 @@ method. + This method is used by the method. ## Examples - The following code example shows how to use the method. + The following code example shows how to use the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Channels.Ipc.IpcServerChannel/CPP/server.cpp" id="Snippet19"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Ipc/IpcServerChannel/.ctor/server.cs" id="Snippet19"::: @@ -536,7 +536,7 @@ ## Examples - The following code example shows how to use the method. + The following code example shows how to use the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Channels.Ipc.IpcServerChannel/CPP/server.cpp" id="Snippet19"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Ipc/IpcServerChannel/.ctor/server.cs" id="Snippet19"::: @@ -576,7 +576,7 @@ ## Remarks It is not necessary to call this method to begin listening on a newly initialized channel. - Use this method to restart listening on a channel after the method has been called to stop listening on the channel. + Use this method to restart listening on a channel after the method has been called to stop listening on the channel. The data object can be used to pass a specific initialization state to the channel. If you do not want to pass a specific state to the channel, pass `null` as the `data` parameter value. @@ -614,7 +614,7 @@ method. + Use this method to stop listening on a channel. To restart listening, use the method. The data object can be used to pass a specific initialization state to the channel. If you do not want to pass a specific state to the channel, pass `null` as the `data` parameter value. diff --git a/xml/System.Runtime.Remoting.Channels.Tcp/TcpChannel.xml b/xml/System.Runtime.Remoting.Channels.Tcp/TcpChannel.xml index dd4f2bac117..f789fbcf391 100644 --- a/xml/System.Runtime.Remoting.Channels.Tcp/TcpChannel.xml +++ b/xml/System.Runtime.Remoting.Channels.Tcp/TcpChannel.xml @@ -49,7 +49,7 @@ To perform additional processing of messages, you can specify implementations of the and through which all messages processed by the are passed. - A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For more information about channel configuration properties, see [Channel and Formatter Configuration Properties](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/kw7c6kwc(v=vs.100)). + A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For more information about channel configuration properties, see [Channel and Formatter Configuration Properties](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/kw7c6kwc(v=vs.100)). ## Examples The following code example shows how to use a to set up a remoting server and its client. The example contains three parts, a server, a client, and a remote object used by the server and the client. @@ -271,7 +271,7 @@ . To set the property, assign the value to the "name" indexed property in the dictionary passed to the constructor. + Every registered channel has a unique name. The name is used to retrieve a specific channel when calling . To set the property, assign the value to the "name" indexed property in the dictionary passed to the constructor. @@ -356,7 +356,7 @@ method returns a channel message sink that delivers messages to either the specified URL or channel data object. If the `uri` parameter is `null`, `remoteChannelData` is used as a target for the sink. Either the `url` or `remoteChannelData` parameters can be `null`, but not both. + The method returns a channel message sink that delivers messages to either the specified URL or channel data object. If the `uri` parameter is `null`, `remoteChannelData` is used as a target for the sink. Either the `url` or `remoteChannelData` parameters can be `null`, but not both. Channel sinks provide a plug-in point that allows access to the underlying messages flowing through the channel as well as the stream used by the transport mechanism to send messages to a remote object. Channel sinks are linked together in a chain of `ChannelSinkProviders` and all channel messages flow through this chain of sinks before the message is finally serialized and transported. @@ -403,7 +403,7 @@ . + This method is used by . @@ -444,7 +444,7 @@ . + This property need not be set explicitly, as it is sufficient to set the ensureSecurity parameter of . ]]> @@ -530,7 +530,7 @@ ## Remarks It is not necessary to call this method to begin listening on a newly initialized channel. - Use this method to restart listening on a channel after the method has been called. + Use this method to restart listening on a channel after the method has been called. If your channel uses a dynamically assigned port number, your port number might change when you restart listening. @@ -570,7 +570,7 @@ method. + Use this method to stop listening on a channel. To restart listening, use the method. If your channel uses a dynamically assigned port number, your port number might change when you restart listening. diff --git a/xml/System.Runtime.Remoting.Channels.Tcp/TcpClientChannel.xml b/xml/System.Runtime.Remoting.Channels.Tcp/TcpClientChannel.xml index 3f67874f952..a9dec678114 100644 --- a/xml/System.Runtime.Remoting.Channels.Tcp/TcpClientChannel.xml +++ b/xml/System.Runtime.Remoting.Channels.Tcp/TcpClientChannel.xml @@ -47,7 +47,7 @@ By default, the class uses a binary formatter to serialize all messages. - A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For a list of these configuration properties, see the documentation for . + A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For a list of these configuration properties, see the documentation for . @@ -222,7 +222,7 @@ . + Every registered channel has a unique name. The name is used to retrieve a specific channel when calling . @@ -312,7 +312,7 @@ method returns a channel message sink that delivers messages to either the specified URL or the channel data object. If the `uri` parameter is `null`, `remoteChannelData` is used as a target for the sink. Either the `url` or `remoteChannelData` parameters can be `null`, but not both. + The method returns a channel message sink that delivers messages to either the specified URL or the channel data object. If the `uri` parameter is `null`, `remoteChannelData` is used as a target for the sink. Either the `url` or `remoteChannelData` parameters can be `null`, but not both. diff --git a/xml/System.Runtime.Remoting.Channels.Tcp/TcpServerChannel.xml b/xml/System.Runtime.Remoting.Channels.Tcp/TcpServerChannel.xml index a2a583d6fd8..a9d507959ea 100644 --- a/xml/System.Runtime.Remoting.Channels.Tcp/TcpServerChannel.xml +++ b/xml/System.Runtime.Remoting.Channels.Tcp/TcpServerChannel.xml @@ -47,7 +47,7 @@ The instance accepts messages serialized in either binary or SOAP format. - A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For a list of these configuration properties, see [Channel and Formatter Configuration Properties](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/kw7c6kwc(v=vs.100)). + A object has associated configuration properties that can be set at run time either in a configuration file (by invoking the static method) or programmatically (by passing a collection to the constructor). For a list of these configuration properties, see [Channel and Formatter Configuration Properties](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/kw7c6kwc(v=vs.100)). ## Examples The following code example shows the use of a remotable type. @@ -347,7 +347,7 @@ . + Every registered channel has a unique name. The name is used to retrieve a specific channel when calling . @@ -467,12 +467,12 @@ . + This method is used by . ## Examples - The following code example shows the use of the method. + The following code example shows the use of the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/TcpServerChannel.GetUrlsForUri/CPP/class1.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels.Tcp/TcpServerChannel/GetUrlsForUri/class1.cs" id="Snippet1"::: @@ -585,7 +585,7 @@ constructor automatically calls `StartListening`, so you shouldn't call this method unless was previously called. + The constructor automatically calls `StartListening`, so you shouldn't call this method unless was previously called. Calling `StartListening` on an already listening channel may lead to unexpected behaviors and should be avoided. @@ -627,7 +627,7 @@ method. + Use this method to stop listening on a channel. To restart listening, use the method. If your channel uses a dynamically assigned port number, your port number might change when you restart listening. diff --git a/xml/System.Runtime.Remoting.Channels/BaseChannelObjectWithProperties.xml b/xml/System.Runtime.Remoting.Channels/BaseChannelObjectWithProperties.xml index ec476b0befa..d23b7b7e97d 100644 --- a/xml/System.Runtime.Remoting.Channels/BaseChannelObjectWithProperties.xml +++ b/xml/System.Runtime.Remoting.Channels/BaseChannelObjectWithProperties.xml @@ -39,24 +39,24 @@ Provides a base implementation of a channel object that exposes a dictionary interface to its properties. - is the base class for and . - - and can be used as the base classes for channels and channel sinks that provide named properties. - - handles the complex task of asking a channel object for its properties. - - This class makes 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://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/x4yx82e6(v=vs.100)). - - - -## Examples + is the base class for and . + + and can be used as the base classes for channels and channel sinks that provide named properties. + + handles the complex task of asking a channel object for its properties. + + This class makes 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://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/x4yx82e6(v=vs.100)). + + + +## Examples :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/CommonTransportKeys/CPP/commontransportkeys.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/BaseChannelObjectWithProperties/Overview/commontransportkeys.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Channels/BaseChannelObjectWithProperties/Overview/commontransportkeys.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Channels/BaseChannelObjectWithProperties/Overview/commontransportkeys.vb" id="Snippet1"::: + ]]> @@ -85,13 +85,13 @@ Initializes a new instance of the class. - @@ -131,11 +131,11 @@ The value to add. Throws a . - is being used in this case, and because returns `true`. - + is being used in this case, and because returns `true`. + ]]> The method is called. @@ -171,11 +171,11 @@ Throws a . - is being used in this case, and because returns `true`. - + is being used in this case, and because returns `true`. + ]]> The method is called. @@ -352,11 +352,11 @@ if the number of properties that can be entered into the channel object is fixed; otherwise, . - always returns `true`. - + always returns `true`. + ]]> @@ -392,11 +392,11 @@ if the collection of properties in the channel object is read-only; otherwise, . - always returns `false`. - + always returns `false`. + ]]> @@ -432,11 +432,11 @@ if the dictionary of channel object properties is synchronized; otherwise, . - always returns `false`. - + always returns `false`. + ]]> @@ -547,11 +547,11 @@ Gets a of the channel properties associated with the channel object. A of the channel properties associated with the channel object. - The immediate caller does not have infrastructure permission. @@ -590,11 +590,11 @@ The key of the object to be removed. Throws a . - is being used in this case, and because returns `true`. - + is being used in this case, and because returns `true`. + ]]> The method is called. @@ -630,11 +630,11 @@ Gets an object that is used to synchronize access to the . An object that is used to synchronize access to the . - returns a reference to the current instance of . - + returns a reference to the current instance of . + ]]> diff --git a/xml/System.Runtime.Remoting.Channels/BinaryClientFormatterSink.xml b/xml/System.Runtime.Remoting.Channels/BinaryClientFormatterSink.xml index 58b5d8afb35..3891a212b09 100644 --- a/xml/System.Runtime.Remoting.Channels/BinaryClientFormatterSink.xml +++ b/xml/System.Runtime.Remoting.Channels/BinaryClientFormatterSink.xml @@ -34,7 +34,7 @@ is forwarded to all sinks in the chain through the or calls. At this stage the message has already been serialized and is provided as information only. Sinks that need to create or modify the message must be placed in the sink chain before the formatter. This is easily achieved by implementing the interface, which gives the impression of having a reference to the formatter sink. The real formatter sink can then be placed later in the sink chain. + The function of the formatter sink is to generate the necessary headers and serialize the message to the stream. After the formatter sink, the is forwarded to all sinks in the chain through the or calls. At this stage the message has already been serialized and is provided as information only. Sinks that need to create or modify the message must be placed in the sink chain before the formatter. This is easily achieved by implementing the interface, which gives the impression of having a reference to the formatter sink. The real formatter sink can then be placed later in the sink chain. |Property|Description| |--------------|-----------------| @@ -211,7 +211,7 @@ method is called by the formatter sink before it serializes the message. + The method is called by the formatter sink before it serializes the message. ]]> diff --git a/xml/System.Runtime.Remoting.Channels/BinaryClientFormatterSinkProvider.xml b/xml/System.Runtime.Remoting.Channels/BinaryClientFormatterSinkProvider.xml index 7b90f454456..5d5b5cefd82 100644 --- a/xml/System.Runtime.Remoting.Channels/BinaryClientFormatterSinkProvider.xml +++ b/xml/System.Runtime.Remoting.Channels/BinaryClientFormatterSinkProvider.xml @@ -30,7 +30,7 @@ ## Remarks A creates client formatter sinks that use the to serialize messages for the client channel through which remoting messages flow. - The function of the formatter sink is to generate the necessary headers and serialize the message to the stream. After the formatter sink, the is forwarded to all sinks in the channel sink chain through the or calls. At this stage, the message has already been serialized and is provided as information only. Sinks that need to create or modify the message must be placed in the sink chain before the formatter. You can do this by implementing both the and interfaces. The formatter sink can then be placed in the sink chain later. + The function of the formatter sink is to generate the necessary headers and serialize the message to the stream. After the formatter sink, the is forwarded to all sinks in the channel sink chain through the or calls. At this stage, the message has already been serialized and is provided as information only. Sinks that need to create or modify the message must be placed in the sink chain before the formatter. You can do this by implementing both the and interfaces. The formatter sink can then be placed in the sink chain later. Formatter sinks use sink configuration properties to configure the channel at run time. Sink properties can be specified in a configuration file, or programmatically, inside of a . In a configuration file all values are represented by strings, but when building a property programmatically, value types can be specified with their native values or with strings. @@ -138,7 +138,7 @@ method is called, it creates its own channel sink, forwards the call to the next sink provider in the chain (if there is one), and ensures that the next sink and the current one are linked together. + When the method is called, it creates its own channel sink, forwards the call to the next sink provider in the chain (if there is one), and ensures that the next sink and the current one are linked together. ]]> diff --git a/xml/System.Runtime.Remoting.Channels/BinaryServerFormatterSink.xml b/xml/System.Runtime.Remoting.Channels/BinaryServerFormatterSink.xml index a1f38299cfc..7dacf9e12ef 100644 --- a/xml/System.Runtime.Remoting.Channels/BinaryServerFormatterSink.xml +++ b/xml/System.Runtime.Remoting.Channels/BinaryServerFormatterSink.xml @@ -28,7 +28,7 @@ method, which is called by server channels to create the server channel sink chains. When the message reaches the dispatch sink, the dispatch sink passes the message to the remoting infrastructure. + The request stream propagates from the server transport sink through the server channel sinks until it reaches the appropriate formatter sink. The formatter sink deserializes the message and passes it through the pipeline. A special dispatch sink is inserted at the end of the channel sink chain by the method, which is called by server channels to create the server channel sink chains. When the message reaches the dispatch sink, the dispatch sink passes the message to the remoting infrastructure. The following table shows the sink configuration properties that can be specified for the current sink provider. @@ -228,9 +228,9 @@ interface, is passed from the client end to the server end by invoking on message sink objects. Message sinks are chained together, which means that every message sink is responsible for calling on the next message sink after the current message sink has finished its work. For instance, a synchronization-related message sink might cause a lock to be acquired or released and delegated to the downstream message sink. + The proxy's job is to convert a method call that is invoked on it into a message. The message, which implements the interface, is passed from the client end to the server end by invoking on message sink objects. Message sinks are chained together, which means that every message sink is responsible for calling on the next message sink after the current message sink has finished its work. For instance, a synchronization-related message sink might cause a lock to be acquired or released and delegated to the downstream message sink. - When the formatter channel sink gets a message that needs to be sent over the channel, it calls , passing the message as a parameter. The formatter sink then creates the transport header array and calls on the formatter sink. This call is forwarded down the sink chain, and any sink can create a request stream that will be passed back to the formatter sink. After this call returns, the message is serialized, is called on the first chain in the sink chain, and the message is passed to the channel sinks. + When the formatter channel sink gets a message that needs to be sent over the channel, it calls , passing the message as a parameter. The formatter sink then creates the transport header array and calls on the formatter sink. This call is forwarded down the sink chain, and any sink can create a request stream that will be passed back to the formatter sink. After this call returns, the message is serialized, is called on the first chain in the sink chain, and the message is passed to the channel sinks. After the channel sinks get the message, they can write data to the stream, add headers to the header array, and add themselves to the sink stack before forwarding the call to the next sink. When the call reaches the transport sink at the end of the chain, the transport sink sends the headers and serialized message over the channel to the server, where the process is reversed. diff --git a/xml/System.Runtime.Remoting.Channels/BinaryServerFormatterSinkProvider.xml b/xml/System.Runtime.Remoting.Channels/BinaryServerFormatterSinkProvider.xml index 9b3e525db32..d339da7f2c6 100644 --- a/xml/System.Runtime.Remoting.Channels/BinaryServerFormatterSinkProvider.xml +++ b/xml/System.Runtime.Remoting.Channels/BinaryServerFormatterSinkProvider.xml @@ -30,9 +30,9 @@ ## Remarks Channel sinks are connected to a server channel through implementations of the interface. All the remoting server channels provide constructors that take a as a parameter. - Channel sink providers are stored in a chain, and the user is responsible for chaining all channel sink providers together before passing the outer one to the channel constructor. provides a property called for this purpose. + Channel sink providers are stored in a chain, and the user is responsible for chaining all channel sink providers together before passing the outer one to the channel constructor. provides a property called for this purpose. - When multiple channel sink providers are provided in a configuration file, the remoting infrastructure will chain them together in the order they are found in the configuration file. The channel sink providers will be created when the channel is created during the call. + When multiple channel sink providers are provided in a configuration file, the remoting infrastructure will chain them together in the order they are found in the configuration file. The channel sink providers will be created when the channel is created during the call. Formatter sinks use sink configuration properties to configure the channel at run time. Sink properties can be specified in a configuration file, or programmatically, inside of a . In a configuration file all values are represented by strings, but when building a property programmatically, value types can be specified with their native values or with strings. diff --git a/xml/System.Runtime.Remoting.Channels/ChannelServices.xml b/xml/System.Runtime.Remoting.Channels/ChannelServices.xml index 9c051beb36c..2e727cf5753 100644 --- a/xml/System.Runtime.Remoting.Channels/ChannelServices.xml +++ b/xml/System.Runtime.Remoting.Channels/ChannelServices.xml @@ -31,7 +31,7 @@ ## Remarks Channels transport messages between applications across such remoting boundaries as application domains, processes, and computers. These crossings can be inbound and outbound. A channel can listen on an endpoint for inbound messages, send to an endpoint for outbound messages, or both. This provides an extensibility point in the runtime to plug in a wide range of protocols, even though the runtime might not be at the other end of the channel. Run-time objects can be used to expose a wide range of semantics and entities. The channel provides the extensibility point to convert the messages to and from the specific protocols. - Channels must expose the interface, which provides informational properties such as the and . Channels are registered using the method. Channels can also be loaded from the remoting configuration. (See [\ Element (Template)](https://msdn.microsoft.com/library/73399d48-f0fd-46e9-828b-6cdafde5ffce) for details.) + Channels must expose the interface, which provides informational properties such as the and . Channels are registered using the method. Channels can also be loaded from the remoting configuration. (See [\ Element (Template)](https://msdn.microsoft.com/library/73399d48-f0fd-46e9-828b-6cdafde5ffce) for details.) On the client side, messages are handed off to the client channel sink chain after they traverse the client chain. The first channel sink is typically a , which serializes the message into a stream that is passed down the channel sink chain to the client transport sink. The client transport sink then writes this stream out to the wire. @@ -334,9 +334,9 @@ [!NOTE] -> is obsolete. Please use instead. +> is obsolete. Please use instead. - The method takes in the interface from a channel object. The channel's must be unique, or the channel must be anonymous. A channel is anonymous if the is set to either `null` or by using the `name` configuration property. + The method takes in the interface from a channel object. The channel's must be unique, or the channel must be anonymous. A channel is anonymous if the is set to either `null` or by using the `name` configuration property. You cannot register two channels with the same name in a . By default, the name of a is "http" and the name of a is "tcp." Therefore, if you want to register two channels of the same type, you must specify a different name for one of them through configuration properties. @@ -384,7 +384,7 @@ method receives the interface from a channel object. The channel's must be unique, or the channel must be anonymous. A channel is anonymous if the is set to either `null` or by using the `name` configuration property. + The method receives the interface from a channel object. The channel's must be unique, or the channel must be anonymous. A channel is anonymous if the is set to either `null` or by using the `name` configuration property. You cannot register two channels with the same name in a . By default, the name of a is "http" and the name of a is "tcp". Therefore, if you want to register two channels of the same type, you must specify a different name for one of them through configuration properties. diff --git a/xml/System.Runtime.Remoting.Channels/ClientChannelSinkStack.xml b/xml/System.Runtime.Remoting.Channels/ClientChannelSinkStack.xml index 091705be802..ccba7b148ad 100644 --- a/xml/System.Runtime.Remoting.Channels/ClientChannelSinkStack.xml +++ b/xml/System.Runtime.Remoting.Channels/ClientChannelSinkStack.xml @@ -36,11 +36,11 @@ Holds the stack of client channel sinks that must be invoked during an asynchronous message response decoding. - @@ -132,11 +132,11 @@ The stream that is returning from the transport sink. Requests asynchronous processing of a method call on the sinks that are in the current sink stack. - method initializes asynchronous processing on the top sink in the current sink stack. For additional information, see . - + method initializes asynchronous processing on the top sink in the current sink stack. For additional information, see . + ]]> The current sink stack is empty. @@ -175,11 +175,11 @@ The exception to dispatch to the server. Dispatches the specified exception on the reply sink. - method dispatches the specified exception to the server through the reply sink that is specified in the constructor of the current sink stack. If the current sink stack was created without a reply sink, the exception is not transmitted, and no new exception is thrown. - + method dispatches the specified exception to the server through the reply sink that is specified in the constructor of the current sink stack. If the current sink stack was created without a reply sink, the exception is not transmitted, and no new exception is thrown. + ]]> @@ -217,11 +217,11 @@ The to dispatch. Dispatches the specified reply message on the reply sink. - method dispatches the specified message to the server through the reply sink that is specified in the constructor of the current sink stack. If the current sink stack was created without a reply sink, the message is not transmitted, and no new exception is thrown. - + method dispatches the specified message to the server through the reply sink that is specified in the constructor of the current sink stack. If the current sink stack was created without a reply sink, the message is not transmitted, and no new exception is thrown. + ]]> @@ -298,11 +298,11 @@ Information generated on the request side that is needed on the response side. Pushes the specified sink and information that is associated with it onto the sink stack. - method on the corresponding sink. - + method on the corresponding sink. + ]]> diff --git a/xml/System.Runtime.Remoting.Channels/IAuthorizeRemotingConnection.xml b/xml/System.Runtime.Remoting.Channels/IAuthorizeRemotingConnection.xml index 45633b5cd2a..c1332949bc9 100644 --- a/xml/System.Runtime.Remoting.Channels/IAuthorizeRemotingConnection.xml +++ b/xml/System.Runtime.Remoting.Channels/IAuthorizeRemotingConnection.xml @@ -14,11 +14,11 @@ The interface provides methods that indicate whether a client is authorized to connect on the current channel, based on the client's network address and user identity. - interface is passed to . It provides a single point of authorization for all incoming connections on a . It allows for the authorization of the caller before any incoming messages are deserialized to minimize the security threat from untrusted sources. - + interface is passed to . It provides a single point of authorization for all incoming connections on a . It allows for the authorization of the caller before any incoming messages are deserialized to minimize the security threat from untrusted sources. + ]]> @@ -48,11 +48,11 @@ if the network address of the client is authorized; otherwise, . - interface is passed to . It provides a single point of authorization for all incoming connections on a . It allows for the authorization of the caller before any incoming messages are deserialized to minimize the security threat from untrusted sources. - + interface is passed to . It provides a single point of authorization for all incoming connections on a . It allows for the authorization of the caller before any incoming messages are deserialized to minimize the security threat from untrusted sources. + ]]> @@ -82,11 +82,11 @@ if the user identity of the client is authorized; otherwise, . - interface is passed to . It provides a single point of authorization for all incoming connections on a . It allows for the authorization of the caller before any incoming messages are deserialized to minimize the security threat from untrusted sources. - + interface is passed to . It provides a single point of authorization for all incoming connections on a . It allows for the authorization of the caller before any incoming messages are deserialized to minimize the security threat from untrusted sources. + ]]> diff --git a/xml/System.Runtime.Remoting.Channels/IChannel.xml b/xml/System.Runtime.Remoting.Channels/IChannel.xml index 7c4346a5608..58b600ce70b 100644 --- a/xml/System.Runtime.Remoting.Channels/IChannel.xml +++ b/xml/System.Runtime.Remoting.Channels/IChannel.xml @@ -22,17 +22,17 @@ Provides conduits for messages that cross remoting boundaries. - s, s, processes, or computers. An application can cross these boundaries only by using channels. These crossings can be inbound and outbound. A channel can listen on an endpoint for inbound messages, send to an endpoint for outbound messages, or both. This provides an extensibility point in the runtime to plug in a wide range protocols, even though the runtime might not be at the other end of the channel. - - Run-time objects can be used to represent a wide and rich set of semantics and entities. The channel provides the extensibility point to convert the messages to and from the specific protocols. If there are runtimes at both ends of the channel, a virtual channel is created between the two ends, in order to connect the client and server sink chains on either side of the boundary. - - The client part of the channel is located at the end of a client context sink chain. The server part of the channel is located at the start of the server context sink chain. Messages are delivered to the client channel using the interface, travel through the channel, and are then received by the server channel. The server channel delivers the message to the first server context sink. - - Channels must expose the interface, which provides informational properties such as the and properties. Channels can be registered using the method. - + s, s, processes, or computers. An application can cross these boundaries only by using channels. These crossings can be inbound and outbound. A channel can listen on an endpoint for inbound messages, send to an endpoint for outbound messages, or both. This provides an extensibility point in the runtime to plug in a wide range protocols, even though the runtime might not be at the other end of the channel. + + Run-time objects can be used to represent a wide and rich set of semantics and entities. The channel provides the extensibility point to convert the messages to and from the specific protocols. If there are runtimes at both ends of the channel, a virtual channel is created between the two ends, in order to connect the client and server sink chains on either side of the boundary. + + The client part of the channel is located at the end of a client context sink chain. The server part of the channel is located at the start of the server context sink chain. Messages are delivered to the client channel using the interface, travel through the channel, and are then received by the server channel. The server channel delivers the message to the first server context sink. + + Channels must expose the interface, which provides informational properties such as the and properties. Channels can be registered using the method. + ]]> @@ -64,13 +64,13 @@ Gets the name of the channel. The name of the channel. - The immediate caller does not have infrastructure permission. @@ -103,22 +103,22 @@ Gets the priority of the channel. An integer that indicates the priority of the channel. - . - - For server channels, the priority indicates the order in which their channel data will appear in a , which in turn affects the order in which clients will try to connect to the server object. If the server is listening on an HTTP channel with priority 50 and a TCP channel with priority 25 and the client has registered both an HTTP and TCP channel, then the client will use the HTTP channel to talk to the server. - - - -## Examples + . + + For server channels, the priority indicates the order in which their channel data will appear in a , which in turn affects the order in which clients will try to connect to the server object. If the server is listening on an HTTP channel with priority 50 and a TCP channel with priority 25 and the client has registered both an HTTP and TCP channel, then the client will use the HTTP channel to talk to the server. + + + +## Examples :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/HttpServerChannel_Server_Client/CPP/httpclientchannel_6_client.cpp" id="Snippet5"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IChannel/ChannelName/httpclientchannel_6_client.cs" id="Snippet5"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Channels/IChannel/ChannelName/httpclientchannel_6_client.vb" id="Snippet5"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Channels/IChannel/ChannelName/httpclientchannel_6_client.vb" id="Snippet5"::: + ]]> The immediate caller does not have infrastructure permission. @@ -163,13 +163,13 @@ Returns the object URI as an out parameter, and the URI of the current channel as the return value. The URI of the current channel, or if the URI does not belong to this channel. - The immediate caller does not have infrastructure permission. diff --git a/xml/System.Runtime.Remoting.Channels/IChannelReceiver.xml b/xml/System.Runtime.Remoting.Channels/IChannelReceiver.xml index d3f86a04bb5..08076ec7865 100644 --- a/xml/System.Runtime.Remoting.Channels/IChannelReceiver.xml +++ b/xml/System.Runtime.Remoting.Channels/IChannelReceiver.xml @@ -26,18 +26,18 @@ Provides required functions and properties for the receiver channels. - interface. - - - -## Examples + interface. + + + +## Examples :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/IChannelReceiver_StartListening_ChannelData/CPP/ichannelreceiver_channeldata_server.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IChannelReceiver/Overview/ichannelreceiver_channeldata_server.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Channels/IChannelReceiver/Overview/ichannelreceiver_channeldata_server.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Channels/IChannelReceiver/Overview/ichannelreceiver_channeldata_server.vb" id="Snippet1"::: + ]]> @@ -69,11 +69,11 @@ Gets the channel-specific data. The channel data. - is called and a is created. - + is called and a is created. + ]]> The immediate caller does not have infrastructure permission. @@ -110,18 +110,18 @@ Returns an array of all the URLs for a URI. An array of the URLs. - method. - - - -## Examples + method. + + + +## Examples :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/IChannelReceiver_StartListening_ChannelData/CPP/ichannelreceiver_channeldata_server.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IChannelReceiver/Overview/ichannelreceiver_channeldata_server.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Channels/IChannelReceiver/Overview/ichannelreceiver_channeldata_server.vb" id="Snippet3"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Channels/IChannelReceiver/Overview/ichannelreceiver_channeldata_server.vb" id="Snippet3"::: + ]]> The immediate caller does not have infrastructure permission. @@ -157,18 +157,18 @@ Optional initialization information. Instructs the current channel to start listening for requests. - The immediate caller does not have infrastructure permission. @@ -204,18 +204,18 @@ Optional state information for the channel. Instructs the current channel to stop listening for requests. - The immediate caller does not have infrastructure permission. diff --git a/xml/System.Runtime.Remoting.Channels/IChannelSender.xml b/xml/System.Runtime.Remoting.Channels/IChannelSender.xml index 1e4e000624f..3be34a5bf84 100644 --- a/xml/System.Runtime.Remoting.Channels/IChannelSender.xml +++ b/xml/System.Runtime.Remoting.Channels/IChannelSender.xml @@ -26,21 +26,21 @@ Provides required functions and properties for the sender channels. - interface. - - - -## Examples + The sending side of channels must expose the interface. + + + +## Examples :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/IChannelSender/CPP/ichannelsender_2_client.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IChannelSender/Overview/ichannelsender_2_client.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Channels/IChannelSender/Overview/ichannelsender_2_client.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Channels/IChannelSender/Overview/ichannelsender_2_client.vb" id="Snippet1"::: + ]]> @@ -80,18 +80,18 @@ Returns a channel message sink that delivers messages to the specified URL or channel data object. A channel message sink that delivers messages to the specified URL or channel data object, or if the channel cannot connect to the given endpoint. - method returns a channel message sink that delivers messages to either the specified URL or the channel data object. If the `uri` parameter is `null`, the `remoteChannelData` parameter is used as a target for the sink. Either the `url` parameter or the `remoteChannelData` parameter can be `null`, but not both. - - - -## Examples + method returns a channel message sink that delivers messages to either the specified URL or the channel data object. If the `uri` parameter is `null`, the `remoteChannelData` parameter is used as a target for the sink. Either the `url` parameter or the `remoteChannelData` parameter can be `null`, but not both. + + + +## Examples :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/IChannelSender/CPP/ichannelsender_2_client.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IChannelSender/Overview/ichannelsender_2_client.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Channels/IChannelSender/Overview/ichannelsender_2_client.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Channels/IChannelSender/Overview/ichannelsender_2_client.vb" id="Snippet1"::: + ]]> The immediate caller does not have infrastructure permission. diff --git a/xml/System.Runtime.Remoting.Channels/IClientChannelSink.xml b/xml/System.Runtime.Remoting.Channels/IClientChannelSink.xml index b281c9742e3..3c4a5619883 100644 --- a/xml/System.Runtime.Remoting.Channels/IClientChannelSink.xml +++ b/xml/System.Runtime.Remoting.Channels/IClientChannelSink.xml @@ -179,7 +179,7 @@ method is called by the formatter sink before it serializes the message. + The method is called by the formatter sink before it serializes the message. diff --git a/xml/System.Runtime.Remoting.Channels/IClientChannelSinkProvider.xml b/xml/System.Runtime.Remoting.Channels/IClientChannelSinkProvider.xml index 80c295479ba..8c9fe47e959 100644 --- a/xml/System.Runtime.Remoting.Channels/IClientChannelSinkProvider.xml +++ b/xml/System.Runtime.Remoting.Channels/IClientChannelSinkProvider.xml @@ -22,25 +22,25 @@ Creates client channel sinks for the client channel through which remoting messages flow. - interface. All the remoting client channels provide constructors that take a as a parameter. - - Channel sink providers are stored in a chain, and the user is responsible for chaining all channel sink providers together before passing the outer one to the channel constructor. provides a property called for this purpose. - - When multiple channel sink providers are specified in a configuration file, the remoting infrastructure will chain them together in the order they are found in the configuration file. The channel sink providers will be created when the channel is created during the call. - - - -## Examples - The following code example illustrates an implementation of this interface. - + interface. All the remoting client channels provide constructors that take a as a parameter. + + Channel sink providers are stored in a chain, and the user is responsible for chaining all channel sink providers together before passing the outer one to the channel constructor. provides a property called for this purpose. + + When multiple channel sink providers are specified in a configuration file, the remoting infrastructure will chain them together in the order they are found in the configuration file. The channel sink providers will be created when the channel is created during the call. + + + +## Examples + The following code example illustrates an implementation of this interface. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Remoting_Sinks/CPP/clientsink.cpp" id="Snippet30"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IClientChannelSink/Overview/clientsink.cs" id="Snippet30"::: - - See the interface documentation for an example of the corresponding client sink implementation. - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IClientChannelSink/Overview/clientsink.cs" id="Snippet30"::: + + See the interface documentation for an example of the corresponding client sink implementation. + ]]> @@ -80,19 +80,19 @@ Creates a sink chain. The first sink of the newly formed channel sink chain, or , which indicates that this provider will not or cannot provide a connection for this endpoint. - method is called, it creates its own channel sink, forwards the call to the next sink provider in the chain (if there is one), and ensures that the next sink and the current one are linked together. - - - -## Examples - The following code example illustrates an implementation of this method. - + method is called, it creates its own channel sink, forwards the call to the next sink provider in the chain (if there is one), and ensures that the next sink and the current one are linked together. + + + +## Examples + The following code example illustrates an implementation of this method. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Remoting_Sinks/CPP/clientsink.cpp" id="Snippet33"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IClientChannelSink/Overview/clientsink.cs" id="Snippet33"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IClientChannelSink/Overview/clientsink.cs" id="Snippet33"::: + ]]> The immediate caller does not have infrastructure permission. @@ -129,14 +129,14 @@ Gets or sets the next sink provider in the channel sink provider chain. The next sink provider in the channel sink provider chain. - The immediate caller does not have infrastructure permission. diff --git a/xml/System.Runtime.Remoting.Channels/IClientChannelSinkStack.xml b/xml/System.Runtime.Remoting.Channels/IClientChannelSinkStack.xml index 11410de2999..665b4b53996 100644 --- a/xml/System.Runtime.Remoting.Channels/IClientChannelSinkStack.xml +++ b/xml/System.Runtime.Remoting.Channels/IClientChannelSinkStack.xml @@ -26,15 +26,15 @@ Provides functionality for a stack of client channel sinks that must be invoked during an asynchronous message response decoding. - is used during processing of responses to asynchronous calls. - - During a synchronous call, the method is called when a message is outbound to the server. Each sink in the sink chain calls the method on the next sink until the call reaches the transport sink at the end of the chain. From there the message is transported to the server. - - When the formatter sink is called through the method, it dispatches the call asynchronously by calling on the next channel sink. A stack of reply sinks is needed to process the response. Any sink that wants to process the response needs to push itself to the client channel sink stack inside of . - + is used during processing of responses to asynchronous calls. + + During a synchronous call, the method is called when a message is outbound to the server. Each sink in the sink chain calls the method on the next sink until the call reaches the transport sink at the end of the chain. From there the message is transported to the server. + + When the formatter sink is called through the method, it dispatches the call asynchronously by calling on the next channel sink. A stack of reply sinks is needed to process the response. Any sink that wants to process the response needs to push itself to the client channel sink stack inside of . + ]]> @@ -106,11 +106,11 @@ Information generated on the request side that is needed on the response side. Pushes the specified sink and information associated with it onto the sink stack. - method on the corresponding sink. - + method on the corresponding sink. + ]]> The immediate caller does not have infrastructure permission. diff --git a/xml/System.Runtime.Remoting.Channels/IClientResponseChannelSinkStack.xml b/xml/System.Runtime.Remoting.Channels/IClientResponseChannelSinkStack.xml index 3e29e3440cd..34e90636502 100644 --- a/xml/System.Runtime.Remoting.Channels/IClientResponseChannelSinkStack.xml +++ b/xml/System.Runtime.Remoting.Channels/IClientResponseChannelSinkStack.xml @@ -56,11 +56,11 @@ The stream coming back from the transport sink. Requests asynchronous processing of a method call on the sinks in the current sink stack. - method initializes asynchronous processing on the top sink in the current sink stack. For additional information, see . - + method initializes asynchronous processing on the top sink in the current sink stack. For additional information, see . + ]]> The current sink stack is empty. @@ -97,11 +97,11 @@ The exception to dispatch to the server. Dispatches the specified exception on the reply sink. - method dispatches the specified exception to the server through the reply sink specified in the constructor of the current sink stack. If the current sink stack was created without a reply sink, the exception is not transmitted, and no new exception is thrown. - + method dispatches the specified exception to the server through the reply sink specified in the constructor of the current sink stack. If the current sink stack was created without a reply sink, the exception is not transmitted, and no new exception is thrown. + ]]> The immediate caller does not have infrastructure permission. @@ -137,11 +137,11 @@ The to dispatch. Dispatches the specified reply message on the reply sink. - method dispatches the specified message to the server through the reply sink specified in the constructor of the current sink stack. If the current sink stack was created without a reply sink, the message is not transmitted, and no new exception is thrown. - + method dispatches the specified message to the server through the reply sink specified in the constructor of the current sink stack. If the current sink stack was created without a reply sink, the message is not transmitted, and no new exception is thrown. + ]]> The immediate caller does not have infrastructure permission. diff --git a/xml/System.Runtime.Remoting.Channels/IServerChannelSink.xml b/xml/System.Runtime.Remoting.Channels/IServerChannelSink.xml index a7afa650b67..7bae30bac70 100644 --- a/xml/System.Runtime.Remoting.Channels/IServerChannelSink.xml +++ b/xml/System.Runtime.Remoting.Channels/IServerChannelSink.xml @@ -26,21 +26,21 @@ Provides methods used for security and transport sinks. - interface. - + interface. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Remoting_Sinks/CPP/serversink.cpp" id="Snippet60"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IClientChannelSink/Overview/serversink.cs" id="Snippet60"::: - - See the interface documentation for an example of the corresponding server sink provider implementation. - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IClientChannelSink/Overview/serversink.cs" id="Snippet60"::: + + See the interface documentation for an example of the corresponding server sink provider implementation. + ]]> @@ -83,18 +83,18 @@ The stream heading back to the transport sink. Requests processing from the current sink of the response from a method call sent asynchronously. - The immediate caller does not have infrastructure permission. @@ -137,11 +137,11 @@ Returns the onto which the provided response message is to be serialized. The onto which the provided response message is to be serialized. - The immediate caller does not have infrastructure permission. @@ -174,11 +174,11 @@ Gets the next server channel sink in the server sink chain. The next server channel sink in the server sink chain. - The immediate caller does not have the required permission. @@ -227,11 +227,11 @@ Requests message processing from the current sink. A status value that provides information about how message was processed. - interface, is passed from the client end to the server end by invoking on message sink objects. Message sinks are chained together in the sense that every message sink is responsible for calling on the next message sink after it has performed its work. For instance, a synchronization-related message sink can cause a lock to be acquired or released, and then delegated further to the downstream message sink. - + interface, is passed from the client end to the server end by invoking on message sink objects. Message sinks are chained together in the sense that every message sink is responsible for calling on the next message sink after it has performed its work. For instance, a synchronization-related message sink can cause a lock to be acquired or released, and then delegated further to the downstream message sink. + ]]> The immediate caller does not have infrastructure permission. diff --git a/xml/System.Runtime.Remoting.Channels/IServerChannelSinkProvider.xml b/xml/System.Runtime.Remoting.Channels/IServerChannelSinkProvider.xml index 50491ff951f..dabe695215b 100644 --- a/xml/System.Runtime.Remoting.Channels/IServerChannelSinkProvider.xml +++ b/xml/System.Runtime.Remoting.Channels/IServerChannelSinkProvider.xml @@ -22,27 +22,27 @@ Creates server channel sinks for the server channel through which remoting messages flow. - interface. All the remoting server channels provide constructors that take a as a parameter. - - Channel sink providers are stored in a chain, and the user is responsible for chaining all channel sink providers together before passing the outer one to the channel constructor. provides a property called for this purpose. - - When multiple channel sink providers are specified in a configuration file, the remoting infrastructure will chain them together in the order they are found in the configuration file. The channel sink providers are created at the same time as the channel, during a call. - - After the is generated, .NET Framework searches through the list of registered channels to find one that can process the call. Once an appropriate channel has been found, the channel sink is retrieved from the channel, and the is forwarded to the sink for processing. - - - -## Examples - The following code example illustrates an implementation of this interface. - + interface. All the remoting server channels provide constructors that take a as a parameter. + + Channel sink providers are stored in a chain, and the user is responsible for chaining all channel sink providers together before passing the outer one to the channel constructor. provides a property called for this purpose. + + When multiple channel sink providers are specified in a configuration file, the remoting infrastructure will chain them together in the order they are found in the configuration file. The channel sink providers are created at the same time as the channel, during a call. + + After the is generated, .NET Framework searches through the list of registered channels to find one that can process the call. Once an appropriate channel has been found, the channel sink is retrieved from the channel, and the is forwarded to the sink for processing. + + + +## Examples + The following code example illustrates an implementation of this interface. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/Remoting_Sinks/CPP/serversink.cpp" id="Snippet70"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IClientChannelSink/Overview/serversink.cs" id="Snippet70"::: - - See the interface documentation for an example of the corresponding server sink implementation. - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Channels/IClientChannelSink/Overview/serversink.cs" id="Snippet70"::: + + See the interface documentation for an example of the corresponding server sink implementation. + ]]> @@ -78,13 +78,13 @@ Creates a sink chain. The first sink of the newly formed channel sink chain, or , which indicates that this provider will not or cannot provide a connection for this endpoint. - The immediate caller does not have infrastructure permission. @@ -120,13 +120,13 @@ A object in which the channel data is to be returned. Returns the channel data for the channel that the current sink is associated with. - The immediate caller does not have infrastructure permission. @@ -163,13 +163,13 @@ Gets or sets the next sink provider in the channel sink provider chain. The next sink provider in the channel sink provider chain. - The immediate caller does not have infrastructure permission. diff --git a/xml/System.Runtime.Remoting.Channels/IServerChannelSinkStack.xml b/xml/System.Runtime.Remoting.Channels/IServerChannelSinkStack.xml index 5220f8d5209..bc97aa5a780 100644 --- a/xml/System.Runtime.Remoting.Channels/IServerChannelSinkStack.xml +++ b/xml/System.Runtime.Remoting.Channels/IServerChannelSinkStack.xml @@ -94,11 +94,11 @@ Information generated on the request side that is needed on the response side. Pushes the specified sink and information associated with it onto the sink stack. - method on the corresponding sink. - + method on the corresponding sink. + ]]> The immediate caller does not have infrastructure permission. @@ -134,13 +134,13 @@ The status and state of an asynchronous operation on a remote object. Presents a callback delegate to handle a callback after a message has been dispatched asynchronously. - method is intended for use only by the .NET Framework remoting infrastructure. - + method is intended for use only by the .NET Framework remoting infrastructure. + ]]> @@ -177,11 +177,11 @@ The state associated with . Stores a message sink and its associated state for later asynchronous processing. - method is intended for use only by the .NET Framework remoting infrastructure. - + method is intended for use only by the .NET Framework remoting infrastructure. + ]]> @@ -218,13 +218,13 @@ The state associated with . Stores a message sink and its associated state, and then dispatches a message asynchronously, using the sink just stored and any other stored sinks. - method is intended for use only by the .NET Framework remoting infrastructure. - - Also, the method should only be called by a transport sink to complete an asynchronous dispatch. - + method is intended for use only by the .NET Framework remoting infrastructure. + + Also, the method should only be called by a transport sink to complete an asynchronous dispatch. + ]]> diff --git a/xml/System.Runtime.Remoting.Channels/IServerResponseChannelSinkStack.xml b/xml/System.Runtime.Remoting.Channels/IServerResponseChannelSinkStack.xml index ae793042013..f8fe59b7281 100644 --- a/xml/System.Runtime.Remoting.Channels/IServerResponseChannelSinkStack.xml +++ b/xml/System.Runtime.Remoting.Channels/IServerResponseChannelSinkStack.xml @@ -58,11 +58,11 @@ The stream coming back from the transport sink. Requests asynchronous processing of a method call on the sinks in the current sink stack. - method initializes asynchronous processing on the top sink in the current sink stack. For additional information, see the method. - + method initializes asynchronous processing on the top sink in the current sink stack. For additional information, see the method. + ]]> diff --git a/xml/System.Runtime.Remoting.Channels/ServerChannelSinkStack.xml b/xml/System.Runtime.Remoting.Channels/ServerChannelSinkStack.xml index ca46af2c473..4c128cc8b22 100644 --- a/xml/System.Runtime.Remoting.Channels/ServerChannelSinkStack.xml +++ b/xml/System.Runtime.Remoting.Channels/ServerChannelSinkStack.xml @@ -36,11 +36,11 @@ Holds the stack of server channel sinks. - @@ -101,11 +101,11 @@ The stream coming back from the transport sink. Requests asynchronous processing of a method call on the sinks in the current sink stack. - method. - + method. + ]]> The current sink stack is empty. @@ -147,11 +147,11 @@ Returns the onto which the specified message is to be serialized. The onto which the specified message is to be serialized. - called with the `msg` and `headers` parameters ( (`msg`, `headers`)) on the top sink in the current sink stack. The top sink in the sink stack remains unchanged. - + called with the `msg` and `headers` parameters ( (`msg`, `headers`)) on the top sink in the current sink stack. The top sink in the sink stack remains unchanged. + ]]> The sink stack is empty. @@ -229,11 +229,11 @@ Information generated on the request side that is needed on the response side. Pushes the specified sink and information associated with it onto the sink stack. - method on the corresponding sink. - + method on the corresponding sink. + ]]> @@ -271,13 +271,13 @@ The status and state of an asynchronous operation on a remote object. Provides a delegate to handle a callback after a message has been dispatched asynchronously. - method is intended for use only by the .NET Framework remoting infrastructure. You should not call it directly. - + method is intended for use only by the .NET Framework remoting infrastructure. You should not call it directly. + ]]> @@ -317,17 +317,17 @@ The state associated with . Stores a message sink and its associated state for later asynchronous processing. - method is intended for use only by the .NET Framework remoting infrastructure. You should not call it directly. - + method is intended for use only by the .NET Framework remoting infrastructure. You should not call it directly. + ]]> - The current sink stack is empty. - - -or- - + The current sink stack is empty. + + -or- + The specified sink was never pushed onto the current stack. @@ -366,13 +366,13 @@ The state associated with . Stores a message sink and its associated state, and then dispatches a message asynchronously, using the sink just stored and any other stored sinks. - method is intended for use only by the .NET Framework remoting infrastructure. You should not call it directly. - - The method should be only called by a transport sink to complete an asynchronous dispatch. - + method is intended for use only by the .NET Framework remoting infrastructure. You should not call it directly. + + The method should be only called by a transport sink to complete an asynchronous dispatch. + ]]> diff --git a/xml/System.Runtime.Remoting.Channels/SoapClientFormatterSink.xml b/xml/System.Runtime.Remoting.Channels/SoapClientFormatterSink.xml index 2f5b78ee654..98eb719dc0f 100644 --- a/xml/System.Runtime.Remoting.Channels/SoapClientFormatterSink.xml +++ b/xml/System.Runtime.Remoting.Channels/SoapClientFormatterSink.xml @@ -34,7 +34,7 @@ is forwarded to all sinks in the channel sink chain through the or calls. At this stage the message has already been serialized and is provided as information only. Sinks that need to create or modify the message need to be placed in the sink chain before the formatter. This can be achieved by implementing both the and interfaces. The formatter sink can be placed in the sink chain later. + The function of the formatter sink is to generate the necessary headers and serialize the message to the stream. After reaching the formatter sink, the is forwarded to all sinks in the channel sink chain through the or calls. At this stage the message has already been serialized and is provided as information only. Sinks that need to create or modify the message need to be placed in the sink chain before the formatter. This can be achieved by implementing both the and interfaces. The formatter sink can be placed in the sink chain later. |Property|Description| |--------------|-----------------| diff --git a/xml/System.Runtime.Remoting.Channels/SoapClientFormatterSinkProvider.xml b/xml/System.Runtime.Remoting.Channels/SoapClientFormatterSinkProvider.xml index 546e04521ee..e548120d83a 100644 --- a/xml/System.Runtime.Remoting.Channels/SoapClientFormatterSinkProvider.xml +++ b/xml/System.Runtime.Remoting.Channels/SoapClientFormatterSinkProvider.xml @@ -30,7 +30,7 @@ ## Remarks A creates client formatter sinks that use the to serialize messages for the client channel through which remoting messages flow. - The function of the formatter sink is to generate the necessary headers and serialize the message to the stream. After reaching the formatter sink, the is forwarded to all sinks in the channel sink chain through the or calls. At this stage the message has already been serialized and is provided as information only. Sinks that need to create or modify the message must be placed in the sink chain before the formatter. This can be achieved by implementing both the and interfaces. The formatter sink can be placed in the sink chain later. + The function of the formatter sink is to generate the necessary headers and serialize the message to the stream. After reaching the formatter sink, the is forwarded to all sinks in the channel sink chain through the or calls. At this stage the message has already been serialized and is provided as information only. Sinks that need to create or modify the message must be placed in the sink chain before the formatter. This can be achieved by implementing both the and interfaces. The formatter sink can be placed in the sink chain later. Formatter sinks use sink configuration properties to configure the channel at run time. Sink properties can be specified in a configuration file, or programmatically, inside of a . In a configuration file all values are represented by strings, but when building a property programmatically, value types can be specified with their native values or with strings. @@ -139,7 +139,7 @@ method is called, it creates its own channel sink, forwards the call to the next sink provider in the chain (if there is one), and ensures that the next sink and the current one are linked together. + When the method is called, it creates its own channel sink, forwards the call to the next sink provider in the chain (if there is one), and ensures that the next sink and the current one are linked together. ]]> diff --git a/xml/System.Runtime.Remoting.Channels/SoapServerFormatterSink.xml b/xml/System.Runtime.Remoting.Channels/SoapServerFormatterSink.xml index 98b6f4ddd87..68f068818f0 100644 --- a/xml/System.Runtime.Remoting.Channels/SoapServerFormatterSink.xml +++ b/xml/System.Runtime.Remoting.Channels/SoapServerFormatterSink.xml @@ -28,7 +28,7 @@ method, which is called by server channels to create the server channel sink chains. When the message reaches the dispatch sink, the dispatch sink passes the message to the remoting infrastructure. + The request stream propagates from the server transport sink through the server channel sinks until it reaches the appropriate formatter sink. The formatter sink deserializes the message and passes it through the pipeline. A special dispatch sink is inserted at the end of the channel sink chain by method, which is called by server channels to create the server channel sink chains. When the message reaches the dispatch sink, the dispatch sink passes the message to the remoting infrastructure. |Property|Description| |--------------|-----------------| diff --git a/xml/System.Runtime.Remoting.Channels/SoapServerFormatterSinkProvider.xml b/xml/System.Runtime.Remoting.Channels/SoapServerFormatterSinkProvider.xml index 50a79343df9..e3fb1e59d83 100644 --- a/xml/System.Runtime.Remoting.Channels/SoapServerFormatterSinkProvider.xml +++ b/xml/System.Runtime.Remoting.Channels/SoapServerFormatterSinkProvider.xml @@ -30,9 +30,9 @@ ## Remarks Channel sinks are connected to a server channel through implementations of the interface. All the remoting server channels provide constructors that take a as a parameter. - Channel sink providers are stored in a chain, and the user is responsible for chaining all channel sink providers together before passing the outer one to the channel constructor. provides a property called for this purpose. + Channel sink providers are stored in a chain, and the user is responsible for chaining all channel sink providers together before passing the outer one to the channel constructor. provides a property called for this purpose. - When multiple channel sink providers are specified in a configuration file, the remoting infrastructure will chain them together in the order they are found in the configuration file. The channel sink providers and the channels are created during the call. + When multiple channel sink providers are specified in a configuration file, the remoting infrastructure will chain them together in the order they are found in the configuration file. The channel sink providers and the channels are created during the call. Formatter sinks use sink configuration properties to configure the channel at run time. Sink properties can be specified in a configuration file, or programmatically, inside of a . In a configuration file all values are represented by strings, but when building a property programmatically, value types can be specified with their native values or with strings. diff --git a/xml/System.Runtime.Remoting.Contexts/Context.xml b/xml/System.Runtime.Remoting.Contexts/Context.xml index 83ba7a4e7c7..b04ae87e0ab 100644 --- a/xml/System.Runtime.Remoting.Contexts/Context.xml +++ b/xml/System.Runtime.Remoting.Contexts/Context.xml @@ -25,17 +25,17 @@ Defines an environment for the objects that are resident inside it and for which a policy can be enforced. - class, which provides the usage rules. Whenever a new object is instantiated, the .NET Framework finds a compatible or creates a new instance of the class for the object. Once an object is placed in a context, it stays in it for life. Classes that can be bound to a context are called context-bound classes. When accessed from another context, such classes are referenced directly by using a proxy. Any call from an object in one context to an object in another context will go through a context proxy and be affected by the policy that the combined context properties enforce. - - A new object's context is generally chosen based on meta-data attributes on the class. This mechanism is extensible through custom attributes. These are known as static-context properties, which are compiled into the class meta-data. Dynamic-context properties (also known as configuration properties) can be applied and configured by administrators. - - For more information on contexts, see [Boundaries: Processes and Application Domains](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/kt21t9h7(v=vs.100)). - + class, which provides the usage rules. Whenever a new object is instantiated, the .NET Framework finds a compatible or creates a new instance of the class for the object. Once an object is placed in a context, it stays in it for life. Classes that can be bound to a context are called context-bound classes. When accessed from another context, such classes are referenced directly by using a proxy. Any call from an object in one context to an object in another context will go through a context proxy and be affected by the policy that the combined context properties enforce. + + A new object's context is generally chosen based on meta-data attributes on the class. This mechanism is extensible through custom attributes. These are known as static-context properties, which are compiled into the class meta-data. Dynamic-context properties (also known as configuration properties) can be applied and configured by administrators. + + For more information on contexts, see [Boundaries: Processes and Application Domains](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/kt21t9h7(v=vs.100)). + ]]> @@ -95,11 +95,11 @@ Allocates an unnamed data slot. A local data slot. - @@ -136,11 +136,11 @@ Allocates a named data slot. A local data slot object. - @@ -233,11 +233,11 @@ Gets the default context for the current application domain. The default context for the namespace. - @@ -273,11 +273,11 @@ The delegate used to request the callback. Executes code in another context. - method on it by passing in a delegate. The delegate is used to request a callback. The delegate must be a class type. - + method on it by passing in a delegate. The delegate is used to request a callback. The delegate must be a class type. + ]]> @@ -310,11 +310,11 @@ Cleans up the backing objects for the nondefault contexts. - class. - + class. + ]]> @@ -350,11 +350,11 @@ The name of the data slot to free. Frees a named data slot on all the contexts. - @@ -387,11 +387,11 @@ Freezes the context, making it impossible to add or remove context properties from the current context. - The context is already frozen. @@ -463,11 +463,11 @@ Looks up a named data slot. A local data slot. - @@ -543,17 +543,17 @@ if the property was successfully registered; otherwise, . - Either or its name is , or it is not dynamic (it does not implement ). @@ -626,11 +626,11 @@ The actual context property. Sets a specific context property by name. - The context is frozen. diff --git a/xml/System.Runtime.Remoting.Contexts/ContextAttribute.xml b/xml/System.Runtime.Remoting.Contexts/ContextAttribute.xml index e011ae3bb61..dd832c62421 100644 --- a/xml/System.Runtime.Remoting.Contexts/ContextAttribute.xml +++ b/xml/System.Runtime.Remoting.Contexts/ContextAttribute.xml @@ -249,7 +249,7 @@ class is an implementation of an property. The method adds the property to the given class so that when the message is received, the new object can be created in the required context environment. + The class is an implementation of an property. The method adds the property to the given class so that when the message is received, the new object can be created in the required context environment. ]]> @@ -339,7 +339,7 @@ Once all the context properties have been added to the new context, they are all queried as to whether they are okay in the new context. The context property could look at the other context properties in the property of the new context and determine whether it is compatible with these other context properties. > [!NOTE] -> By default, the method returns `true`. +> By default, the method returns `true`. ]]> diff --git a/xml/System.Runtime.Remoting.Contexts/IContextAttribute.xml b/xml/System.Runtime.Remoting.Contexts/IContextAttribute.xml index 0c0d0c13c71..5aefe48ce9a 100644 --- a/xml/System.Runtime.Remoting.Contexts/IContextAttribute.xml +++ b/xml/System.Runtime.Remoting.Contexts/IContextAttribute.xml @@ -65,7 +65,7 @@ method can add context properties directly to the property list in the interface. The default implementation in the class will add this to the context property list. Context attributes are free to override and can implement their own behavior. For example, they can add to the list a new class that implements the context property. + The method can add context properties directly to the property list in the interface. The default implementation in the class will add this to the context property list. Context attributes are free to override and can implement their own behavior. For example, they can add to the list a new class that implements the context property. ]]> diff --git a/xml/System.Runtime.Remoting.Contexts/IContributeClientContextSink.xml b/xml/System.Runtime.Remoting.Contexts/IContributeClientContextSink.xml index 4b3b59c7a17..1872ba11814 100644 --- a/xml/System.Runtime.Remoting.Contexts/IContributeClientContextSink.xml +++ b/xml/System.Runtime.Remoting.Contexts/IContributeClientContextSink.xml @@ -22,13 +22,13 @@ Contributes an interception sink at the context boundary on the client end of a remoting call. - interface is implemented by context properties in a class that want to contribute an interception sink at the context boundary on the client end of a remoting call. - - The client context chain is composed from those properties in the client context that implement , which contributes to a sink through the method call. This chain is cached for future use. - + interface is implemented by context properties in a class that want to contribute an interception sink at the context boundary on the client end of a remoting call. + + The client context chain is composed from those properties in the client context that implement , which contributes to a sink through the method call. This chain is cached for future use. + ]]> diff --git a/xml/System.Runtime.Remoting.Contexts/IContributeEnvoySink.xml b/xml/System.Runtime.Remoting.Contexts/IContributeEnvoySink.xml index d1a80ee3b0d..ba9f790bea6 100644 --- a/xml/System.Runtime.Remoting.Contexts/IContributeEnvoySink.xml +++ b/xml/System.Runtime.Remoting.Contexts/IContributeEnvoySink.xml @@ -22,11 +22,11 @@ Contributes an envoy message sink on the client end. - interface is implemented by context properties in the server class that want to contribute an envoy message sink on the client end. The server envoy chain is composed from those context properties that implement . The envoy chain resides on the client end and acts as a representative of the corresponding message sinks from the server context properties. - + interface is implemented by context properties in the server class that want to contribute an envoy message sink on the client end. The server envoy chain is composed from those context properties that implement . The envoy chain resides on the client end and acts as a representative of the corresponding message sinks from the server context properties. + ]]> @@ -66,11 +66,11 @@ Takes the first sink in the chain of sinks composed so far, and then chains its message sink in front of the chain already formed. The composite sink chain. - method is used as an optimization to create an envoy sink when the destination is a different context in the same application domain and is used by the Wrap operation. - + method is used as an optimization to create an envoy sink when the destination is a different context in the same application domain and is used by the Wrap operation. + ]]> diff --git a/xml/System.Runtime.Remoting.Contexts/IContributeServerContextSink.xml b/xml/System.Runtime.Remoting.Contexts/IContributeServerContextSink.xml index e7dc1781081..dda035c80f2 100644 --- a/xml/System.Runtime.Remoting.Contexts/IContributeServerContextSink.xml +++ b/xml/System.Runtime.Remoting.Contexts/IContributeServerContextSink.xml @@ -22,15 +22,15 @@ Contributes an interception sink at the context boundary on the server end of a remoting call. - interface is implemented by context properties in a class that want to contribute an interception sink at the context boundary on the server end of a remoting call. - - The server context chain is composed from those properties in the server context that implement and which contribute a sink by using the method call. - - Serialization is an example of such a context property. In this case, the message sink would involve taking a synchronization primitive lock before processing a call any further. - + interface is implemented by context properties in a class that want to contribute an interception sink at the context boundary on the server end of a remoting call. + + The server context chain is composed from those properties in the server context that implement and which contribute a sink by using the method call. + + Serialization is an example of such a context property. In this case, the message sink would involve taking a synchronization primitive lock before processing a call any further. + ]]> diff --git a/xml/System.Runtime.Remoting.Contexts/IDynamicMessageSink.xml b/xml/System.Runtime.Remoting.Contexts/IDynamicMessageSink.xml index 8795b436baf..a1b5c5b7a07 100644 --- a/xml/System.Runtime.Remoting.Contexts/IDynamicMessageSink.xml +++ b/xml/System.Runtime.Remoting.Contexts/IDynamicMessageSink.xml @@ -22,11 +22,11 @@ Indicates that the implementing message sink will be provided by dynamically registered properties. - @@ -66,11 +66,11 @@ A value of if this is an asynchronic call and if it is a synchronic call. Indicates that a call is returning. - method. - + method. + ]]> @@ -110,11 +110,11 @@ A value of if this is an asynchronic call and if it is a synchronic call. Indicates that a call is starting. - method. - + method. + ]]> diff --git a/xml/System.Runtime.Remoting.Contexts/SynchronizationAttribute.xml b/xml/System.Runtime.Remoting.Contexts/SynchronizationAttribute.xml index 40263d45350..a0bf711ba96 100644 --- a/xml/System.Runtime.Remoting.Contexts/SynchronizationAttribute.xml +++ b/xml/System.Runtime.Remoting.Contexts/SynchronizationAttribute.xml @@ -44,26 +44,26 @@ Enforces a synchronization domain for the current context and all contexts that share the same instance. - [!NOTE] -> There are two classes named `SynchronizationAttribute` : one in the namespace, and the other in the namespace. The class supports only synchronous calls, and can be used only with serviced components. The supports both synchronous and asynchronous calls, and can be used only with context bound objects. (For more information on context bound objects, see the class.) - +> There are two classes named `SynchronizationAttribute` : one in the namespace, and the other in the namespace. The class supports only synchronous calls, and can be used only with serviced components. The supports both synchronous and asynchronous calls, and can be used only with context bound objects. (For more information on context bound objects, see the class.) + > [!NOTE] -> This class makes 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://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/x4yx82e6(v=vs.100)). - - - -## Examples - The following code example demonstrates the use of the . For the complete example code, see the example for the class. - +> This class makes 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://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/x4yx82e6(v=vs.100)). + + + +## Examples + The following code example demonstrates the use of the . For the complete example code, see the example for the class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/AsyncResult.NewExamples/CPP/ad.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/RemotingServices/IsTransparentProxy/ad.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting/RemotingServices/IsTransparentProxy/ad.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting/RemotingServices/IsTransparentProxy/ad.vb" id="Snippet2"::: + ]]> @@ -118,11 +118,11 @@ A Boolean value indicating whether reentry is required. Initializes a new instance of the class with a Boolean value indicating whether reentry is required. - to which the current attribute is applied must be intercepted and serialized. - + to which the current attribute is applied must be intercepted and serialized. + ]]> @@ -148,11 +148,11 @@ An integer value indicating the behavior of the object to which this attribute is applied. Initializes a new instance of the class with a flag indicating the behavior of the object to which this attribute is applied. - , , , or . - + , , , or . + ]]> The parameter was not one of the defined flags. @@ -182,11 +182,11 @@ if reentry is required, and callouts must be intercepted and serialized; otherwise, . Initializes a new instance of the class with a flag indicating the behavior of the object to which this attribute is applied, and a Boolean value indicating whether reentry is required. - , , , or . - + , , , or . + ]]> The parameter was not one of the defined flags. @@ -226,11 +226,11 @@ Creates a CallOut sink and chains it in front of the provided chain of sinks at the context boundary on the client end of a remoting call. The composite sink chain with the new CallOut sink. - . - + . + ]]> @@ -305,11 +305,11 @@ Creates a synchronized dispatch sink and chains it in front of the provided chain of sinks at the context boundary on the server end of a remoting call. The composite sink chain with the new synchronized dispatch sink. - . - + . + ]]> @@ -376,11 +376,11 @@ Gets or sets a Boolean value indicating whether reentry is required. A Boolean value indicating whether reentry is required. - to which the current attribute is applied must be intercepted and serialized. - + to which the current attribute is applied must be intercepted and serialized. + ]]> @@ -406,11 +406,11 @@ Gets or sets a Boolean value indicating whether the implementing this instance of is locked. A Boolean value indicating whether the implementing this instance of is locked. - is locked, only the thread currently executing in it has access to objects in the . - + is locked, only the thread currently executing in it has access to objects in the . + ]]> diff --git a/xml/System.Runtime.Remoting.Lifetime/ClientSponsor.xml b/xml/System.Runtime.Remoting.Lifetime/ClientSponsor.xml index d592265e320..956d268aa14 100644 --- a/xml/System.Runtime.Remoting.Lifetime/ClientSponsor.xml +++ b/xml/System.Runtime.Remoting.Lifetime/ClientSponsor.xml @@ -211,7 +211,7 @@ . + For more information, see . @@ -305,7 +305,7 @@ method is called by the distributed garbage collector to renew the lease for the specified object. + The method is called by the distributed garbage collector to renew the lease for the specified object. diff --git a/xml/System.Runtime.Remoting.Lifetime/ILease.xml b/xml/System.Runtime.Remoting.Lifetime/ILease.xml index 712f9c7d704..6265a281a5e 100644 --- a/xml/System.Runtime.Remoting.Lifetime/ILease.xml +++ b/xml/System.Runtime.Remoting.Lifetime/ILease.xml @@ -260,7 +260,7 @@ or the current time plus the renewal time. + The lease time is set to the maximum of the or the current time plus the renewal time. ]]> @@ -301,7 +301,7 @@ to the only if the has dropped below the . Sequential calls therefore do not increase the without bound. Instead, immediately after any call, the is guaranteed to be the or longer. + When you make a call to a remote object, the lifetime service adds the to the only if the has dropped below the . Sequential calls therefore do not increase the without bound. Instead, immediately after any call, the is guaranteed to be the or longer. ]]> @@ -342,7 +342,7 @@ is , then this lease will not take sponsors. + If the is , then this lease will not take sponsors. If a sponsor does not respond to a call to renew a lease within the time-out period, it is assumed to be dead and is removed from the list of sponsors for the current lease. diff --git a/xml/System.Runtime.Remoting.Lifetime/ISponsor.xml b/xml/System.Runtime.Remoting.Lifetime/ISponsor.xml index 1fbc92399ab..89e8acc4d7e 100644 --- a/xml/System.Runtime.Remoting.Lifetime/ISponsor.xml +++ b/xml/System.Runtime.Remoting.Lifetime/ISponsor.xml @@ -22,18 +22,18 @@ Indicates that the implementer wants to be a lifetime lease sponsor. - interface if it needs to request a lease renewal for a particular object. An object that implements the interface can become a sponsor by registering itself with the lease manager. The interface is used by the lifetime service to call back to the sponsor. - - - -## Examples + interface if it needs to request a lease renewal for a particular object. An object that implements the interface can become a sponsor by registering itself with the lease manager. The interface is used by the lifetime service to call back to the sponsor. + + + +## Examples :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/ISponsor_Client/CPP/isponsor_client.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Lifetime/ISponsor/Overview/isponsor_client.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Lifetime/ISponsor/Overview/isponsor_client.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Lifetime/ISponsor/Overview/isponsor_client.vb" id="Snippet2"::: + ]]> @@ -69,18 +69,18 @@ Requests a sponsoring client to renew the lease for the specified object. The additional lease time for the specified object. - method is called by the distributed garbage collector to renew the lease for the specified object. - - - -## Examples + method is called by the distributed garbage collector to renew the lease for the specified object. + + + +## Examples :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/ISponsor_Client/CPP/isponsor_client.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Lifetime/ISponsor/Overview/isponsor_client.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Lifetime/ISponsor/Overview/isponsor_client.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Lifetime/ISponsor/Overview/isponsor_client.vb" id="Snippet2"::: + ]]> The immediate caller makes the call through a reference to the interface and does not have infrastructure permission. diff --git a/xml/System.Runtime.Remoting.Lifetime/LifetimeServices.xml b/xml/System.Runtime.Remoting.Lifetime/LifetimeServices.xml index 376af455f4a..150592a42ea 100644 --- a/xml/System.Runtime.Remoting.Lifetime/LifetimeServices.xml +++ b/xml/System.Runtime.Remoting.Lifetime/LifetimeServices.xml @@ -105,7 +105,7 @@ is set to 100 seconds, the lease list is inspected for cleanups and renewals every 100 seconds. + The current property defines the frequency at which the lease manager becomes active to clean up expired leases. For example, if is set to 100 seconds, the lease list is inspected for cleanups and renewals every 100 seconds. The default value of the property is 10 seconds. diff --git a/xml/System.Runtime.Remoting.Messaging/AsyncResult.xml b/xml/System.Runtime.Remoting.Messaging/AsyncResult.xml index 3bbd675a9f8..96e90f8d8b5 100644 --- a/xml/System.Runtime.Remoting.Messaging/AsyncResult.xml +++ b/xml/System.Runtime.Remoting.Messaging/AsyncResult.xml @@ -42,7 +42,7 @@ ## Examples - The following example demonstrates how to use the property to get a , and how to wait for an asynchronous call on a delegate. The is signaled when the asynchronous call completes, and you can wait for it by calling the method. + The following example demonstrates how to use the property to get a , and how to wait for an asynchronous call on a delegate. The is signaled when the asynchronous call completes, and you can wait for it by calling the method. The example consists of two classes, the class that contains the method that's called asynchronously, and the class that contains the `Main` method that makes the call. @@ -147,7 +147,7 @@ method of the interface is not relevant to the class. Implementation by throws a . Instead, obtain an by casting the interface returned by an asynchronous call made using a delegate. + The method of the interface is not relevant to the class. Implementation by throws a . Instead, obtain an by casting the interface returned by an asynchronous call made using a delegate. ]]> @@ -231,15 +231,15 @@ ## Remarks The returned by this method is automatically signaled when the asynchronous operation has completed. - The wait handle is not closed automatically when you call `EndInvoke` on the delegate that was used to make the asynchronous method call. If you release all references to the wait handle, system resources are freed when garbage collection reclaims the wait handle. To free the system resources as soon as you are finished using the wait handle, call the method. Garbage collection works more efficiently when disposable objects are explicitly closed or disposed. + The wait handle is not closed automatically when you call `EndInvoke` on the delegate that was used to make the asynchronous method call. If you release all references to the wait handle, system resources are freed when garbage collection reclaims the wait handle. To free the system resources as soon as you are finished using the wait handle, call the method. Garbage collection works more efficiently when disposable objects are explicitly closed or disposed. > [!CAUTION] -> The contained in the property can be used to block the current thread until the asynchronous call is complete. However the will ignore the , if one was specified during the `BeginInvoke` call. Therefore, a situation can occur where the application shuts down before the has finished executing, even if a is used to block until the asynchronous call completion. For an example of such a situation, see the example for the class, and remove the statement. +> The contained in the property can be used to block the current thread until the asynchronous call is complete. However the will ignore the , if one was specified during the `BeginInvoke` call. Therefore, a situation can occur where the application shuts down before the has finished executing, even if a is used to block until the asynchronous call completion. For an example of such a situation, see the example for the class, and remove the statement. ## Examples - The following example demonstrates how to use the property to get a , and how to wait for an asynchronous call on a delegate. The is signaled when the asynchronous call completes, and you can wait for it by calling the method. + The following example demonstrates how to use the property to get a , and how to wait for an asynchronous call on a delegate. The is signaled when the asynchronous call completes, and you can wait for it by calling the method. The example consists of two classes, the class that contains the method that's called asynchronously, and the class that contains the `Main` method that makes the call. @@ -287,7 +287,7 @@ ## Remarks If it is detected that the `BeginInvoke` call completed synchronously in the delegate, it is probable that the thread that called BeginInvoke is the current thread. Most providers of the interface will not use the capability and will return a default `false`. - Current implementation of always returns `false`. + Current implementation of always returns `false`. ]]> @@ -342,7 +342,7 @@ method can return an object after the method is called. The return value can be cast to an . + The method can return an object after the method is called. The return value can be cast to an . However, you do not need to call either of these methods directly. They are intended for use by the remoting infrastructure of the .NET Framework. @@ -433,7 +433,7 @@ returns `null`. + The current implementation of returns `null`. ]]> @@ -466,7 +466,7 @@ method. + You do not need to call the method. ]]> @@ -509,11 +509,11 @@ method implements the interface. You do not need to call this method directly. It is intended for use by the remoting infrastructure of the .NET Framework. + The method implements the interface. You do not need to call this method directly. It is intended for use by the remoting infrastructure of the .NET Framework. - invokes the consumer code's delegate. It also sets the instance returned by the method. If the `msg` parameter is of type , the same object is returned by . Otherwise, a reply message that contains a remoting exception is returned. + invokes the consumer code's delegate. It also sets the instance returned by the method. If the `msg` parameter is of type , the same object is returned by . Otherwise, a reply message that contains a remoting exception is returned. - also modifies the value returned by the property. + also modifies the value returned by the property. ]]> diff --git a/xml/System.Runtime.Remoting.Messaging/CallContext.xml b/xml/System.Runtime.Remoting.Messaging/CallContext.xml index fbbfd9bae99..f61587bc5b1 100644 --- a/xml/System.Runtime.Remoting.Messaging/CallContext.xml +++ b/xml/System.Runtime.Remoting.Messaging/CallContext.xml @@ -49,7 +49,7 @@ ## Examples - The following code example demonstrates the use of the class to transmit [Principal and Identity Objects](/dotnet/standard/security/principal-and-identity-objects) to a remote location for identification. To view the code for the `LogicalCallContextData` class used in this sample, see the example for the interface. To view the code for the `HelloServiceClass` class used in this sample, see the example for the method. To view the code for the server class used in this sample, see the example for the class. + The following code example demonstrates the use of the class to transmit [Principal and Identity Objects](/dotnet/standard/security/principal-and-identity-objects) to a remote location for identification. To view the code for the `LogicalCallContextData` class used in this sample, see the example for the interface. To view the code for the `HelloServiceClass` class used in this sample, see the example for the method. To view the code for the server class used in this sample, see the example for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/CallContext/CPP/client.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Messaging/CallContext/Overview/client.cs" id="Snippet1"::: @@ -138,7 +138,7 @@ method to transmit [Principal and Identity Objects](/dotnet/standard/security/principal-and-identity-objects) to a remote location for identification. To view the code for the `LogicalCallContextData` class used in this sample, see the example for the interface. To view the code for the client class used in the sample, see the example for the class. To view the code for the server class used in this sample, see the example for the class. + The following code example demonstrates the use of the method to transmit [Principal and Identity Objects](/dotnet/standard/security/principal-and-identity-objects) to a remote location for identification. To view the code for the `LogicalCallContextData` class used in this sample, see the example for the interface. To view the code for the client class used in the sample, see the example for the class. To view the code for the server class used in this sample, see the example for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/CallContext/CPP/service.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Messaging/CallContext/Overview/service.cs" id="Snippet3"::: @@ -326,7 +326,7 @@ method to transmit [Principal and Identity Objects](/dotnet/standard/security/principal-and-identity-objects) to a remote location for identification. To view the code for the `LogicalCallContextData` class used in this sample, see the example for the interface. To view the code for the `HelloServiceClass` class used in this sample, see the example for the method. To view the code for the server class used in this sample, see the example for the class. + The following code example demonstrates the use of the method to transmit [Principal and Identity Objects](/dotnet/standard/security/principal-and-identity-objects) to a remote location for identification. To view the code for the `LogicalCallContextData` class used in this sample, see the example for the interface. To view the code for the `HelloServiceClass` class used in this sample, see the example for the method. To view the code for the server class used in this sample, see the example for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/CallContext/CPP/client.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Messaging/CallContext/Overview/client.cs" id="Snippet1"::: diff --git a/xml/System.Runtime.Remoting.Messaging/ILogicalThreadAffinative.xml b/xml/System.Runtime.Remoting.Messaging/ILogicalThreadAffinative.xml index 5d941141a0c..72a84855370 100644 --- a/xml/System.Runtime.Remoting.Messaging/ILogicalThreadAffinative.xml +++ b/xml/System.Runtime.Remoting.Messaging/ILogicalThreadAffinative.xml @@ -22,20 +22,20 @@ Marks an object that can propagate outside of an in a . - , the current class generates a that travels along with the call to the remote location. Only objects that expose the interface and are stored in the are propagated outside the . Objects that do not support this interface are not transmitted in instances with remote method calls. - - - -## Examples - The following code example demonstrates the use of the interface to transmit [Principal and Identity Objects](/dotnet/standard/security/principal-and-identity-objects) to a remote location for identification. To view the code for the `HelloServiceClass` class used in the sample, see the example for the method. To view the code for the server class used in this sample, see example for the class. To view the code for the client class used in the sample, see the example for the class. - + , the current class generates a that travels along with the call to the remote location. Only objects that expose the interface and are stored in the are propagated outside the . Objects that do not support this interface are not transmitted in instances with remote method calls. + + + +## Examples + The following code example demonstrates the use of the interface to transmit [Principal and Identity Objects](/dotnet/standard/security/principal-and-identity-objects) to a remote location for identification. To view the code for the `HelloServiceClass` class used in the sample, see the example for the method. To view the code for the server class used in this sample, see example for the class. To view the code for the client class used in the sample, see the example for the class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/CallContext/CPP/service.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Messaging/CallContext/Overview/service.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Messaging/CallContext/Overview/service.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Messaging/CallContext/Overview/service.vb" id="Snippet2"::: + ]]> diff --git a/xml/System.Runtime.Remoting.Messaging/IMessageSink.xml b/xml/System.Runtime.Remoting.Messaging/IMessageSink.xml index 60e1386fb73..7aac6e844b0 100644 --- a/xml/System.Runtime.Remoting.Messaging/IMessageSink.xml +++ b/xml/System.Runtime.Remoting.Messaging/IMessageSink.xml @@ -22,26 +22,26 @@ Defines the interface for a message sink. - , process, or computer. Two or more message sinks in the chain can interact with each other in regard to each specific action. - - - -## Examples - The following code example shows the implementation of the interface. Note that the sample assumes type definitions and assembly references that must be provided for the sample to compile. - + , process, or computer. Two or more message sinks in the chain can interact with each other in regard to each specific action. + + + +## Examples + The following code example shows the implementation of the interface. Note that the sample assumes type definitions and assembly references that must be provided for the sample to compile. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/IMessageSink_Client/CPP/imessagesink_client.cpp" id="Snippet3"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Messaging/IMessage/Properties/imessagesink_client.cs" id="Snippet3"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Messaging/IMessage/Properties/imessagesink_client.vb" id="Snippet3"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.Messaging/IMessage/Properties/imessagesink_client.vb" id="Snippet3"::: + ]]> @@ -82,11 +82,11 @@ Asynchronously processes the given message. An interface that provides a way to control asynchronous messages after they have been dispatched. - The immediate caller makes the call through a reference to the interface and does not have infrastructure permission. @@ -153,11 +153,11 @@ Synchronously processes the given message. A reply message in response to the request. - method is invoked on the message sink by the remoting infrastructure or by a previous sink for synchronous messages. - + method is invoked on the message sink by the remoting infrastructure or by a previous sink for synchronous messages. + ]]> The immediate caller makes the call through a reference to the interface and does not have infrastructure permission. diff --git a/xml/System.Runtime.Remoting.Messaging/IMethodCallMessage.xml b/xml/System.Runtime.Remoting.Messaging/IMethodCallMessage.xml index f56b2d874eb..3226ae95c16 100644 --- a/xml/System.Runtime.Remoting.Messaging/IMethodCallMessage.xml +++ b/xml/System.Runtime.Remoting.Messaging/IMethodCallMessage.xml @@ -184,7 +184,7 @@ property is redundant since the same functionality can be achieved with the and methods, there might be performance optimization available if the implementer understands when all the arguments will be retrieved. + Although the property is redundant since the same functionality can be achieved with the and methods, there might be performance optimization available if the implementer understands when all the arguments will be retrieved. diff --git a/xml/System.Runtime.Remoting.Messaging/IMethodMessage.xml b/xml/System.Runtime.Remoting.Messaging/IMethodMessage.xml index 537d5f16b9b..ef22e72da15 100644 --- a/xml/System.Runtime.Remoting.Messaging/IMethodMessage.xml +++ b/xml/System.Runtime.Remoting.Messaging/IMethodMessage.xml @@ -115,7 +115,7 @@ property is redundant since the same functionality can be achieved through the and , there might be performance optimization available if the implementer understands when all the arguments will be retrieved. + Although the property is redundant since the same functionality can be achieved through the and , there might be performance optimization available if the implementer understands when all the arguments will be retrieved. ]]> diff --git a/xml/System.Runtime.Remoting.Messaging/IMethodReturnMessage.xml b/xml/System.Runtime.Remoting.Messaging/IMethodReturnMessage.xml index 131e6049997..fe89fbdb113 100644 --- a/xml/System.Runtime.Remoting.Messaging/IMethodReturnMessage.xml +++ b/xml/System.Runtime.Remoting.Messaging/IMethodReturnMessage.xml @@ -227,10 +227,10 @@ property is redundant since the same functionality can be achieved through the field and method, there might be performance optimization available if the implementer understands when all the arguments will be retrieved. + Although the property is redundant since the same functionality can be achieved through the field and method, there might be performance optimization available if the implementer understands when all the arguments will be retrieved. > [!WARNING] -> If is not `null`, a exception is thrown when is accessed. +> If is not `null`, a exception is thrown when is accessed. diff --git a/xml/System.Runtime.Remoting.Messaging/LogicalCallContext.xml b/xml/System.Runtime.Remoting.Messaging/LogicalCallContext.xml index 8b5f6bf0306..f9fc4071b50 100644 --- a/xml/System.Runtime.Remoting.Messaging/LogicalCallContext.xml +++ b/xml/System.Runtime.Remoting.Messaging/LogicalCallContext.xml @@ -40,16 +40,16 @@ Provides a set of properties that are carried with the execution code path during remote method calls. - class is a version of the class that is used during method calls to remote application domains. The is a specialized collection object similar to a thread local storage for method calls, and provides data slots that are unique to each logical thread of execution. The slots are not shared across call contexts on other logical threads. Objects can be added to the as it travels down and up the execution code path, and examined by various objects along the path. - - When a remote method call is made to an object in another , the class generates a that travels along with the remote call. Only objects that expose the interface and are stored in the are propagated outside the in a . Objects that do not support this interface are not transmitted in instances with remote method calls. - + class is a version of the class that is used during method calls to remote application domains. The is a specialized collection object similar to a thread local storage for method calls, and provides data slots that are unique to each logical thread of execution. The slots are not shared across call contexts on other logical threads. Objects can be added to the as it travels down and up the execution code path, and examined by various objects along the path. + + When a remote method call is made to an object in another , the class generates a that travels along with the remote call. Only objects that expose the interface and are stored in the are propagated outside the in a . Objects that do not support this interface are not transmitted in instances with remote method calls. + > [!NOTE] -> This class makes a link demand. A SecurityException is thrown if the immediate caller does not have infrastructure permission. See [Link Demands](/dotnet/framework/misc/link-demands) for more information. - +> This class makes a link demand. A SecurityException is thrown if the immediate caller does not have infrastructure permission. See [Link Demands](/dotnet/framework/misc/link-demands) for more information. + ]]> @@ -85,11 +85,11 @@ Creates a new object that is a copy of the current instance. A new object that is a copy of this instance. - method produces a deep copy of the current . - + method produces a deep copy of the current . + ]]> @@ -194,13 +194,13 @@ The contextual information about the source or destination of the serialization. Populates a specified with the data needed to serialize the current . - with all the data needed to recreate the . - - The current method is an implementation of . - + with all the data needed to recreate the . + + The current method is an implementation of . + ]]> diff --git a/xml/System.Runtime.Remoting.Messaging/MethodCall.xml b/xml/System.Runtime.Remoting.Messaging/MethodCall.xml index 3273f107e3e..88e146e0882 100644 --- a/xml/System.Runtime.Remoting.Messaging/MethodCall.xml +++ b/xml/System.Runtime.Remoting.Messaging/MethodCall.xml @@ -473,7 +473,7 @@ method throws a . + The method throws a . ]]> @@ -919,7 +919,7 @@ property is set through the method. + The method belongs to a remote object. The value of the property is set through the method. ]]> diff --git a/xml/System.Runtime.Remoting.Messaging/MethodResponse.xml b/xml/System.Runtime.Remoting.Messaging/MethodResponse.xml index 8791d5145da..28230e9eb05 100644 --- a/xml/System.Runtime.Remoting.Messaging/MethodResponse.xml +++ b/xml/System.Runtime.Remoting.Messaging/MethodResponse.xml @@ -382,7 +382,7 @@ method throws a . + The method throws a . ]]> diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapAnyUri.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapAnyUri.xml index d1cde43b3ef..8b89fa56e94 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapAnyUri.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapAnyUri.xml @@ -151,7 +151,7 @@ For more information about XSD data types, see the [XML Data Types Reference](ht method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapAnyUri/CPP/demo.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapAnyUri/Overview/demo.cs" id="Snippet13"::: @@ -188,7 +188,7 @@ For more information about XSD data types, see the [XML Data Types Reference](ht method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapAnyUri/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapAnyUri/Overview/demo.cs" id="Snippet11"::: @@ -222,7 +222,7 @@ For more information about XSD data types, see the [XML Data Types Reference](ht method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapAnyUri/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapAnyUri/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapBase64Binary.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapBase64Binary.xml index 329598c6b7e..a57edd71d92 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapBase64Binary.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapBase64Binary.xml @@ -151,7 +151,7 @@ For more information about XSD data types, see the [XML Data Types Reference](ht method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapBase64Binary/CPP/demo.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapBase64Binary/Overview/demo.cs" id="Snippet13"::: @@ -188,7 +188,7 @@ For more information about XSD data types, see the [XML Data Types Reference](ht method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapBase64Binary/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapBase64Binary/Overview/demo.cs" id="Snippet11"::: @@ -229,7 +229,7 @@ For more information about XSD data types, see the [XML Data Types Reference](ht method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapBase64Binary/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapBase64Binary/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate.xml index efad46f8e57..98b1405a1b6 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate.xml @@ -33,20 +33,20 @@ Wraps an XSD type. - class to wrap an XML `date` type. - + + + +## Examples + The following code example demonstrates using the class to wrap an XML `date` type. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDate/CPP/demo.cpp" id="Snippet10"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet10"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet10"::: + ]]> @@ -78,14 +78,14 @@ For more information about XSD data types, see the [XML Data Types Reference](ht Initializes a new instance of the class. - @@ -111,14 +111,14 @@ For more information about XSD data types, see the [XML Data Types Reference](ht A object to initialize the current instance. Initializes a new instance of the class with a specified object. - @@ -146,19 +146,19 @@ For more information about XSD data types, see the [XML Data Types Reference](ht An integer that indicates whether is positive. Initializes a new instance of the class with a specified object and an integer that indicates whether is a positive or negative value. - @@ -188,14 +188,14 @@ For more information about XSD data types, see the [XML Data Types Reference](ht Returns the XML Schema definition language (XSD) of the current SOAP type. A that indicates the XSD of the current SOAP type. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDate/CPP/demo.cpp" id="Snippet13"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet13"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet13"::: + ]]> @@ -225,26 +225,26 @@ For more information about XSD data types, see the [XML Data Types Reference](ht Converts the specified into a object. A object that is obtained from . - method is capable of parsing strings in various formats. The recognizable string formats are composed out of the following format patterns. - -|Format Pattern|Description|Examples| -|--------------------|-----------------|--------------| -|yyyy|The year in 4-digit format.|1999, 1812| -|MM|The numeric month. Single-digit months have a leading zero.|11, 05| -|dd|The day of the month. Single-digit days have a leading zero.|23, 09| -|zzz|The full time zone offset (hour and minutes) from the Universal Time Coordinate (Greenwich Mean Time). Single-digit hours have a leading zero.|-07:00, 08:00| - - - -## Examples - The following code example shows how to use this method. This code example is part of a larger example that is provided for the class. - + method is capable of parsing strings in various formats. The recognizable string formats are composed out of the following format patterns. + +|Format Pattern|Description|Examples| +|--------------------|-----------------|--------------| +|yyyy|The year in 4-digit format.|1999, 1812| +|MM|The numeric month. Single-digit months have a leading zero.|11, 05| +|dd|The day of the month. Single-digit days have a leading zero.|23, 09| +|zzz|The full time zone offset (hour and minutes) from the Universal Time Coordinate (Greenwich Mean Time). Single-digit hours have a leading zero.|-07:00, 08:00| + + + +## Examples + The following code example shows how to use this method. This code example is part of a larger example that is provided for the class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDate/CPP/demo.cpp" id="Snippet11"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet11"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet11"::: + ]]> @@ -272,19 +272,19 @@ For more information about XSD data types, see the [XML Data Types Reference](ht Gets or sets whether the date and time of the current instance is positive or negative. An integer that indicates whether is positive or negative. - . - - - -## Examples - The following code example shows how to use this property. This code example is part of a larger example that is provided for the class. - + . + + + +## Examples + The following code example shows how to use this property. This code example is part of a larger example that is provided for the class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDate/CPP/demo.cpp" id="Snippet15"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet15"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet15"::: + ]]> @@ -311,14 +311,14 @@ For more information about XSD data types, see the [XML Data Types Reference](ht Returns as a . A that is obtained from in the format "yyyy-MM-dd" or "'-'yyyy-MM-dd" if is negative. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDate/CPP/demo.cpp" id="Snippet12"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet12"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet12"::: + ]]> @@ -344,14 +344,14 @@ For more information about XSD data types, see the [XML Data Types Reference](ht Gets or sets the date and time of the current instance. The object that contains the date and time of the current instance. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDate/CPP/demo.cpp" id="Snippet14"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet14"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet14"::: + ]]> @@ -377,14 +377,14 @@ For more information about XSD data types, see the [XML Data Types Reference](ht Gets the XML Schema definition language (XSD) of the current SOAP type. A that indicates the XSD of the current SOAP type. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDate/CPP/demo.cpp" id="Snippet16"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet16"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDate/Overview/demo.cs" id="Snippet16"::: + ]]> diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDay.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDay.xml index 4773962a1dd..47c469bb2ef 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDay.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDay.xml @@ -150,7 +150,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDay/CPP/demo.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDay/Overview/demo.cs" id="Snippet13"::: @@ -187,7 +187,7 @@ method is capable of parsing strings in various formats. The recognizable string formats are "---ddzzz" and "---dd", which are composed out of the following format patterns. + The method is capable of parsing strings in various formats. The recognizable string formats are "---ddzzz" and "---dd", which are composed out of the following format patterns. |Format Pattern|Description|Examples| |--------------------|-----------------|--------------| @@ -197,7 +197,7 @@ ## Examples - The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDay/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDay/Overview/demo.cs" id="Snippet11"::: @@ -233,7 +233,7 @@ method. This code example is part of a larger example provided for the class. + The following code example shows how to use the method. This code example is part of a larger example provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDay/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDay/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDuration.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDuration.xml index 4d7e368c4ac..010a057a12e 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDuration.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDuration.xml @@ -89,7 +89,7 @@ For more information about XSD data types, see the [XML Data Types Reference](ht method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDuration/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDuration/Overview/demo.cs" id="Snippet11"::: @@ -134,7 +134,7 @@ For more information about XSD data types, see the [XML Data Types Reference](ht method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapDuration/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapDuration/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapHexBinary.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapHexBinary.xml index dfdd807ac98..ee5490c6786 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapHexBinary.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapHexBinary.xml @@ -151,7 +151,7 @@ For more information about XSD data types, see the [XML Data Types Reference](ht method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapHexBinary/CPP/demo.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapHexBinary/Overview/demo.cs" id="Snippet13"::: @@ -188,7 +188,7 @@ For more information about XSD data types, see the [XML Data Types Reference](ht method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapHexBinary/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapHexBinary/Overview/demo.cs" id="Snippet11"::: @@ -222,7 +222,7 @@ For more information about XSD data types, see the [XML Data Types Reference](ht method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapHexBinary/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapHexBinary/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapInteger.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapInteger.xml index da969c5d60a..c30d459f04f 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapInteger.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapInteger.xml @@ -150,7 +150,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapInteger/CPP/demo.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapInteger/Overview/demo.cs" id="Snippet13"::: @@ -187,7 +187,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapInteger/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapInteger/Overview/demo.cs" id="Snippet11"::: @@ -221,7 +221,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapInteger/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapInteger/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonth.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonth.xml index 36e3dc6df81..d9ecc130902 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonth.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonth.xml @@ -150,7 +150,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapMonth/CPP/demo.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonth/Overview/demo.cs" id="Snippet13"::: @@ -187,7 +187,7 @@ method is capable of parsing strings in various formats. The recognizable string formats are composed out of the following format patterns. + The method is capable of parsing strings in various formats. The recognizable string formats are composed out of the following format patterns. |Format Pattern|Description|Examples| |--------------------|-----------------|--------------| @@ -197,7 +197,7 @@ ## Examples - The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapMonth/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonth/Overview/demo.cs" id="Snippet11"::: @@ -233,7 +233,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapMonth/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonth/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonthDay.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonthDay.xml index 4353265f553..8ed7e8a9007 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonthDay.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonthDay.xml @@ -150,7 +150,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapMonthDay/CPP/demo.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonthDay/Overview/demo.cs" id="Snippet13"::: @@ -187,7 +187,7 @@ method is capable of parsing strings in various formats. The recognizable string formats are composed out of the format patterns shown in the following table. + The method is capable of parsing strings in various formats. The recognizable string formats are composed out of the format patterns shown in the following table. |Format Pattern|Description|Examples| |--------------------|-----------------|--------------| @@ -198,7 +198,7 @@ ## Examples - The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapMonthDay/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonthDay/Overview/demo.cs" id="Snippet11"::: @@ -234,7 +234,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapMonthDay/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapMonthDay/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNegativeInteger.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNegativeInteger.xml index 3fc17227acd..17cea320c19 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNegativeInteger.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNegativeInteger.xml @@ -152,7 +152,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapNegativeInteger/CPP/demo.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNegativeInteger/Overview/demo.cs" id="Snippet13"::: @@ -189,7 +189,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapNegativeInteger/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNegativeInteger/Overview/demo.cs" id="Snippet11"::: @@ -223,7 +223,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapNegativeInteger/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNegativeInteger/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonNegativeInteger.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonNegativeInteger.xml index 67ccaaf38b2..1795b3ce23b 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonNegativeInteger.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonNegativeInteger.xml @@ -152,7 +152,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapNonNegativeInteger/CPP/demo.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonNegativeInteger/Overview/demo.cs" id="Snippet13"::: @@ -189,7 +189,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapNonNegativeInteger/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonNegativeInteger/Overview/demo.cs" id="Snippet11"::: @@ -223,7 +223,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapNonNegativeInteger/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonNegativeInteger/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonPositiveInteger.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonPositiveInteger.xml index 59935156678..56a8afbc1c9 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonPositiveInteger.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonPositiveInteger.xml @@ -152,7 +152,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapNonPositiveInteger/CPP/demo.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonPositiveInteger/Overview/demo.cs" id="Snippet13"::: @@ -189,7 +189,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapNonPositiveInteger/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonPositiveInteger/Overview/demo.cs" id="Snippet11"::: @@ -223,7 +223,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapNonPositiveInteger/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapNonPositiveInteger/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapPositiveInteger.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapPositiveInteger.xml index a9c706bb264..9babf1826ed 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapPositiveInteger.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapPositiveInteger.xml @@ -152,7 +152,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapPositiveInteger/CPP/demo.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapPositiveInteger/Overview/demo.cs" id="Snippet13"::: @@ -189,7 +189,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapPositiveInteger/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapPositiveInteger/Overview/demo.cs" id="Snippet11"::: @@ -223,7 +223,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapPositiveInteger/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapPositiveInteger/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapQName.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapQName.xml index 5e5f0aa1a06..0d1c6dcce82 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapQName.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapQName.xml @@ -222,7 +222,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapQName/CPP/demo.cpp" id="Snippet13"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapQName/Overview/demo.cs" id="Snippet13"::: @@ -358,7 +358,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapQName/CPP/demo.cpp" id="Snippet11"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapQName/Overview/demo.cs" id="Snippet11"::: @@ -392,7 +392,7 @@ method. This code example is part of a larger example that is provided for the class. + The following code example shows how to use the method. This code example is part of a larger example that is provided for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapQName/CPP/demo.cpp" id="Snippet12"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapQName/Overview/demo.cs" id="Snippet12"::: diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime.xml index e26d34e6a1d..01176c1eea4 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime.xml @@ -33,19 +33,19 @@ Wraps an XSD type. - class to wrap an XSD `time` type. - + + + +## Examples + The following code example demonstrates using the class to wrap an XSD `time` type. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapTime/CPP/demo.cpp" id="Snippet10"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime/Overview/demo.cs" id="Snippet10"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime/Overview/demo.cs" id="Snippet10"::: + ]]> @@ -77,14 +77,14 @@ Initializes a new instance of the class. - @@ -110,14 +110,14 @@ A object to initialize the current instance. Initializes a new instance of the class with a specified object. - @@ -147,14 +147,14 @@ Returns the XML Schema definition language (XSD) of the current SOAP type. A that indicates the XSD of the current SOAP type. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapTime/CPP/demo.cpp" id="Snippet13"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime/Overview/demo.cs" id="Snippet13"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime/Overview/demo.cs" id="Snippet13"::: + ]]> @@ -184,29 +184,29 @@ Converts the specified into a object. A object that is obtained from . - method is capable of parsing strings in the HH:mm:ss.fffzzz format. This is composed out of the following format patterns. - -|Format Pattern|Description|Examples| -|--------------------|-----------------|--------------| -|HH|The hour within a 24-hour range. Single-digit hours have a leading zero.|17, 07| -|mm|The minute. Single-digit minutes have a leading zero.|49, 05| -|ss|The second. Single-digit seconds have a leading zero.|32, 02| -|fff|The fraction of a second. A maximum of 7 fraction digits are allowed, and only the first three are parsed.|321635, 4592| -|zzz|The full time zone offset (hour and minutes) from the Universal Time Coordinate (Greenwich Mean Time). Single-digit hours have a leading zero.|-07:00, +08:00, Z| - - Only the first 3 fraction digits are parsed because the parsed value is stored as a object, and the type supports precisely 3 fraction digits of accuracy. - - - -## Examples - The following code example shows how to use this method. This code example is part of a larger example that is provided for the class. - + method is capable of parsing strings in the HH:mm:ss.fffzzz format. This is composed out of the following format patterns. + +|Format Pattern|Description|Examples| +|--------------------|-----------------|--------------| +|HH|The hour within a 24-hour range. Single-digit hours have a leading zero.|17, 07| +|mm|The minute. Single-digit minutes have a leading zero.|49, 05| +|ss|The second. Single-digit seconds have a leading zero.|32, 02| +|fff|The fraction of a second. A maximum of 7 fraction digits are allowed, and only the first three are parsed.|321635, 4592| +|zzz|The full time zone offset (hour and minutes) from the Universal Time Coordinate (Greenwich Mean Time). Single-digit hours have a leading zero.|-07:00, +08:00, Z| + + Only the first 3 fraction digits are parsed because the parsed value is stored as a object, and the type supports precisely 3 fraction digits of accuracy. + + + +## Examples + The following code example shows how to use this method. This code example is part of a larger example that is provided for the class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapTime/CPP/demo.cpp" id="Snippet11"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime/Overview/demo.cs" id="Snippet11"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime/Overview/demo.cs" id="Snippet11"::: + ]]> @@ -235,14 +235,14 @@ Returns as a . A that is obtained from in the format "HH:mm:ss.fffzzz". - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapTime/CPP/demo.cpp" id="Snippet12"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime/Overview/demo.cs" id="Snippet12"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime/Overview/demo.cs" id="Snippet12"::: + ]]> @@ -268,14 +268,14 @@ Gets or sets the date and time of the current instance. The object that contains the date and time of the current instance. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapTime/CPP/demo.cpp" id="Snippet14"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime/Overview/demo.cs" id="Snippet14"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime/Overview/demo.cs" id="Snippet14"::: + ]]> @@ -301,14 +301,14 @@ Gets the XML Schema definition language (XSD) of the current SOAP type. A that indicates the XSD of the current SOAP type. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapTime/CPP/demo.cpp" id="Snippet16"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime/Overview/demo.cs" id="Snippet16"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapTime/Overview/demo.cs" id="Snippet16"::: + ]]> diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear.xml index a523a916798..e3d774c3545 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear.xml @@ -33,19 +33,19 @@ Wraps an XSD type. - class to wrap the XSD `gYear` type. - + + + +## Examples + The following code example demonstrates using the class to wrap the XSD `gYear` type. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYear/CPP/demo.cpp" id="Snippet10"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet10"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet10"::: + ]]> @@ -77,14 +77,14 @@ Initializes a new instance of the class. - @@ -110,14 +110,14 @@ A object to initialize the current instance. Initializes a new instance of the class with a specified object. - @@ -145,14 +145,14 @@ An integer that indicates whether is positive. Initializes a new instance of the class with a specified object and an integer that indicates whether is a positive or negative value. - @@ -182,14 +182,14 @@ Returns the XML Schema definition language (XSD) of the current SOAP type. A that indicates the XSD of the current SOAP type. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYear/CPP/demo.cpp" id="Snippet13"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet13"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet13"::: + ]]> @@ -219,24 +219,24 @@ Converts the specified into a object. A object that is obtained from . - method is capable of parsing strings in various formats. The recognizable string formats are composed out of the following format patterns. - -|Format Pattern|Description|Examples| -|--------------------|-----------------|--------------| -|yyyy|The year in 4-digit format.|1999, 1812| -|zzz|The full time zone offset (hour and minutes) from the Universal Time Coordinate (Greenwich Mean Time). Single-digit hours have a leading zero.|-07:00, 08:00| - - - -## Examples - The following code example shows how to use this method. This code example is part of a larger example that is provided for the class. - + method is capable of parsing strings in various formats. The recognizable string formats are composed out of the following format patterns. + +|Format Pattern|Description|Examples| +|--------------------|-----------------|--------------| +|yyyy|The year in 4-digit format.|1999, 1812| +|zzz|The full time zone offset (hour and minutes) from the Universal Time Coordinate (Greenwich Mean Time). Single-digit hours have a leading zero.|-07:00, 08:00| + + + +## Examples + The following code example shows how to use this method. This code example is part of a larger example that is provided for the class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYear/CPP/demo.cpp" id="Snippet11"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet11"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet11"::: + ]]> @@ -264,14 +264,14 @@ Gets or sets whether the date and time of the current instance is positive or negative. An integer that indicates whether is positive or negative. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYear/CPP/demo.cpp" id="Snippet15"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet15"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet15"::: + ]]> @@ -298,14 +298,14 @@ Returns as a . A that is obtained from in the format "yyyy" or "-yyyy" if is negative. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYear/CPP/demo.cpp" id="Snippet12"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet12"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet12"::: + ]]> @@ -331,14 +331,14 @@ Gets or sets the date and time of the current instance. The object that contains the date and time of the current instance. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYear/CPP/demo.cpp" id="Snippet14"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet14"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet14"::: + ]]> @@ -364,14 +364,14 @@ Gets the XML Schema definition language (XSD) of the current SOAP type. A that indicates the XSD of the current SOAP type. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYear/CPP/demo.cpp" id="Snippet16"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet16"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYear/Overview/demo.cs" id="Snippet16"::: + ]]> diff --git a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth.xml b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth.xml index a48f589ebc9..9dd131d9a38 100644 --- a/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth.xml +++ b/xml/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth.xml @@ -33,19 +33,19 @@ Wraps an XSD type. - class to wrap the XSD `gYearMonth` type. - + + + +## Examples + The following code example demonstrates using the class to wrap the XSD `gYearMonth` type. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYearMonth/CPP/demo.cpp" id="Snippet10"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet10"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet10"::: + ]]> @@ -77,14 +77,14 @@ Initializes a new instance of the class. - @@ -110,14 +110,14 @@ A object to initialize the current instance. Initializes a new instance of the class with a specified object. - @@ -145,19 +145,19 @@ An integer that indicates whether is positive. Initializes a new instance of the class with a specified object and an integer that indicates whether is a positive or negative value. - @@ -187,14 +187,14 @@ Returns the XML Schema definition language (XSD) of the current SOAP type. A that indicates the XSD of the current SOAP type. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYearMonth/CPP/demo.cpp" id="Snippet13"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet13"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet13"::: + ]]> @@ -224,25 +224,25 @@ Converts the specified into a object. A object that is obtained from . - method is capable of parsing strings in various formats. The recognizable string formats are composed out of the following format patterns. - -|Format Pattern|Description|Examples| -|--------------------|-----------------|--------------| -|yyyy|The year in 4-digit format.|1999, 1812| -|MM|The numeric month. Single-digit months have a leading zero.|11, 05| -|zzz|The full time zone offset (hour and minutes) from the Universal Time Coordinate (Greenwich Mean Time). Single-digit hours have a leading zero.|-07:00, 08:00| - - - -## Examples - The following code example shows how to use this method. This code example is part of a larger example that is provided for the class. - + method is capable of parsing strings in various formats. The recognizable string formats are composed out of the following format patterns. + +|Format Pattern|Description|Examples| +|--------------------|-----------------|--------------| +|yyyy|The year in 4-digit format.|1999, 1812| +|MM|The numeric month. Single-digit months have a leading zero.|11, 05| +|zzz|The full time zone offset (hour and minutes) from the Universal Time Coordinate (Greenwich Mean Time). Single-digit hours have a leading zero.|-07:00, 08:00| + + + +## Examples + The following code example shows how to use this method. This code example is part of a larger example that is provided for the class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYearMonth/CPP/demo.cpp" id="Snippet11"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet11"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet11"::: + ]]> @@ -270,19 +270,19 @@ Gets or sets whether the date and time of the current instance is positive or negative. An integer that indicates whether is positive or negative. - . - - - -## Examples - The following code example shows how to use this property. This code example is part of a larger example that is provided for the class. - + . + + + +## Examples + The following code example shows how to use this property. This code example is part of a larger example that is provided for the class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYearMonth/CPP/demo.cpp" id="Snippet15"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet15"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet15"::: + ]]> @@ -309,14 +309,14 @@ Returns a as a . A that is obtained from in the format "yyyy-MM" or "'-'yyyy-MM" if is negative. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYearMonth/CPP/demo.cpp" id="Snippet12"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet12"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet12"::: + ]]> @@ -342,14 +342,14 @@ Gets or sets the date and time of the current instance. The object that contains the date and time of the current instance. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYearMonth/CPP/demo.cpp" id="Snippet14"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet14"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet14"::: + ]]> @@ -375,14 +375,14 @@ Gets the XML Schema definition language (XSD) of the current SOAP type. A that indicates the XSD of the current SOAP type. - class. - + class. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.Metadata.W3cXsd2001.SoapYearMonth/CPP/demo.cpp" id="Snippet16"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet16"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.Metadata.W3cXsd2001/SoapYearMonth/Overview/demo.cs" id="Snippet16"::: + ]]> diff --git a/xml/System.Runtime.Remoting.Metadata/SoapTypeAttribute.xml b/xml/System.Runtime.Remoting.Metadata/SoapTypeAttribute.xml index b0aa39ce631..2ea92187757 100644 --- a/xml/System.Runtime.Remoting.Metadata/SoapTypeAttribute.xml +++ b/xml/System.Runtime.Remoting.Metadata/SoapTypeAttribute.xml @@ -93,7 +93,7 @@ A value indicates the SOAP configuration options that will be used with a attribute. > [!NOTE] -> The enumeration has no effect on serialization of objects with the . +> The enumeration has no effect on serialization of objects with the . ]]> diff --git a/xml/System.Runtime.Remoting.MetadataServices/MetaData.xml b/xml/System.Runtime.Remoting.MetadataServices/MetaData.xml index 24ba3cdb460..3a4d6813956 100644 --- a/xml/System.Runtime.Remoting.MetadataServices/MetaData.xml +++ b/xml/System.Runtime.Remoting.MetadataServices/MetaData.xml @@ -18,11 +18,11 @@ Provides methods that allow you to work with XML schema. - class provides methods that allow you to generate Web Services Description Language (WSDL) from type information, convert an XML Schema into a code stream, and compile the code stream into an assembly. This functionality is also present in the [Soapsuds Tool (Soapsuds.exe)](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/xd176a6c(v=vs.100)). - + class provides methods that allow you to generate Web Services Description Language (WSDL) from type information, convert an XML Schema into a code stream, and compile the code stream into an assembly. This functionality is also present in the [Soapsuds Tool (Soapsuds.exe)](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/xd176a6c(v=vs.100)). + ]]> @@ -74,23 +74,23 @@ The strong name to compile into the new assembly. Can be . Compiles a specified code source file into a runtime assembly file. - [!NOTE] -> If a file with the specified name already exists, it is overwritten. - - - -## Examples - The following code example demonstrates the use of the method to write the schema definition of the specified types to a runtime assembly with the specified name. The `CsSource.cs` file converted here contains C# source code. - +> If a file with the specified name already exists, it is overwritten. + + + +## Examples + The following code example demonstrates the use of the method to write the schema definition of the specified types to a runtime assembly with the specified name. The `CsSource.cs` file converted here contains C# source code. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/MetaData.ConvertCodeSourceFileToAssemblyFile/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.MetadataServices/MetaData/ConvertCodeSourceFileToAssemblyFile/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.MetadataServices/MetaData/ConvertCodeSourceFileToAssemblyFile/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.MetadataServices/MetaData/ConvertCodeSourceFileToAssemblyFile/source.vb" id="Snippet1"::: + ]]> @@ -123,14 +123,14 @@ The strong name to compile into the new run-time assembly. Can be . Compiles specified code source streams into a run-time assembly file. - [!NOTE] -> If a file with the specified name already exists, it is overwritten. - +> If a file with the specified name already exists, it is overwritten. + ]]> @@ -174,13 +174,13 @@ The list of file names for the code streams that are generated. Note that the method can create multiple source code streams. Converts the specified schema definition into C# proxy source code. - [!NOTE] -> If files with the specified names already exist, they are overwritten. - +> If files with the specified names already exist, they are overwritten. + ]]> @@ -217,13 +217,13 @@ The URL where the target remote object that is represented by the new proxy will be located. Converts the specified schema definition into C# proxy source code for a remote object that is located at the specified URL. - [!NOTE] -> If files with the specified names already exist, they are overwritten. - +> If files with the specified names already exist, they are overwritten. + ]]> @@ -262,13 +262,13 @@ The namespace of the newly created proxy. Converts the specified schema definition into C# proxy source code for a remote object that is located at the specified URL and in the provided class namespace. - [!NOTE] -> If files with the specified names already exist, they are overwritten. - +> If files with the specified names already exist, they are overwritten. + ]]> @@ -310,14 +310,14 @@ The path of the XML file. Converts the specified service types to XML schema, and writes it to a file that is specified by name. - instance allows you to associate a URL with an object . - + instance allows you to associate a URL with an object . + > [!NOTE] -> If a file with the specified name already exists, it is overwritten. - +> If a file with the specified name already exists, it is overwritten. + ]]> @@ -350,22 +350,22 @@ The path of the XML file. Converts the specified object types to XML schema, and writes it to a file that is specified by name. - [!NOTE] -> If a file with the specified name already exists, it is overwritten. - - - -## Examples - The following code example demonstrates the use of the method to write the schema definition of the specified types to a file. - +> If a file with the specified name already exists, it is overwritten. + + + +## Examples + The following code example demonstrates the use of the method to write the schema definition of the specified types to a file. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/MetaData.ConvertTypesToSchemaToFile/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.MetadataServices/MetaData/ConvertTypesToSchemaToFile/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.MetadataServices/MetaData/ConvertTypesToSchemaToFile/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.MetadataServices/MetaData/ConvertTypesToSchemaToFile/source.vb" id="Snippet1"::: + ]]> @@ -407,11 +407,11 @@ The that the schema is written to. Converts the specified service types to XML schema, and writes it to a specified stream. - instance allows you to associate a URL with an object . - + instance allows you to associate a URL with an object . + ]]> @@ -444,15 +444,15 @@ The that the schema is written to. Converts the specified object types to XML schema, and writes it to a specified stream. - method to write the schema definition of the specified types to a stream. - + method to write the schema definition of the specified types to a stream. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/MetaData.ConvertTypesToSchemaToStream/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting.MetadataServices/MetaData/ConvertTypesToSchemaToStream/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.MetadataServices/MetaData/ConvertTypesToSchemaToStream/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting.MetadataServices/MetaData/ConvertTypesToSchemaToStream/source.vb" id="Snippet1"::: + ]]> @@ -483,13 +483,13 @@ The path of the file that the schema is written to. Downloads the XML schema from a URL, and writes it to the specified file. - [!NOTE] -> If a file with the specified name already exists, it is overwritten. - +> If a file with the specified name already exists, it is overwritten. + ]]> @@ -548,13 +548,13 @@ The file that the input stream is written to. Saves the input stream to a file with the specified name. - [!NOTE] -> If a file with the specified name already exists, it is overwritten. - +> If a file with the specified name already exists, it is overwritten. + ]]> diff --git a/xml/System.Runtime.Remoting.MetadataServices/SdlChannelSink.xml b/xml/System.Runtime.Remoting.MetadataServices/SdlChannelSink.xml index 45551c12865..f205a59e289 100644 --- a/xml/System.Runtime.Remoting.MetadataServices/SdlChannelSink.xml +++ b/xml/System.Runtime.Remoting.MetadataServices/SdlChannelSink.xml @@ -217,9 +217,9 @@ interface, is passed from the client end to the server end by invoking on message sink objects. Message sinks are chained together, which means that every message sink is responsible for calling on the next message sink after it has performed its work. For instance, a synchronization-related message sink might cause a lock to be acquired or released and delegated to the downstream message sink. + The proxy's job is to convert a method call that is invoked on it into a message object. The Message object, which implements the interface, is passed from the client end to the server end by invoking on message sink objects. Message sinks are chained together, which means that every message sink is responsible for calling on the next message sink after it has performed its work. For instance, a synchronization-related message sink might cause a lock to be acquired or released and delegated to the downstream message sink. - When the formatter channel sink gets a message that needs to be sent over the channel, it calls , passing the message as a parameter. The formatter sink then creates the transport header array and calls on the formatter sink. This call is forwarded down the sink chain, and any sink can create a request stream that is passed back to the formatter sink. After this call returns, the message is serialized, is called on the first chain in the sink chain, and the message is passed to the channel sinks. + When the formatter channel sink gets a message that needs to be sent over the channel, it calls , passing the message as a parameter. The formatter sink then creates the transport header array and calls on the formatter sink. This call is forwarded down the sink chain, and any sink can create a request stream that is passed back to the formatter sink. After this call returns, the message is serialized, is called on the first chain in the sink chain, and the message is passed to the channel sinks. After the channel sinks get the message, they can write data to the stream, add headers to the header array, and add themselves to the sink stack before forwarding the call to the next sink. When the call reaches the transport sink at the end of the chain, the transport sink sends the headers and serialized message over the channel to the server, where the process is reversed. diff --git a/xml/System.Runtime.Remoting.Proxies/RealProxy.xml b/xml/System.Runtime.Remoting.Proxies/RealProxy.xml index f0118cbbeae..6ed99b591d2 100644 --- a/xml/System.Runtime.Remoting.Proxies/RealProxy.xml +++ b/xml/System.Runtime.Remoting.Proxies/RealProxy.xml @@ -126,7 +126,7 @@ method. + The current method creates a transparent proxy, which can be accessed through the method. A client that uses an object across any kind of a remoting boundary is actually using a transparent proxy for the object. The transparent proxy gives the impression that the actual object resides in the client's space. It achieves this by forwarding calls made on it to the real object using the remoting infrastructure. @@ -329,7 +329,7 @@ method, then that instance is returned; otherwise, a new instance is returned. + If the proxy is requested for marshaling, then an `IUnknown` interface for the object represented by the current proxy instance is returned. If an `IUnknown` was previously cached by the method, then that instance is returned; otherwise, a new instance is returned. If the proxy is requested not for marshaling but for communication with unmanaged objects in the current process, then a [COM Callable Wrapper](/dotnet/framework/interop/com-callable-wrapper) (CCW), which can be used in the current process for communication through COM, is returned. @@ -540,7 +540,7 @@ method is used in scenarios involving an external in the same . + The method is used in scenarios involving an external in the same . ]]> @@ -585,7 +585,7 @@ method calls the parameterless constructor for the new instance of the remote object that is represented by the current . + If the `ctorMsg` parameter is `null`, then the method calls the parameterless constructor for the new instance of the remote object that is represented by the current . @@ -627,7 +627,7 @@ is called, it delegates the calls to the method. The method transforms the message in the `msg` parameter into a , and sends it to the remote object that is represented by the current instance of . + When the transparent proxy that is backed by the is called, it delegates the calls to the method. The method transforms the message in the `msg` parameter into a , and sends it to the remote object that is represented by the current instance of . The parameter provides a dictionary through the property. The dictionary contains name/value pairs of information about the method call, such as the name of the method called and its parameters. @@ -761,7 +761,7 @@ method allows the current proxy instance to implement additional COM interfaces on behalf of the server object that the current instance represents. The current method generates the requested interface and returns a pointer to it. The types of COM interfaces that can be generated by this method depend on the proxy type, which in turn might depend on the type of the server object that the current proxy instance represents. + The method allows the current proxy instance to implement additional COM interfaces on behalf of the server object that the current instance represents. The current method generates the requested interface and returns a pointer to it. The types of COM interfaces that can be generated by this method depend on the proxy type, which in turn might depend on the type of the server object that the current proxy instance represents. For more information, see . diff --git a/xml/System.Runtime.Remoting.Services/EnterpriseServicesHelper.xml b/xml/System.Runtime.Remoting.Services/EnterpriseServicesHelper.xml index 7fed8219cfd..883b742ce1f 100644 --- a/xml/System.Runtime.Remoting.Services/EnterpriseServicesHelper.xml +++ b/xml/System.Runtime.Remoting.Services/EnterpriseServicesHelper.xml @@ -172,7 +172,7 @@ method is similar to the method, but does not attempt to maintain the identity of the unmanaged object. For example, two calls with the same `IUnknown` to the current method return two different RCWs, but two calls to the method with the same `IUnknown` return the same RCW. + The method is similar to the method, but does not attempt to maintain the identity of the unmanaged object. For example, two calls with the same `IUnknown` to the current method return two different RCWs, but two calls to the method with the same `IUnknown` return the same RCW. ]]> diff --git a/xml/System.Runtime.Remoting/ActivatedClientTypeEntry.xml b/xml/System.Runtime.Remoting/ActivatedClientTypeEntry.xml index 3d47d02d1a8..a235a842261 100644 --- a/xml/System.Runtime.Remoting/ActivatedClientTypeEntry.xml +++ b/xml/System.Runtime.Remoting/ActivatedClientTypeEntry.xml @@ -28,9 +28,9 @@ and it must be registered on the client by using the method. To obtain a proxy for a new instance of the client-activated object the client must first register a channel with and then activate the object by calling `new`. + To create an instance of a client-activated object on the client, you must know its and it must be registered on the client by using the method. To obtain a proxy for a new instance of the client-activated object the client must first register a channel with and then activate the object by calling `new`. - To activate a client-activated object type with the `new` keyword, you must first register the object type on the client using the method. By calling you are giving the remoting infrastructure the location of the remote application where `new` attempts to create it. If, on the other hand, you use the method to create a new instance of the client-activated object, you must supply the remote application's URL as a parameter, so no prior registration on the client end is necessary. To supply the method with the URL of the server on which you want to create the object, you must encapsulate the URL in an instance of the class. + To activate a client-activated object type with the `new` keyword, you must first register the object type on the client using the method. By calling you are giving the remoting infrastructure the location of the remote application where `new` attempts to create it. If, on the other hand, you use the method to create a new instance of the client-activated object, you must supply the remote application's URL as a parameter, so no prior registration on the client end is necessary. To supply the method with the URL of the server on which you want to create the object, you must encapsulate the URL in an instance of the class. For a detailed description of client activated objects and remote object activation see [Activation of Remote Objects](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/cbzcxy2s(v=vs.100)). @@ -276,7 +276,7 @@ method. + The following code example shows a use of the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/System.Runtime.Remoting.ActivatedClientTypeEntry/CPP/activatedclienttypeentry_client.cpp" id="Snippet5"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/ActivatedClientTypeEntry/Overview/activatedclienttypeentry_client.cs" id="Snippet5"::: diff --git a/xml/System.Runtime.Remoting/ActivatedServiceTypeEntry.xml b/xml/System.Runtime.Remoting/ActivatedServiceTypeEntry.xml index 2a45699ac7e..22efe711c18 100644 --- a/xml/System.Runtime.Remoting/ActivatedServiceTypeEntry.xml +++ b/xml/System.Runtime.Remoting/ActivatedServiceTypeEntry.xml @@ -28,11 +28,11 @@ method, which is the server-side counterpart of the method. The method is used on the server to allow remote activation by clients of specified object types. + The current class is used by the method, which is the server-side counterpart of the method. The method is used on the server to allow remote activation by clients of specified object types. - To create a client-activated object on the server, you must know its , and it must be registered on the server end by using the method. To obtain a proxy for a new client-activated object, the client must first register a channel with and then activate the object by calling `new` or . + To create a client-activated object on the server, you must know its , and it must be registered on the server end by using the method. To obtain a proxy for a new client-activated object, the client must first register a channel with and then activate the object by calling `new` or . - To activate a client-activated object type with the `new` keyword, you must first register the object type on the client using the method. By calling you are giving the remoting infrastructure the location of the remote application where `new` attempts to create it. If, on the other hand, you use the method to create a new instance of the client-activated object, you must supply the remote application's URL as a parameter, so no prior registration on the client is necessary. To supply the method with the URL of the server on which you want to create the object, you must encapsulate the URL in an instance of the class. + To activate a client-activated object type with the `new` keyword, you must first register the object type on the client using the method. By calling you are giving the remoting infrastructure the location of the remote application where `new` attempts to create it. If, on the other hand, you use the method to create a new instance of the client-activated object, you must supply the remote application's URL as a parameter, so no prior registration on the client is necessary. To supply the method with the URL of the server on which you want to create the object, you must encapsulate the URL in an instance of the class. For a detailed description of client-activated objects and remote object activation, see [Activation of Remote Objects](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/cbzcxy2s(v=vs.100)). diff --git a/xml/System.Runtime.Remoting/IChannelInfo.xml b/xml/System.Runtime.Remoting/IChannelInfo.xml index 32045493bc5..5d1e6fa56a5 100644 --- a/xml/System.Runtime.Remoting/IChannelInfo.xml +++ b/xml/System.Runtime.Remoting/IChannelInfo.xml @@ -27,7 +27,7 @@ ## Remarks This interface is implemented by the property. It provides access to transport specific information contributed by the channels that are able to receive calls in the process or application domain where the object lives. This interface might also be used when building custom classes. - When an existing object instance is marshaled to produce a , the is copied from the channel (see ) for each registered channel and stored in the . When the is unmarshaled at its destination, the provided through the interface can be examined and used by corresponding channels in that process or application domain to create a transport message sink that manages the communication between the proxy and the server object. + When an existing object instance is marshaled to produce a , the is copied from the channel (see ) for each registered channel and stored in the . When the is unmarshaled at its destination, the provided through the interface can be examined and used by corresponding channels in that process or application domain to create a transport message sink that manages the communication between the proxy and the server object. ]]> diff --git a/xml/System.Runtime.Remoting/ObjRef.xml b/xml/System.Runtime.Remoting/ObjRef.xml index ea1ffcab202..19cbe6fb2f6 100644 --- a/xml/System.Runtime.Remoting/ObjRef.xml +++ b/xml/System.Runtime.Remoting/ObjRef.xml @@ -40,30 +40,30 @@ Stores all relevant information required to generate a proxy in order to communicate with a remote object. - is a serializable representation of an object that extends (MBR). A is used to transfer an object reference across a boundary. Creating a for an object is known as marshaling. You can create a (marshal a ) either explicitly, by registering the MBR object with the remoting infrastructure (see and ), or implicitly, by passing an MBR object as a parameter when calling a remote object. Remoting uses objects to store and transmit all the relevant information about the being remoted. - - The contains information that describes the and class of the object being marshaled, its exact location, and communication-related information on how to reach the remoting subdivision where the object is located. - - After a class implementing is marshaled, the that represents it is transferred through a channel into another application domain, possibly in another process or computer. When the is deserialized (see [XML and SOAP Serialization](/dotnet/standard/serialization/xml-and-soap-serialization)) in the target application domain, it is parsed to create a transparent proxy for the remote MBR object. This operation is known as unmarshaling. - - A transparent proxy is an object that provides the illusion that the actual object resides in the client's space. It achieves this by forwarding calls made on it to the real object using the remoting infrastructure. The transparent proxy is itself housed by an instance of a managed run-time class of type . The implements a part of the functionality needed to forward the operations from the transparent proxy. - - A proxy object can be used without regard to any remoting subdivisions within a . Applications need not distinguish between proxy references and object references. However, service providers dealing with issues such as activation, lifetime management, and transactions need to make such distinctions. - - This class makes 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://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/x4yx82e6(v=vs.100)). - - - -## Examples - The following code example demonstrates the use of a custom . To view the activation code that tests the custom , see the example for the method. - + is a serializable representation of an object that extends (MBR). A is used to transfer an object reference across a boundary. Creating a for an object is known as marshaling. You can create a (marshal a ) either explicitly, by registering the MBR object with the remoting infrastructure (see and ), or implicitly, by passing an MBR object as a parameter when calling a remote object. Remoting uses objects to store and transmit all the relevant information about the being remoted. + + The contains information that describes the and class of the object being marshaled, its exact location, and communication-related information on how to reach the remoting subdivision where the object is located. + + After a class implementing is marshaled, the that represents it is transferred through a channel into another application domain, possibly in another process or computer. When the is deserialized (see [XML and SOAP Serialization](/dotnet/standard/serialization/xml-and-soap-serialization)) in the target application domain, it is parsed to create a transparent proxy for the remote MBR object. This operation is known as unmarshaling. + + A transparent proxy is an object that provides the illusion that the actual object resides in the client's space. It achieves this by forwarding calls made on it to the real object using the remoting infrastructure. The transparent proxy is itself housed by an instance of a managed run-time class of type . The implements a part of the functionality needed to forward the operations from the transparent proxy. + + A proxy object can be used without regard to any remoting subdivisions within a . Applications need not distinguish between proxy references and object references. However, service providers dealing with issues such as activation, lifetime management, and transactions need to make such distinctions. + + This class makes 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://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/x4yx82e6(v=vs.100)). + + + +## Examples + The following code example demonstrates the use of a custom . To view the activation code that tests the custom , see the example for the method. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/CreateObjRef2/CPP/example.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/ObjRef/Overview/example.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting/ObjRef/Overview/example.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting/ObjRef/Overview/example.vb" id="Snippet1"::: + ]]> @@ -130,12 +130,12 @@ The of the object that the new instance will reference. Initializes a new instance of the class to reference a specified of a specified . - @@ -169,17 +169,17 @@ The contextual information about the source or destination of the exception. Initializes a new instance of the class from serialized data. - . - - - -## Examples + . + + + +## Examples :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/CreateObjRef/CPP/example.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/ObjRef/.ctor/example.cs" id="Snippet1"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/ObjRef/.ctor/example.cs" id="Snippet1"::: + ]]> @@ -211,17 +211,17 @@ Gets or sets the for the . The interface for the . - is created (see for details on marshaling). This information can be used by the channels in other processes or application domains to decide whether or not to create a transport sink to communicate with the object represented by the current instance. - - - -## Examples + is created (see for details on marshaling). This information can be used by the channels in other processes or application domains to decide whether or not to create a transport sink to communicate with the object represented by the current instance. + + + +## Examples :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/CreateObjRef/CPP/example.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/ObjRef/.ctor/example.cs" id="Snippet1"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/ObjRef/.ctor/example.cs" id="Snippet1"::: + ]]> @@ -248,11 +248,11 @@ Gets or sets the for the . The interface for the . - bound object types only, and represents the groups of objects that provide such run-time services as transactions. - + bound object types only, and represents the groups of objects that provide such run-time services as transactions. + ]]> @@ -293,19 +293,19 @@ The contextual information about the source or destination of the serialization. Populates a specified with the data needed to serialize the current instance. - with all the data needed to recreate the . - - The current method is an implementation of . - - - -## Examples + with all the data needed to recreate the . + + The current method is an implementation of . + + + +## Examples :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/CreateObjRef/CPP/example.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/ObjRef/.ctor/example.cs" id="Snippet1"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/ObjRef/.ctor/example.cs" id="Snippet1"::: + ]]> The parameter is . @@ -346,17 +346,17 @@ Returns a reference to the remote object that the describes. A reference to the remote object that the describes. - The immediate caller does not have serialization formatter permission. @@ -391,12 +391,12 @@ Returns a Boolean value that indicates whether the current instance references an object located in the current . A Boolean value that indicates whether the current instance references an object located in the current . - @@ -433,12 +433,12 @@ Returns a Boolean value that indicates whether the current instance references an object located in the current process. A Boolean value that indicates whether the current instance references an object located in the current process. - @@ -464,17 +464,17 @@ Gets or sets the for the object that the describes. The for the object that the describes. - contains detailed information about the type of remote object represented by the current . The current property contains a list of interfaces that the type implements, as well as the type hierarchy. This information might be used to refine the proxy incrementally to adjust to the client's view of the remote object's type. - - - -## Examples + contains detailed information about the type of remote object represented by the current . The current property contains a list of interfaces that the type implements, as well as the type hierarchy. This information might be used to refine the proxy incrementally to adjust to the client's view of the remote object's type. + + + +## Examples :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/CreateObjRef/CPP/example.cpp" id="Snippet1"::: - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/ObjRef/.ctor/example.cs" id="Snippet1"::: - + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/ObjRef/.ctor/example.cs" id="Snippet1"::: + ]]> @@ -500,17 +500,17 @@ Gets or sets the URI of the specific object instance. The URI of the specific object instance. - diff --git a/xml/System.Runtime.Remoting/ObjectHandle.xml b/xml/System.Runtime.Remoting/ObjectHandle.xml index cec1f9af215..4899cafb437 100644 --- a/xml/System.Runtime.Remoting/ObjectHandle.xml +++ b/xml/System.Runtime.Remoting/ObjectHandle.xml @@ -54,20 +54,20 @@ Wraps marshal-by-value object references, allowing them to be returned through an indirection. - class is used to pass an object (in a wrapped state) between multiple application domains without loading the metadata for the wrapped object in each through which the travels. Thus, the class gives the caller control of when the of the remote object is loaded into a domain. - - - -## Examples - The following code example shows how to create an object in another , and retrieve a proxy to the object from a . In this example, you can assume that the code of the `MyType` class is compiled into an assembly called "ObjectHandleAssembly". - + class is used to pass an object (in a wrapped state) between multiple application domains without loading the metadata for the wrapped object in each through which the travels. Thus, the class gives the caller control of when the of the remote object is loaded into a domain. + + + +## Examples + The following code example shows how to create an object in another , and retrieve a proxy to the object from a . In this example, you can assume that the code of the `MyType` class is compiled into an assembly called "ObjectHandleAssembly". + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/ObjectHandle/CPP/objecthandleassembly.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/ObjectHandle/Overview/objecthandleassembly.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting/ObjectHandle/Overview/objecthandleassembly.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting/ObjectHandle/Overview/objecthandleassembly.vb" id="Snippet1"::: + ]]> @@ -184,15 +184,15 @@ Returns the wrapped object. The wrapped object. - , retrieve a proxy to it with the method, and use the proxy to access the remote object. - + , retrieve a proxy to it with the method, and use the proxy to access the remote object. + :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/ObjectHandle/CPP/objecthandleassembly.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/ObjectHandle/Overview/objecthandleassembly.cs" id="Snippet2"::: - :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting/ObjectHandle/Overview/objecthandleassembly.vb" id="Snippet2"::: - + :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Remoting/ObjectHandle/Overview/objecthandleassembly.vb" id="Snippet2"::: + ]]> diff --git a/xml/System.Runtime.Remoting/RemotingConfiguration.xml b/xml/System.Runtime.Remoting/RemotingConfiguration.xml index 1037d46d222..eac025ec91d 100644 --- a/xml/System.Runtime.Remoting/RemotingConfiguration.xml +++ b/xml/System.Runtime.Remoting/RemotingConfiguration.xml @@ -102,7 +102,7 @@ ## Examples - The following code example demonstrates the use of the property to indicate the name of the remoting application. For the full example code, see examples for the and methods. + The following code example demonstrates the use of the property to indicate the name of the remoting application. For the full example code, see examples for the and methods. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/RemotingConfiguration.ServerActivation1/CPP/server.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/RemotingConfiguration/ApplicationName/server.cs" id="Snippet2"::: @@ -156,14 +156,14 @@ [!NOTE] -> is obsolete. Please use instead. +> is obsolete. Please use instead. Passing `null` as the `filename` parameter will cause default remoting initialization without requiring the existence of a configuration file. For configuration file syntax, see [Remoting Settings Schema](/previous-versions/dotnet/netframework-4.0/z415cf9a(v=vs.100)). > [!NOTE] -> Marshal-by-reference objects (MBRs) do not reside in memory forever. Instead, unless the type overrides to control its own lifetime policies, each MBR has a finite lifetime before the .NET Framework remoting system begins the process of deleting it and reclaiming the memory. For more information, see [Lifetime Leases](/previous-versions/dotnet/netframework-4.0/23bk23zc(v=vs.100)). +> Marshal-by-reference objects (MBRs) do not reside in memory forever. Instead, unless the type overrides to control its own lifetime policies, each MBR has a finite lifetime before the .NET Framework remoting system begins the process of deleting it and reclaiming the memory. For more information, see [Lifetime Leases](/previous-versions/dotnet/netframework-4.0/23bk23zc(v=vs.100)). ]]> @@ -209,7 +209,7 @@ For configuration file syntax, see [Remoting Settings Schema](https://msdn.microsoft.com/library/dc2d1e62-9af7-4ca1-99fd-98b93bb4db9e). > [!NOTE] -> Marshal-by-reference objects (MBRs) do not reside in memory forever. Instead, unless the type overrides to control its own lifetime policies, each MBR has a finite lifetime before the .NET Framework remoting system begins the process of deleting it and reclaiming the memory. For more information, see [Lifetime Leases](https://msdn.microsoft.com/library/c72d561c-1266-4c8b-b258-2c168c08da9a). +> Marshal-by-reference objects (MBRs) do not reside in memory forever. Instead, unless the type overrides to control its own lifetime policies, each MBR has a finite lifetime before the .NET Framework remoting system begins the process of deleting it and reclaiming the memory. For more information, see [Lifetime Leases](https://msdn.microsoft.com/library/c72d561c-1266-4c8b-b258-2c168c08da9a). ]]> @@ -818,9 +818,9 @@ and it must be registered on the server end by using the method. To obtain a proxy for a new instance of the client-activated object, the client must first register a channel with and then activate the object by calling `new`. + To create an instance of a client-activated object on the server, you must know its and it must be registered on the server end by using the method. To obtain a proxy for a new instance of the client-activated object, the client must first register a channel with and then activate the object by calling `new`. - To activate a client-activated object type with the `new` keyword, you must first register the object type on the client end using the method. Calling the method gives the remoting infrastructure the location of the remote application where `new` attempts to create it. If, on the other hand, you use the method to create a new instance of the client-activated object, you must supply the remote application's URL as a parameter, so no prior registration on the client end is necessary. To supply the method with the URL of the server where you want to create the object, you must encapsulate the URL in an instance of the class. + To activate a client-activated object type with the `new` keyword, you must first register the object type on the client end using the method. Calling the method gives the remoting infrastructure the location of the remote application where `new` attempts to create it. If, on the other hand, you use the method to create a new instance of the client-activated object, you must supply the remote application's URL as a parameter, so no prior registration on the client end is necessary. To supply the method with the URL of the server where you want to create the object, you must encapsulate the URL in an instance of the class. For a detailed description of client-activated objects, see [Client Activation](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/w93betdk(v=vs.100)). @@ -866,12 +866,12 @@ and it must be registered on the server end by using the method. To obtain a proxy for a new instance of the client-activated object, the client must first register a channel with and then activate the object by calling `new`. + To create an instance of a client-activated object on the server, you must know its and it must be registered on the server end by using the method. To obtain a proxy for a new instance of the client-activated object, the client must first register a channel with and then activate the object by calling `new`. - To activate a client-activated object type with the `new` keyword, you must first register the object type on the client end using the method. Calling the method gives the remoting infrastructure the location of the remote application where `new` attempts to create it. If, on the other hand, you use the method to create a new instance of the client-activated object, you must supply the remote application's URL as a parameter, so no prior registration on the client end is necessary. To supply the method with the URL of the server where you want to create the object, you must encapsulate the URL in an instance of the class. + To activate a client-activated object type with the `new` keyword, you must first register the object type on the client end using the method. Calling the method gives the remoting infrastructure the location of the remote application where `new` attempts to create it. If, on the other hand, you use the method to create a new instance of the client-activated object, you must supply the remote application's URL as a parameter, so no prior registration on the client end is necessary. To supply the method with the URL of the server where you want to create the object, you must encapsulate the URL in an instance of the class. ## Examples - The following code example demonstrates registration of an object type on the client end as a type that can be activated on the server. For the server code that corresponds to the presented client code, see the example for the method. + The following code example demonstrates registration of an object type on the client end as a type that can be activated on the server. For the server code that corresponds to the presented client code, see the example for the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/RemotingConfiguration.ClientActivation/CPP/client.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/RemotingConfiguration/RegisterActivatedClientType/client.cs" id="Snippet1"::: @@ -928,9 +928,9 @@ and it must be registered on the server end by using the method. To obtain a proxy for a new instance of the client-activated object, the client must first register a channel with and then activate the object by calling `new` or . + To create an instance of a client-activated object on the server, you must know its and it must be registered on the server end by using the method. To obtain a proxy for a new instance of the client-activated object, the client must first register a channel with and then activate the object by calling `new` or . - To activate a client-activated object type with the `new` keyword, you must first register the object type on the client end using the method. Calling the method gives the remoting infrastructure the location of the remote application, where `new` attempts to create it. If, on the other hand, you use the method to create a new instance of the client-activated object, you must supply the remote application's URL as a parameter, so no prior registration on the client end is necessary. To supply the method with the URL of the server where you want to create the object, you must encapsulate the URL in an instance of the class. + To activate a client-activated object type with the `new` keyword, you must first register the object type on the client end using the method. Calling the method gives the remoting infrastructure the location of the remote application, where `new` attempts to create it. If, on the other hand, you use the method to create a new instance of the client-activated object, you must supply the remote application's URL as a parameter, so no prior registration on the client end is necessary. To supply the method with the URL of the server where you want to create the object, you must encapsulate the URL in an instance of the class. For a detailed description of client-activated objects, see [Client Activation](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/w93betdk(v=vs.100)). @@ -974,16 +974,16 @@ and it must be registered on the server end by using the method. To obtain a proxy for a new instance of the client-activated object, the client must first register a channel with and then activate the object by calling `new` or . + To create an instance of a client-activated object on the server, you must know its and it must be registered on the server end by using the method. To obtain a proxy for a new instance of the client-activated object, the client must first register a channel with and then activate the object by calling `new` or . - To activate a client-activated object type with the `new` keyword, you must first register the object type on the client end using the method. Calling the method gives the remoting infrastructure the location of the remote application, where `new` attempts to create it. If, on the other hand, you use the method to create a new instance of the client-activated object, you must supply the remote application's URL as a parameter, so no prior registration on the client end is necessary. To supply the method with the URL of the server where you want to create the object, you must encapsulate the URL in an instance of the class. + To activate a client-activated object type with the `new` keyword, you must first register the object type on the client end using the method. Calling the method gives the remoting infrastructure the location of the remote application, where `new` attempts to create it. If, on the other hand, you use the method to create a new instance of the client-activated object, you must supply the remote application's URL as a parameter, so no prior registration on the client end is necessary. To supply the method with the URL of the server where you want to create the object, you must encapsulate the URL in an instance of the class. For a detailed description of client-activated objects, see [Client Activation](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/w93betdk(v=vs.100)). ## Examples - The following code example demonstrates registration of an object type on the server as a type that can be activated by the client. For the client code that corresponds to the presented server code, see the example for the method. + The following code example demonstrates registration of an object type on the server as a type that can be activated by the client. For the client code that corresponds to the presented server code, see the example for the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/RemotingConfiguration.ClientActivation/CPP/server.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/RemotingConfiguration/RegisterActivatedClientType/server.cs" id="Snippet2"::: @@ -1045,7 +1045,7 @@ , and activating the object by calling `new` or . To activate a well-known object with `new`, you must first register the well-known object type on the client using the method. Calling the method gives the remoting infrastructure the location of the remote object, which allows the `new` keyword to create it. If, on the other hand, you use the method to activate the well-known object, you must supply it with the object's URL as an argument, so no prior registration on the client end is necessary. + Any client that knows the URI of a registered well-known object can obtain a proxy for the object by registering the channel it prefers with , and activating the object by calling `new` or . To activate a well-known object with `new`, you must first register the well-known object type on the client using the method. Calling the method gives the remoting infrastructure the location of the remote object, which allows the `new` keyword to create it. If, on the other hand, you use the method to activate the well-known object, you must supply it with the object's URL as an argument, so no prior registration on the client end is necessary. For a detailed description of well-known objects, see [Server Activation](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/y0h540a7(v=vs.100)). @@ -1091,14 +1091,14 @@ , and activating the object by calling `new` or . To activate a well-known object with `new`, you must first register the well-known object type on the client using the method. Calling the method gives the remoting infrastructure the location of the remote object, which allows the `new` keyword to create it. If, on the other hand, you use the method to activate the well-known object, you must supply it with the object's URL as an argument, so no prior registration on the client end is necessary. + Any client that knows the URI of a registered well-known object can obtain a proxy for the object by registering the channel it prefers with , and activating the object by calling `new` or . To activate a well-known object with `new`, you must first register the well-known object type on the client using the method. Calling the method gives the remoting infrastructure the location of the remote object, which allows the `new` keyword to create it. If, on the other hand, you use the method to activate the well-known object, you must supply it with the object's URL as an argument, so no prior registration on the client end is necessary. For a detailed description of well-known objects, see [Server Activation](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/y0h540a7(v=vs.100)). ## Examples - The following code example demonstrates registration of an object type on the client end as a well-known type. For the server code that corresponds to the presented client code, see the example for the method. + The following code example demonstrates registration of an object type on the client end as a well-known type. For the server code that corresponds to the presented client code, see the example for the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/RemotingConfiguration.ServerActivation1/CPP/client.cpp" id="Snippet5"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/RemotingConfiguration/ApplicationName/client.cs" id="Snippet5"::: @@ -1160,9 +1160,9 @@ , and activating the object by calling `new` or the method. To activate a well-known object with `new`, you must first register the well-known object type on the client using the method. Calling the method gives the remoting infrastructure the location of the remote object, which allows the `new` keyword to create it. If, on the other hand, you use the method to activate the well-known object, you must supply it with the object's URL as an argument, so no prior registration on the client end is necessary. + Any client that knows the URI of a registered well-known object can obtain a proxy for the object by registering the channel it prefers with , and activating the object by calling `new` or the method. To activate a well-known object with `new`, you must first register the well-known object type on the client using the method. Calling the method gives the remoting infrastructure the location of the remote object, which allows the `new` keyword to create it. If, on the other hand, you use the method to activate the well-known object, you must supply it with the object's URL as an argument, so no prior registration on the client end is necessary. - When the call arrives at the server, the .NET Framework extracts the URI from the message, examines the remoting tables to locate the reference for the object that matches the URI, and then instantiates the object if necessary, forwarding the method call to the object. If the object is registered as , it is destroyed after the method call is completed. A new instance of the object is created for each method called. The only difference between and `new` is that the former allows you to specify a URL as a parameter, and the latter obtains the URL from the configuration. + When the call arrives at the server, the .NET Framework extracts the URI from the message, examines the remoting tables to locate the reference for the object that matches the URI, and then instantiates the object if necessary, forwarding the method call to the object. If the object is registered as , it is destroyed after the method call is completed. A new instance of the object is created for each method called. The only difference between and `new` is that the former allows you to specify a URL as a parameter, and the latter obtains the URL from the configuration. The remote object itself is not instantiated by the registration process. This only happens when a client attempts to call a method on the object or activates the object from the client side. @@ -1219,9 +1219,9 @@ , and activating the object by calling `new` or the method. To activate a well-known object with `new`, you must first register the well-known object type on the client using the method. Calling the method gives the remoting infrastructure the location of the remote object, which allows the `new` keyword to create it. If, on the other hand, you use the method to activate the well-known object, you must supply it with the object's URL as an argument, so no prior registration on the client end is necessary. + Any client that knows the URI of a registered well-known object can obtain a proxy for the object by registering the channel it prefers with , and activating the object by calling `new` or the method. To activate a well-known object with `new`, you must first register the well-known object type on the client using the method. Calling the method gives the remoting infrastructure the location of the remote object, which allows the `new` keyword to create it. If, on the other hand, you use the method to activate the well-known object, you must supply it with the object's URL as an argument, so no prior registration on the client end is necessary. - When the call arrives at the server, the .NET Framework extracts the URI from the message, examines the remoting tables to locate the reference for the object that matches the URI, and then instantiates the object if necessary, forwarding the method call to the object. If the object is registered as , it is destroyed after the method call is completed. A new instance of the object is created for each method called. The only difference between and `new` is that the former allows you to specify a URL as a parameter, and the latter obtains the URL from the configuration. + When the call arrives at the server, the .NET Framework extracts the URI from the message, examines the remoting tables to locate the reference for the object that matches the URI, and then instantiates the object if necessary, forwarding the method call to the object. If the object is registered as , it is destroyed after the method call is completed. A new instance of the object is created for each method called. The only difference between and `new` is that the former allows you to specify a URL as a parameter, and the latter obtains the URL from the configuration. The remote object itself is not instantiated by the registration process. This only happens when a client attempts to call a method on the object or activates the object from the client side. @@ -1230,7 +1230,7 @@ ## Examples - The following code example demonstrates registration of an object type on the server as a well-known object type. For the client code that corresponds to the presented server code, see the example for the method. + The following code example demonstrates registration of an object type on the server as a well-known object type. For the client code that corresponds to the presented server code, see the example for the method. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/RemotingConfiguration.ServerActivation1/CPP/server.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/RemotingConfiguration/ApplicationName/server.cs" id="Snippet1"::: diff --git a/xml/System.Runtime.Remoting/RemotingException.xml b/xml/System.Runtime.Remoting/RemotingException.xml index 93a7d0362f3..f8323f6bcda 100644 --- a/xml/System.Runtime.Remoting/RemotingException.xml +++ b/xml/System.Runtime.Remoting/RemotingException.xml @@ -34,7 +34,7 @@ ## Remarks uses the HRESULT COR_E_REMOTING, which has the value 0x8013150B. - uses the default implementation, which supports reference equality. + uses the default implementation, which supports reference equality. For a list of initial property values for an instance of , see the constructors. @@ -78,8 +78,8 @@ |Property|Value| |--------------|-----------| -||`null`| -||The empty string ("")| +||`null`| +||The empty string ("")| ]]> @@ -114,8 +114,8 @@ |Property Type|Condition| |-------------------|---------------| -||`null`| -||The `message` string| +||`null`| +||The `message` string| ]]> @@ -193,8 +193,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> diff --git a/xml/System.Runtime.Remoting/RemotingServices.xml b/xml/System.Runtime.Remoting/RemotingServices.xml index 81f351e665f..0723eeb8c4f 100644 --- a/xml/System.Runtime.Remoting/RemotingServices.xml +++ b/xml/System.Runtime.Remoting/RemotingServices.xml @@ -94,7 +94,7 @@ ## Examples - The following code example demonstrates how to use the method to create a proxy to a well-known object. + The following code example demonstrates how to use the method to create a proxy to a well-known object. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/RemotingServices.BasicSample/CPP/basicclient.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/RemotingServices/Connect/basicclient.cs" id="Snippet1"::: @@ -149,7 +149,7 @@ ## Remarks The returned proxy object points to an endpoint served by the specified well-known object. No messages are sent over the network until a method is called on the proxy. - The `data` object is used to communicate information to the channel, and is passed to the method. + The `data` object is used to communicate information to the channel, and is passed to the method. ]]> @@ -191,7 +191,7 @@ method to disconnect an object from the remoting channels. + The following code example demonstrates how to use the method to disconnect an object from the remoting channels. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/RemotingServices.BasicSample/CPP/manualserver.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/RemotingServices/Connect/manualserver.cs" id="Snippet2"::: @@ -245,7 +245,7 @@ ## Examples - The following code example demonstrates how to use the method to forward method calls to remote objects. + The following code example demonstrates how to use the method to forward method calls to remote objects. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/RemotingServices.ExecuteMessage/CPP/serviceclass.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/RemotingServices/ExecuteMessage/serviceclass.cs" id="Snippet1"::: @@ -339,7 +339,7 @@ ## Examples - The following code example demonstrates how to use the method to get a lifetime lease for the specified object. + The following code example demonstrates how to use the method to get a lifetime lease for the specified object. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/RemotingServices.TimerSample/CPP/timerclient.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/RemotingServices/GetLifetimeService/timerclient.cs" id="Snippet1"::: @@ -396,7 +396,7 @@ , , and properties of and is used by classes implementing the interface. Consumers of classes should reference the property. + This determines the method base from the , , and properties of and is used by classes implementing the interface. Consumers of classes should reference the property. ]]> @@ -622,7 +622,7 @@ method is very useful in the pluggable parts of the remoting infrastructure (for example, channel sinks, dynamic sinks, and context sinks) that use objects, because the current method will return the associated type object from the URI. + Because remoting identifies endpoints using URIs, the method is very useful in the pluggable parts of the remoting infrastructure (for example, channel sinks, dynamic sinks, and context sinks) that use objects, because the current method will return the associated type object from the URI. @@ -911,7 +911,7 @@ ## Examples - The following code example demonstrates the use of the method to determine whether an object is a proxy or a real object. For the complete example code, see the example for the class. + The following code example demonstrates the use of the method to determine whether an object is a proxy or a real object. For the complete example code, see the example for the class. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/AsyncResult.NewExamples/CPP/ad.cpp" id="Snippet6"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/RemotingServices/IsTransparentProxy/ad.cs" id="Snippet6"::: @@ -1018,7 +1018,7 @@ A contains information that describes the and class of the object being marshaled, a URI that uniquely identifies the specific object instance, and communication related information about how to reach the remoting subdivision where the object is located. - During marshaling, the context from the current thread is used, not the context that was active when the object was created. If a URI was not explicitly set by the method, it is automatically generated by the remoting identity infrastructure. + During marshaling, the context from the current thread is used, not the context that was active when the object was created. If a URI was not explicitly set by the method, it is automatically generated by the remoting identity infrastructure. You cannot associate a URI with a proxy for one of two reasons: either the URI was generated at the server side for the object it represents, or the object is well known, in which case the URI is known. For this reason, if the `Obj` parameter is a proxy, an exception will be thrown. For custom proxies this restriction is relaxed because the transparent proxy is treated as the server object. @@ -1079,7 +1079,7 @@ ## Examples - The following code example demonstrates how to use the current method to marshal a specified object. + The following code example demonstrates how to use the current method to marshal a specified object. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_Remoting/RemotingServices.BasicSample/CPP/manualserver.cpp" id="Snippet2"::: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Remoting/RemotingServices/Connect/manualserver.cs" id="Snippet2"::: @@ -1138,7 +1138,7 @@ A contains information that describes the and class of the object being marshaled, a URI that uniquely identifies the specific object instance, and communication related information about how to reach the remoting subdivision where the object is located. - The specified is used by the remoting infrastructure to limit the scope of the exposed type hierarchy. For example, if object A derives from object B, which derives from object C, and is called, then the client can cast the proxy between C and B but not to A. + The specified is used by the remoting infrastructure to limit the scope of the exposed type hierarchy. For example, if object A derives from object B, which derives from object C, and is called, then the client can cast the proxy between C and B but not to A. During marshaling, the context from the current thread is used, not the context that was active when the object was created. @@ -1199,7 +1199,7 @@ ## Examples - The following code example demonstrates how to set the URI that will be used by the method when marshaling the specified object. + The following code example demonstrates how to set the URI that will be used by the method when marshaling the specified object. :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/RemotingServices.SetObjectUriForMarshal/CPP/source.cpp" id="Snippet1"::: :::code language="csharp" source="~/snippets/csharp/System/MarshalByRefObject/Overview/source.cs" id="Snippet1"::: diff --git a/xml/System.Runtime.Remoting/RemotingTimeoutException.xml b/xml/System.Runtime.Remoting/RemotingTimeoutException.xml index 604c1991e6a..207e2f48b23 100644 --- a/xml/System.Runtime.Remoting/RemotingTimeoutException.xml +++ b/xml/System.Runtime.Remoting/RemotingTimeoutException.xml @@ -36,7 +36,7 @@ uses the HRESULT COR_E_REMOTING, which has the value 0x8013150B. - uses the default implementation, which supports reference equality. + uses the default implementation, which supports reference equality. For a list of initial property values for an instance of , see the constructors. @@ -80,8 +80,8 @@ |Property|Value| |--------------|-----------| -||`null`| -||Localized error message for | +||`null`| +||Localized error message for | ]]> @@ -115,8 +115,8 @@ |Property Type|Condition| |-------------------|---------------| -||`null`| -||The `message` string| +||`null`| +||The `message` string| ]]> @@ -154,8 +154,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference| -||The error message string| +||The inner exception reference| +||The error message string| ]]> diff --git a/xml/System.Runtime.Remoting/ServerException.xml b/xml/System.Runtime.Remoting/ServerException.xml index e3f8d91726a..9dc74e3f9c0 100644 --- a/xml/System.Runtime.Remoting/ServerException.xml +++ b/xml/System.Runtime.Remoting/ServerException.xml @@ -34,7 +34,7 @@ ## Remarks uses the HRESULT COR_E_SERVER, which has the value 0x8013150E. - uses the default implementation, which supports reference equality. + uses the default implementation, which supports reference equality. For a list of initial property values for an instance of , see the constructors. @@ -78,8 +78,8 @@ |Property|Value| |--------------|-----------| -||`null`| -||The empty string ("")| +||`null`| +||The empty string ("")| ]]> @@ -114,8 +114,8 @@ |Property Type|Condition| |-------------------|---------------| -||`null`| -||The `message` string| +||`null`| +||The `message` string| ]]> @@ -154,8 +154,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference| -||The error message string| +||The inner exception reference| +||The error message string| ]]> diff --git a/xml/System.Runtime.Remoting/SoapServices.xml b/xml/System.Runtime.Remoting/SoapServices.xml index df30dfeb19c..3bb08ca4bb6 100644 --- a/xml/System.Runtime.Remoting/SoapServices.xml +++ b/xml/System.Runtime.Remoting/SoapServices.xml @@ -291,7 +291,7 @@ and . + The current method returns values set up through and . @@ -342,7 +342,7 @@ and . + The current method returns values set up through and . @@ -391,7 +391,7 @@ has not been registered with any SOAPAction value, the method returns the SOAPAction automatically cached with the . + If the given has not been registered with any SOAPAction value, the method returns the SOAPAction automatically cached with the . diff --git a/xml/System.Runtime.Remoting/WellKnownClientTypeEntry.xml b/xml/System.Runtime.Remoting/WellKnownClientTypeEntry.xml index e7e1b3fcea4..3b154bd8302 100644 --- a/xml/System.Runtime.Remoting/WellKnownClientTypeEntry.xml +++ b/xml/System.Runtime.Remoting/WellKnownClientTypeEntry.xml @@ -30,7 +30,7 @@ ## Remarks Server-activated types can be either single call or singleton. If a class is registered as a single call type, a new instance is created each time a call from the client arrives. All calls to a singleton object are handled by one instance of that object, unless that object has been collected. - Any client that knows the URI of a registered server-activated object can obtain a proxy for this object by registering the channel it prefers with and activating the object by calling `new` or . To activate a server-activated object with `new`, you must first register the server-activated object type on the client using the method. By calling , you are giving the remoting infrastructure the location of the remote object, which allows the `new` keyword to create it. If, on the other hand, you use the method to activate a server-activated object, you must supply it with the object's URL as an argument, so no prior registration on the client is necessary. + Any client that knows the URI of a registered server-activated object can obtain a proxy for this object by registering the channel it prefers with and activating the object by calling `new` or . To activate a server-activated object with `new`, you must first register the server-activated object type on the client using the method. By calling , you are giving the remoting infrastructure the location of the remote object, which allows the `new` keyword to create it. If, on the other hand, you use the method to activate a server-activated object, you must supply it with the object's URL as an argument, so no prior registration on the client is necessary. For a detailed description of server-activated objects and remote object activation, see [Activation of Remote Objects](https://learn.microsoft.com/previous-versions/dotnet/netframework-4.0/cbzcxy2s(v=vs.100)). @@ -216,7 +216,7 @@ is not `null`, it is returned at the end of the string. + If is not `null`, it is returned at the end of the string. ]]> diff --git a/xml/System.Runtime.Remoting/WellKnownObjectMode.xml b/xml/System.Runtime.Remoting/WellKnownObjectMode.xml index 08bdabee479..37b24eee498 100644 --- a/xml/System.Runtime.Remoting/WellKnownObjectMode.xml +++ b/xml/System.Runtime.Remoting/WellKnownObjectMode.xml @@ -28,11 +28,11 @@ Defines how well-known objects are activated. - method on the server side. - + method on the server side. + ]]> diff --git a/xml/System.Runtime.Remoting/WellKnownServiceTypeEntry.xml b/xml/System.Runtime.Remoting/WellKnownServiceTypeEntry.xml index 48bfb308791..5383555773d 100644 --- a/xml/System.Runtime.Remoting/WellKnownServiceTypeEntry.xml +++ b/xml/System.Runtime.Remoting/WellKnownServiceTypeEntry.xml @@ -30,7 +30,7 @@ ## Remarks Server-activated object types can be either single call or singleton. If an object type is single call, a new instance of it is created each time a call from the client comes in. All calls to a singleton object are handled by one instance of that object. - Any client that knows the URI of this object can obtain a proxy for this object by registering the channel it prefers with and activating the object by calling `new` or . + Any client that knows the URI of this object can obtain a proxy for this object by registering the channel it prefers with and activating the object by calling `new` or . It is important to note that the remote object itself is not created by the registration process. This only happens when a client attempts to call a method on the object or activates the object from the client side. diff --git a/xml/System.Runtime.Serialization.Formatters.Binary/BinaryFormatter.xml b/xml/System.Runtime.Serialization.Formatters.Binary/BinaryFormatter.xml index 61f9beb77b1..2087d015db4 100644 --- a/xml/System.Runtime.Serialization.Formatters.Binary/BinaryFormatter.xml +++ b/xml/System.Runtime.Serialization.Formatters.Binary/BinaryFormatter.xml @@ -128,8 +128,8 @@ This constructor sets the properties of the |`null`| -||A with a value that indicates that serialized data can be transmitted to or received from any of the other contexts. ()| +||`null`| +||A with a value that indicates that serialized data can be transmitted to or received from any of the other contexts. ()| ]]> diff --git a/xml/System.Runtime.Serialization.Formatters.Soap/SoapFormatter.xml b/xml/System.Runtime.Serialization.Formatters.Soap/SoapFormatter.xml index 93d90c69c68..189c0f3d8c9 100644 --- a/xml/System.Runtime.Serialization.Formatters.Soap/SoapFormatter.xml +++ b/xml/System.Runtime.Serialization.Formatters.Soap/SoapFormatter.xml @@ -35,7 +35,7 @@ The and interface allows the specification of two separate object graphs: the graph of objects to serialize, and an additional graph that contains an array of header objects that convey information about the remote function call (for example, transaction ID or a method signature). For proper serialization, the root object of the first graph must be an object that implements either the interface or the interface. -During deserialization of an RPC, a delegate is specified to the method of the formatter. The remoting infrastructure uses the delegate to produce an object that supports the interface. This object contains the information stored in the headers, and becomes the root of the graph returned by the deserializer. +During deserialization of an RPC, a delegate is specified to the method of the formatter. The remoting infrastructure uses the delegate to produce an object that supports the interface. This object contains the information stored in the headers, and becomes the root of the graph returned by the deserializer. The can also handle RPCs that are produced with objects that implement the interface. To create an RPC without using the functionality, place an object that supports the interface at the root of a graph being serialized. To deserialize an RPC created in this manner the property must be set to another object that supports the interface, and contains the relevant remote call information. @@ -84,8 +84,8 @@ TimeSpan objects are serialized according to the ISO 8601: 1998 section 5.5.3.2. |Property|Value| |--------------|-----------| -||`null`| -||A new initialized to specify that the serialized data can be transmitted to or received from any of the other contexts| +||`null`| +||A new initialized to specify that the serialized data can be transmitted to or received from any of the other contexts| diff --git a/xml/System.Runtime.Serialization.Json/DataContractJsonSerializer.xml b/xml/System.Runtime.Serialization.Json/DataContractJsonSerializer.xml index 75061ece293..9341dfb65e2 100644 --- a/xml/System.Runtime.Serialization.Json/DataContractJsonSerializer.xml +++ b/xml/System.Runtime.Serialization.Json/DataContractJsonSerializer.xml @@ -972,7 +972,7 @@ determines whether it can read a object by checking that it is positioned on an XML element. It also examines the name and namespace of the XML element that the reader is positioned at and compares the values to the expected name and namespace. The expected name can be set with the `rootName` value passed into the constructor (if present), or is "root" if absent. The expected namespace is the empty string. + The determines whether it can read a object by checking that it is positioned on an XML element. It also examines the name and namespace of the XML element that the reader is positioned at and compares the values to the expected name and namespace. The expected name can be set with the `rootName` value passed into the constructor (if present), or is "root" if absent. The expected namespace is the empty string. Note that this method is intended for advanced scenarios when working with XML mapped from JSON. @@ -1134,9 +1134,9 @@ . + This property can be set using a constructor. For a list, see . - The property specifies the maximum number of objects that the serializer serializes or deserializes in a single or method call. The method always reads one root object, but this object may have other objects in its data members. Those objects may have other objects. The default is . Note that when serializing or deserializing arrays, every array entry counts as a separate object. Also, note that some objects may have a large memory representation, so this quota alone may not be sufficient to prevent Denial of Service attacks. For more information, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). If you need to increase this quota beyond its default value, it is important to do so both on the sending (serializing) and receiving (deserializing) sides. It applies both when reading and writing data. + The property specifies the maximum number of objects that the serializer serializes or deserializes in a single or method call. The method always reads one root object, but this object may have other objects in its data members. Those objects may have other objects. The default is . Note that when serializing or deserializing arrays, every array entry counts as a separate object. Also, note that some objects may have a large memory representation, so this quota alone may not be sufficient to prevent Denial of Service attacks. For more information, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). If you need to increase this quota beyond its default value, it is important to do so both on the sending (serializing) and receiving (deserializing) sides. It applies both when reading and writing data. ]]> diff --git a/xml/System.Runtime.Serialization.Json/IXmlJsonReaderInitializer.xml b/xml/System.Runtime.Serialization.Json/IXmlJsonReaderInitializer.xml index cc938c85d0b..dd96d45cf57 100644 --- a/xml/System.Runtime.Serialization.Json/IXmlJsonReaderInitializer.xml +++ b/xml/System.Runtime.Serialization.Json/IXmlJsonReaderInitializer.xml @@ -52,11 +52,11 @@ Specifies the interface for initializing a JavaScript Object Notation (JSON) reader when reusing them to read from a particular stream or buffer. - objects created by one of the methods implement this interface and are initialized ready to read JSON-encoded data. But if a user wants to reuse the same object to read other JSON-encoded data, then the reader must be initialized to the second dataset to be read by using one of the methods. - + objects created by one of the methods implement this interface and are initialized ready to read JSON-encoded data. But if a user wants to reuse the same object to read other JSON-encoded data, then the reader must be initialized to the second dataset to be read by using one of the methods. + ]]> @@ -70,13 +70,13 @@ Reinitializes a JavaScript Object Notation (JSON) enabled reader to a specified stream or buffer that contains JSON-encoded data. - objects created by one of the methods implement this interface and are ready to read JSON-encoded data. But if a user wants to reuse the same object to read other JSON-encoded data, then the reader must be initialized to the second dataset to be read by using the one of the methods. - - The value set as part of the `quotas` parameter only limits the amount of information being read into memory when the input is being read from a stream with the method and is not enforced when the method is used to read information from a buffer. The limits on the number of attributes that can be loaded are not relevant to the JSON context. - + objects created by one of the methods implement this interface and are ready to read JSON-encoded data. But if a user wants to reuse the same object to read other JSON-encoded data, then the reader must be initialized to the second dataset to be read by using the one of the methods. + + The value set as part of the `quotas` parameter only limits the amount of information being read into memory when the input is being read from a stream with the method and is not enforced when the method is used to read information from a buffer. The limits on the number of attributes that can be loaded are not relevant to the JSON context. + ]]> @@ -147,15 +147,15 @@ Delegate to call when the reader is closed. Reinitializes a JavaScript Object Notation (JSON) enabled reader to a specified stream that contains JSON-encoded data. - object that reads JSON-encoded streams can be reused by calling the method to reinitialize it. - - The reader can interpret the UTF-8 and the UTF-16 (big- or little-endian) encodings. The reader uses the encoding set at initialization time if one is passed or the encoding is automatically detected if `null` is passed. - - The value set as part of the `quotas` parameter only limits the amount of information being read into memory when the input is being read from a stream with the method and is not enforced when the method is used to read information from a buffer. The limits on the number of attributes that can be loaded are not relevant to the JSON context. - + object that reads JSON-encoded streams can be reused by calling the method to reinitialize it. + + The reader can interpret the UTF-8 and the UTF-16 (big- or little-endian) encodings. The reader uses the encoding set at initialization time if one is passed or the encoding is automatically detected if `null` is passed. + + The value set as part of the `quotas` parameter only limits the amount of information being read into memory when the input is being read from a stream with the method and is not enforced when the method is used to read information from a buffer. The limits on the number of attributes that can be loaded are not relevant to the JSON context. + ]]> @@ -229,15 +229,15 @@ The delegate to call when the reader is closed. Reinitializes a JavaScript Object Notation (JSON) enabled reader to a specified buffer that contains JSON-encoded data. - object that reads a JSON-encoded buffered can be reused by calling the method to reinitialize it. - - The reader can interpret the UTF-8 and the UTF-16 (big- or little-endian) encodings. The reader uses the encoding set at initialization time if one is passed or the encoding is automatically detected if `null` is passed. - - The value set as part of the `quotas` parameter only limits the amount of information being read into memory when the input is being read from a stream with the method and is not enforced when the method is used to read information from a buffer. The limits on the number of attributes that can be loaded are not relevant to the JSON context. - + object that reads a JSON-encoded buffered can be reused by calling the method to reinitialize it. + + The reader can interpret the UTF-8 and the UTF-16 (big- or little-endian) encodings. The reader uses the encoding set at initialization time if one is passed or the encoding is automatically detected if `null` is passed. + + The value set as part of the `quotas` parameter only limits the amount of information being read into memory when the input is being read from a stream with the method and is not enforced when the method is used to read information from a buffer. The limits on the number of attributes that can be loaded are not relevant to the JSON context. + ]]> diff --git a/xml/System.Runtime.Serialization.Json/IXmlJsonWriterInitializer.xml b/xml/System.Runtime.Serialization.Json/IXmlJsonWriterInitializer.xml index d72235ad5bb..b5a0a923cf7 100644 --- a/xml/System.Runtime.Serialization.Json/IXmlJsonWriterInitializer.xml +++ b/xml/System.Runtime.Serialization.Json/IXmlJsonWriterInitializer.xml @@ -52,11 +52,11 @@ Specifies the interface for initializing a JavaScript Object Notation (JSON) writer when reusing them to write to a particular output stream. - objects created by the methods implement this interface and when created are immediately ready to write JSON-encoded data. But if a user wants to reuse the same object to write a new JSON document to another output stream, then the writer must be initialized to the appropriate stream by using the method. - + objects created by the methods implement this interface and when created are immediately ready to write JSON-encoded data. But if a user wants to reuse the same object to write a new JSON document to another output stream, then the writer must be initialized to the appropriate stream by using the method. + ]]> @@ -109,13 +109,13 @@ If , the output stream is closed by the writer when done; otherwise . Initializes (or reinitializes) a JavaScript Object Notation (JSON) writer to a specified output stream with specified character encoding. - objects created by the methods implement this interface and when created are immediately ready to write JSON-encoded data. But if a user wants to reuse the same object to write a new JSON document to another output stream, then the writer must be initialized to the appropriate stream by using the method. - - The writers created by can handle the UTF-8 and the UTF-16 (big- or little-endian) encodings. - + objects created by the methods implement this interface and when created are immediately ready to write JSON-encoded data. But if a user wants to reuse the same object to write a new JSON document to another output stream, then the writer must be initialized to the appropriate stream by using the method. + + The writers created by can handle the UTF-8 and the UTF-16 (big- or little-endian) encodings. + ]]> diff --git a/xml/System.Runtime.Serialization.Json/JsonReaderWriterFactory.xml b/xml/System.Runtime.Serialization.Json/JsonReaderWriterFactory.xml index 17a29a10444..209ef9c0131 100644 --- a/xml/System.Runtime.Serialization.Json/JsonReaderWriterFactory.xml +++ b/xml/System.Runtime.Serialization.Json/JsonReaderWriterFactory.xml @@ -58,11 +58,11 @@ Produces instances of that can read data encoded with JavaScript Object Notation (JSON) from a stream or buffer and map it to an XML Infoset and instances of that can map an XML Infoset to JSON and write JSON-encoded data to a stream. - class can be used to create the necessary XML readers and writers. Note that not every XML Infoset element can be mapped to JSON. For more information about mapping, see [How to: Serialize and Deserialize JSON Data](/dotnet/framework/wcf/feature-details/how-to-serialize-and-deserialize-json-data). - + class can be used to create the necessary XML readers and writers. Note that not every XML Infoset element can be mapped to JSON. For more information about mapping, see [How to: Serialize and Deserialize JSON Data](/dotnet/framework/wcf/feature-details/how-to-serialize-and-deserialize-json-data). + ]]> @@ -76,11 +76,11 @@ Creates an that can map - streams or buffers encoded with JavaScript Object Notation (JSON) to an XML Infoset. - to prevent Denial of Service (DoS) attacks when reading untrusted data. For more information about using to prevent Denial of Service attacks when reading untrusted data, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). - + to prevent Denial of Service (DoS) attacks when reading untrusted data. For more information about using to prevent Denial of Service attacks when reading untrusted data, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). + ]]> @@ -132,13 +132,13 @@ Creates an that can map buffers encoded with JavaScript Object Notation (JSON) to an XML Infoset. An that can process JavaScript Object Notation (JSON) data. - parameter. The character encoding (UTF-8, Unicode or Big-Endian Unicode) is auto-detected when the data is read. - - For more information about using to prevent Denial of Service attacks when reading untrusted data, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). - + parameter. The character encoding (UTF-8, Unicode or Big-Endian Unicode) is auto-detected when the data is read. + + For more information about using to prevent Denial of Service attacks when reading untrusted data, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). + ]]> @@ -190,13 +190,13 @@ Creates an that can map streams encoded with JavaScript Object Notation (JSON) to an XML Infoset. An that can read JavaScript Object Notation (JSON). - parameter. The character encoding (UTF-8, Unicode or Big-Endian Unicode) is auto-detected when the data is read. - - For more information about using to prevent Denial of Service attacks when reading untrusted data, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). - + parameter. The character encoding (UTF-8, Unicode or Big-Endian Unicode) is auto-detected when the data is read. + + For more information about using to prevent Denial of Service attacks when reading untrusted data, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). + ]]> @@ -252,13 +252,13 @@ Creates an that can map buffers encoded with JavaScript Object Notation (JSON), of a specified size and offset, to an XML Infoset. An that can read JavaScript Object Notation (JSON). - parameter. The character encoding (UTF-8, Unicode or Big-Endian Unicode) is auto-detected when the data is read. - - For more information about using to prevent Denial of Service attacks when reading untrusted data, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). - + parameter. The character encoding (UTF-8, Unicode or Big-Endian Unicode) is auto-detected when the data is read. + + For more information about using to prevent Denial of Service attacks when reading untrusted data, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). + ]]> @@ -329,11 +329,11 @@ Creates an that can map streams encoded with JavaScript Object Notation (JSON), of a specified size and offset, to an XML Infoset. An that can read JavaScript Object Notation (JSON). - to prevent Denial of Service attacks when reading untrusted data, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). - + to prevent Denial of Service attacks when reading untrusted data, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). + ]]> @@ -408,11 +408,11 @@ Creates an that can map buffers encoded with JavaScript Object Notation (JSON), with a specified size and offset and character encoding, to an XML Infoset. An that can read JavaScript Object Notation (JSON). - to prevent Denial of Service attacks when reading untrusted data, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). - + to prevent Denial of Service attacks when reading untrusted data, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). + ]]> @@ -426,11 +426,11 @@ Creates an that writes data encoded with JSON to a stream. - static method returns an instance of an that can map an XML Infoset to a JSON stream. The is not guaranteed to produce valid JSON. If it is used in a way not supported by the JSON-XML mapping, it may either throw an exception or write an invalid JSON document. - + static method returns an instance of an that can map an XML Infoset to a JSON stream. The is not guaranteed to produce valid JSON. If it is used in a way not supported by the JSON-XML mapping, it may either throw an exception or write an invalid JSON document. + ]]> @@ -480,11 +480,11 @@ Creates an that writes data encoded with JSON to a stream. An that writes data encoded with JSON to the stream based on an XML Infoset. - @@ -536,11 +536,11 @@ Creates an that writes data encoded with JSON to a stream with a specified character encoding. An that writes data encoded with JSON to the stream based on an XML Infoset. - diff --git a/xml/System.Runtime.Serialization/CollectionDataContractAttribute.xml b/xml/System.Runtime.Serialization/CollectionDataContractAttribute.xml index d5af14ad151..f8eb505dcb9 100644 --- a/xml/System.Runtime.Serialization/CollectionDataContractAttribute.xml +++ b/xml/System.Runtime.Serialization/CollectionDataContractAttribute.xml @@ -63,19 +63,19 @@ ## Remarks The is intended to ease interoperability when working with data from non-WCF providers and to control the exact shape of serialized instances. To this end, the property enables you to control the names of the repeating items inside a collection. This is especially useful when the provider does not use the XML element type name as the array item name, for example, if a provider uses "String" as an element type name instead of the XSD type name "string". - The is also intended to be used with dictionary types to handle keyed collections. Dictionary types are classes that implement either the or the interface, for example, the . Use the and properties to set custom names when using the class. + The is also intended to be used with dictionary types to handle keyed collections. Dictionary types are classes that implement either the or the interface, for example, the . Use the and properties to set custom names when using the class. For more information about using the , see [Using Data Contracts](/dotnet/framework/wcf/feature-details/using-data-contracts). ## Examples - The following example applies the to a class that inherits from the class. The code sets the and properties to custom values. + The following example applies the to a class that inherits from the class. The code sets the and properties to custom values. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/collectiondatacontractattribute/cs/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/collectiondatacontractattribute/vb/source.vb" id="Snippet1"::: - When the [ServiceModel Metadata Utility Tool (Svcutil.exe)](/dotnet/framework/wcf/servicemodel-metadata-utility-tool-svcutil-exe) is used to generate code for the client, the code resembles the following example. Notice that the name of the class is changed, as well as the . When using generics, the type parameter name is used to create the resulting type name. + When the [ServiceModel Metadata Utility Tool (Svcutil.exe)](/dotnet/framework/wcf/servicemodel-metadata-utility-tool-svcutil-exe) is used to generate code for the client, the code resembles the following example. Notice that the name of the class is changed, as well as the . When using generics, the type parameter name is used to create the resulting type name. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/collectiondatacontractattribute/cs/source.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/collectiondatacontractattribute/vb/source.vb" id="Snippet2"::: diff --git a/xml/System.Runtime.Serialization/DataContractAttribute.xml b/xml/System.Runtime.Serialization/DataContractAttribute.xml index 22045702da8..bf97a651270 100644 --- a/xml/System.Runtime.Serialization/DataContractAttribute.xml +++ b/xml/System.Runtime.Serialization/DataContractAttribute.xml @@ -60,7 +60,7 @@ For more information about this API, see Supplemental API remarks for DataContractAttribute. has been applied. Note that the and properties have been set to values that override the default settings. +The following example serializes and deserializes a class named `Person` to which the has been applied. Note that the and properties have been set to values that override the default settings. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractattribute/cs/overview.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/datacontractattribute/vb/overview.vb" id="Snippet1"::: diff --git a/xml/System.Runtime.Serialization/DataContractResolver.xml b/xml/System.Runtime.Serialization/DataContractResolver.xml index 20754042e9a..c7f1def684d 100644 --- a/xml/System.Runtime.Serialization/DataContractResolver.xml +++ b/xml/System.Runtime.Serialization/DataContractResolver.xml @@ -53,21 +53,21 @@ Provides a mechanism for dynamically mapping types to and from representations during serialization and deserialization. - [!WARNING] -> Only use if you are completely sure of what information is being serialized. Malicious types can cause unexpected behavior. - - - -## Examples - The following example shows how to derive a class from . For a working sample, see [DataContractResolver](/dotnet/framework/wcf/samples/datacontractresolver). - - :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractresolver/cs/datacontractresolver.cs" id="Snippet2"::: - +> Only use if you are completely sure of what information is being serialized. Malicious types can cause unexpected behavior. + + + +## Examples + The following example shows how to derive a class from . For a working sample, see [DataContractResolver](/dotnet/framework/wcf/samples/datacontractresolver). + + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractresolver/cs/datacontractresolver.cs" id="Snippet2"::: + ]]> @@ -185,18 +185,18 @@ Override this method to map the specified name and namespace to a data contract type during deserialization. The type the name and namespace is mapped to. - method. - - :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractresolver/cs/datacontractresolver.cs" id="Snippet0"::: - + method. + + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractresolver/cs/datacontractresolver.cs" id="Snippet0"::: + ]]> @@ -279,18 +279,18 @@ if mapping succeeded; otherwise, . - method. - - :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractresolver/cs/datacontractresolver.cs" id="Snippet1"::: - + method. + + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractresolver/cs/datacontractresolver.cs" id="Snippet1"::: + ]]> diff --git a/xml/System.Runtime.Serialization/DataContractSerializer.xml b/xml/System.Runtime.Serialization/DataContractSerializer.xml index e681953e3c9..56e119fabf0 100644 --- a/xml/System.Runtime.Serialization/DataContractSerializer.xml +++ b/xml/System.Runtime.Serialization/DataContractSerializer.xml @@ -416,7 +416,7 @@ that specifies the type to serialize or deserialize as well as the XML name and namespace to read from or write to the XML document. The code also creates an instance of a to contain the known types used during serialization or deserialization. + The following example creates an instance of the that specifies the type to serialize or deserialize as well as the XML name and namespace to read from or write to the XML document. The code also creates an instance of a to contain the known types used during serialization or deserialization. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractserializer/cs/source.cs" id="Snippet12"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/datacontractserializer/vb/source.vb" id="Snippet12"::: @@ -485,7 +485,7 @@ that specifies the type to serialize or deserialize as well as the XML name and namespace (as objects) to read from or write to the XML document. The code also creates an instance of a to contain the known types used during serialization or deserialization. + The following example creates an instance of the that specifies the type to serialize or deserialize as well as the XML name and namespace (as objects) to read from or write to the XML document. The code also creates an instance of a to contain the known types used during serialization or deserialization. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractserializer/cs/source.cs" id="Snippet13"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/datacontractserializer/vb/source.vb" id="Snippet13"::: @@ -537,7 +537,7 @@ that specifies the type to serialize or deserialize and an instance of a to contain the known types used during serialization or deserialization. The code also sets the `ignoreExtensionDataObject` and `preserveObjectReferences` parameters to `true`, and specifies an implementation of the interface to handle legacy types (types that do not have the attribute applied). For more information, see the documentation. + The following example creates an instance of the that specifies the type to serialize or deserialize and an instance of a to contain the known types used during serialization or deserialization. The code also sets the `ignoreExtensionDataObject` and `preserveObjectReferences` parameters to `true`, and specifies an implementation of the interface to handle legacy types (types that do not have the attribute applied). For more information, see the documentation. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractserializer/cs/source.cs" id="Snippet14"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/datacontractserializer/vb/source.vb" id="Snippet14"::: @@ -649,7 +649,7 @@ that specifies the type to serialize or deserialize, the root XML element and namespace, and an instance of a that contains the types used during deserialization. The code also sets the `ignoreExtensionDataObject` and `preserveObjectReferences` parameters to `true`, and specifies an implementation of the interface to handle legacy types (types that do not have the attribute applied). For more information, see the documentation. + The following example creates an instance of the that specifies the type to serialize or deserialize, the root XML element and namespace, and an instance of a that contains the types used during deserialization. The code also sets the `ignoreExtensionDataObject` and `preserveObjectReferences` parameters to `true`, and specifies an implementation of the interface to handle legacy types (types that do not have the attribute applied). For more information, see the documentation. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractserializer/cs/source.cs" id="Snippet15"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/datacontractserializer/vb/source.vb" id="Snippet15"::: @@ -711,7 +711,7 @@ that specifies the type to serialize or deserialize, the root XML element and namespace (as parameters), and an instance of a that contains the types used during deserialization. The code also sets the `ignoreExtensionDataObject` and `preserveObjectReferences` parameters to `true`, and specifies an implementation of the interface to handle legacy types (types that do not have the attribute applied). For more information, see the documentation. + The following example creates an instance of the that specifies the type to serialize or deserialize, the root XML element and namespace (as parameters), and an instance of a that contains the types used during deserialization. The code also sets the `ignoreExtensionDataObject` and `preserveObjectReferences` parameters to `true`, and specifies an implementation of the interface to handle legacy types (types that do not have the attribute applied). For more information, see the documentation. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractserializer/cs/source.cs" id="Snippet16"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/datacontractserializer/vb/source.vb" id="Snippet16"::: @@ -1032,7 +1032,7 @@ determines whether it can read an object by checking that it is positioned on an XML element. It also examines the name and namespace of the XML element that the reader is positioned at and compares the values to the expected name and namespace. The expected name and namespace can be set with the following: the data contract name and namespace of the type passed into the constructor, or the `rootName` and `rootNamespace` values passed into the constructor (if present). + The determines whether it can read an object by checking that it is positioned on an XML element. It also examines the name and namespace of the XML element that the reader is positioned at and compares the values to the expected name and namespace. The expected name and namespace can be set with the following: the data contract name and namespace of the type passed into the constructor, or the `rootName` and `rootNamespace` values passed into the constructor (if present). @@ -1148,7 +1148,7 @@ property provides the set of known types that are used for serialization and deserialization. For example, if an instance of the class contains instances of a `Person` class, add the `Person` type to an instance of the class and use the instance to construct an instance of the . If you know of other types to add to the , then add those types to the collection. + The property provides the set of known types that are used for serialization and deserialization. For example, if an instance of the class contains instances of a `Person` class, add the `Person` type to an instance of the class and use the instance to construct an instance of the . If you know of other types to add to the , then add those types to the collection. ]]> @@ -1216,7 +1216,7 @@ OperationDescription operation = host.Description.Endpoints[0].Contract.Operatio operation.Behaviors.Find().MaxItemsInObjectGraph = 3; ``` - The property specifies the maximum number of objects that the serializer serializes or deserializes in a single method call. (The method always reads one root object, but this object may have other objects in its data members. Those objects may have other objects, and so on.) The default is . Note that when serializing or deserializing arrays, every array entry counts as a separate object. Also, note that some objects may have a large memory representation and so this quota alone may not be sufficient to prevent Denial of Service attacks. For more information, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). If you need to increase this quota beyond its default value, it is important to do so both on the sending (serializing) and receiving (deserializing) sides. It applies both when reading and writing data. + The property specifies the maximum number of objects that the serializer serializes or deserializes in a single method call. (The method always reads one root object, but this object may have other objects in its data members. Those objects may have other objects, and so on.) The default is . Note that when serializing or deserializing arrays, every array entry counts as a separate object. Also, note that some objects may have a large memory representation and so this quota alone may not be sufficient to prevent Denial of Service attacks. For more information, see [Security Considerations for Data](/dotnet/framework/wcf/feature-details/security-considerations-for-data). If you need to increase this quota beyond its default value, it is important to do so both on the sending (serializing) and receiving (deserializing) sides. It applies both when reading and writing data. ]]> @@ -1646,7 +1646,7 @@ operation.Behaviors.Find().MaxItemsInOb , and an instance of the class. The example uses the , , and methods to write the object data into the XML document. Making these calls is equivalent to making a single call of the method. For example, a user might make the calls separately to insert additional XML attributes into the XML after calling the method. + The following example creates an object to serialize, an instance of the , and an instance of the class. The example uses the , , and methods to write the object data into the XML document. Making these calls is equivalent to making a single call of the method. For example, a user might make the calls separately to insert additional XML attributes into the XML after calling the method. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractserializer/cs/source.cs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/datacontractserializer/vb/source.vb" id="Snippet7"::: @@ -1935,7 +1935,7 @@ operation.Behaviors.Find().MaxItemsInOb , and an instance of the class. The example uses the , , and methods to write the object data into the XML document. + The following example creates an object to serialize, an instance of the , and an instance of the class. The example uses the , , and methods to write the object data into the XML document. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractserializer/cs/source.cs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/datacontractserializer/vb/source.vb" id="Snippet7"::: @@ -2091,7 +2091,7 @@ operation.Behaviors.Find().MaxItemsInOb , and an instance of the class. The example uses the , , and methods to write the object data into the XML document. + The following example creates an object to serialize, an instance of the , and an instance of the class. The example uses the , , and methods to write the object data into the XML document. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/datacontractserializer/cs/source.cs" id="Snippet7"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/datacontractserializer/vb/source.vb" id="Snippet7"::: diff --git a/xml/System.Runtime.Serialization/ExtensionDataObject.xml b/xml/System.Runtime.Serialization/ExtensionDataObject.xml index d11abb6f659..bbae92ae7fa 100644 --- a/xml/System.Runtime.Serialization/ExtensionDataObject.xml +++ b/xml/System.Runtime.Serialization/ExtensionDataObject.xml @@ -53,7 +53,7 @@ ## Examples - The following code serializes an instance of a type (`PersonVersion2`) that is the second version of the serializable type (`Person`). The second version contains extra data (`ID` field) that is not present in the first version. The code then deserializes the XML document into a `Person` object, then immediately reserializes the object including the extra data. Finally, the code deserializes the new XML into a `PersonVersion2` object and writes the complete data to the console, proving that the data has made a round trip to and from an older version of the type. Note that the attribute must be applied with the and properties set to the same name and namespace as the original class. + The following code serializes an instance of a type (`PersonVersion2`) that is the second version of the serializable type (`Person`). The second version contains extra data (`ID` field) that is not present in the first version. The code then deserializes the XML document into a `Person` object, then immediately reserializes the object including the extra data. Finally, the code deserializes the new XML into a `PersonVersion2` object and writes the complete data to the console, proving that the data has made a round trip to and from an older version of the type. Note that the attribute must be applied with the and properties set to the same name and namespace as the original class. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/iunknownserializationdata/cs/iunknownserialization.cs" id="Snippet0"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/iunknownserializationdata/vb/iunknownserialization.vb" id="Snippet0"::: diff --git a/xml/System.Runtime.Serialization/Formatter.xml b/xml/System.Runtime.Serialization/Formatter.xml index 757bc903908..4ef660f817f 100644 --- a/xml/System.Runtime.Serialization/Formatter.xml +++ b/xml/System.Runtime.Serialization/Formatter.xml @@ -72,60 +72,60 @@ Provides base functionality for the common language runtime serialization formatters. - is the `abstract` base class for all runtime serialization formatters, and provides some helper methods for implementing the interface. The also manages queuing objects for serialization and generating IDs on a per-object basis. - + is the `abstract` base class for all runtime serialization formatters, and provides some helper methods for implementing the interface. The also manages queuing objects for serialization and generating IDs on a per-object basis. + ]]> - When you inherit from , you must override the following members: - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - -- - + When you inherit from , you must override the following members: + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + +- + - @@ -167,11 +167,11 @@ Initializes a new instance of the class. - for objects to serialize and a to generate IDs for them. - + for objects to serialize and a to generate IDs for them. + ]]> @@ -226,11 +226,11 @@ When overridden in a derived class, gets or sets the used with the current formatter. The used with the current formatter. - performs lookups for types from the type names passed during deserialization. If no is set, a default is used. - + performs lookups for types from the type names passed during deserialization. If no is set, a default is used. + ]]> @@ -280,11 +280,11 @@ When overridden in a derived class, gets or sets the used for the current serialization. The used for the current serialization. - is an indication of either the source of the bits being deserialized or the destination of the bits being serialized. It has no impact on default serialization, but is passed as an argument to and . - + is an indication of either the source of the bits being deserialized or the destination of the bits being serialized. It has no impact on default serialization, but is passed as an argument to and . + ]]> @@ -406,11 +406,11 @@ Returns the next object to serialize, from the formatter's internal work queue. The next object to serialize. - . The ID of the object is put into the `objID` parameter and the object is returned from the function. - + . The ID of the object is put into the `objID` parameter and the object is returned from the function. + ]]> The next object retrieved from the work queue did not have an assigned ID. @@ -459,11 +459,11 @@ Contains the used with the current formatter. - maintains a list of the objects that have been identified and the IDs that they were given. - + maintains a list of the objects that have been identified and the IDs that they were given. + ]]> @@ -510,11 +510,11 @@ Contains a of the objects left to serialize. - method are pushed on the queue. - + method are pushed on the queue. + ]]> @@ -564,11 +564,11 @@ Schedules an object for later serialization. The object ID assigned to the object. - obtains an ID for the object and puts it on the queue for later serialization if this is a new object ID. The schedule is a work queue of objects to serialize, and is held inside the formatter. If the object is already on the work queue, it will not be added a second time, but an exception will not be thrown either. - + obtains an ID for the object and puts it on the queue for later serialization if this is a new object ID. The schedule is a work queue of objects to serialize, and is held inside the formatter. If the object is already on the work queue, it will not be added a second time, but an exception will not be thrown either. + ]]> @@ -690,13 +690,13 @@ When overridden in a derived class, gets or sets the used with the current formatter. The used with the current formatter. - to look up implementations of that control the serialization of a particular type. - - If an object type has a matching surrogate, then serialization and deserialization are handed off to the surrogate even if the type implements the interface. - + to look up implementations of that control the serialization of a particular type. + + If an object type has a matching surrogate, then serialization and deserialization are handed off to the surrogate even if the type implements the interface. + ]]> @@ -1250,11 +1250,11 @@ The object to write to the stream attached to the formatter. Inspects the type of data received, and calls the appropriate method to perform the write to the stream already attached to the formatter. - method, method, method, and so on) should have the appropriate functionality. - + method, method, method, and so on) should have the appropriate functionality. + ]]> @@ -1313,11 +1313,11 @@ The type of object the reference points to. When overridden in a derived class, writes an object reference to the stream already attached to the formatter. - diff --git a/xml/System.Runtime.Serialization/FormatterConverter.xml b/xml/System.Runtime.Serialization/FormatterConverter.xml index efbde7226c7..d41f6cec504 100644 --- a/xml/System.Runtime.Serialization/FormatterConverter.xml +++ b/xml/System.Runtime.Serialization/FormatterConverter.xml @@ -260,11 +260,11 @@ Converts a value to a . The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and .) - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and .) + ]]> The parameter is . @@ -316,11 +316,11 @@ Converts a value to an 8-bit unsigned integer. The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , and . + ]]> The parameter is . @@ -372,11 +372,11 @@ Converts a value to a Unicode character. The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . @@ -428,11 +428,11 @@ Converts a value to a . The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . @@ -484,11 +484,11 @@ Converts a value to a . The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . @@ -540,11 +540,11 @@ Converts a value to a double-precision floating-point number. The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . @@ -596,11 +596,11 @@ Converts a value to a 16-bit signed integer. The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . @@ -652,11 +652,11 @@ Converts a value to a 32-bit signed integer. The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . @@ -708,11 +708,11 @@ Converts a value to a 64-bit signed integer. The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . @@ -770,11 +770,11 @@ Converts a value to a . The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . @@ -826,11 +826,11 @@ Converts a value to a single-precision floating-point number. The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . @@ -889,11 +889,11 @@ Converts the specified object to a . The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . @@ -951,11 +951,11 @@ Converts a value to a 16-bit unsigned integer. The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . @@ -1013,11 +1013,11 @@ Converts a value to a 32-bit unsigned integer. The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . @@ -1075,11 +1075,11 @@ Converts a value to a 64-bit unsigned integer. The converted or if the parameter is . - ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . - + ). To use the current culture or to specify a culture, use the method instead. For more information, see , , and . + ]]> The parameter is . diff --git a/xml/System.Runtime.Serialization/FormatterServices.xml b/xml/System.Runtime.Serialization/FormatterServices.xml index 47933ddbaca..25574513bf1 100644 --- a/xml/System.Runtime.Serialization/FormatterServices.xml +++ b/xml/System.Runtime.Serialization/FormatterServices.xml @@ -187,7 +187,7 @@ method extracts the value associated with the `obj` object, and returns it. The length of the returned array is the same as the length of the `members` array. + For each supplied member of the `members` array the method extracts the value associated with the `obj` object, and returns it. The length of the returned array is the same as the length of the `members` array. ]]> @@ -256,9 +256,9 @@ should only be used for deserialization when the user intends to immediately populate all fields. It does not create an uninitialized string, since creating an empty instance of an immutable type serves no purpose. + Because the new instance of the object is initialized to zero and no constructors are run, the object might not represent a state that is regarded as valid by that object. should only be used for deserialization when the user intends to immediately populate all fields. It does not create an uninitialized string, since creating an empty instance of an immutable type serves no purpose. - converts all class level [Link Demands](/dotnet/framework/misc/link-demands) to [Demands](https://msdn.microsoft.com/library/e5283e28-2366-4519-b27d-ef5c1ddc1f48) to ensure that all direct and indirect callers have the permissions that the demand specifies. Use to increase the level of security when deserializing from a partially trusted source. For better performance in full trust scenarios, use . + converts all class level [Link Demands](/dotnet/framework/misc/link-demands) to [Demands](https://msdn.microsoft.com/library/e5283e28-2366-4519-b27d-ef5c1ddc1f48) to ensure that all direct and indirect callers have the permissions that the demand specifies. Use to increase the level of security when deserializing from a partially trusted source. For better performance in full trust scenarios, use . ]]> @@ -338,7 +338,7 @@ ## Remarks Generally, the serializable members of a class are non-transient, non-static members such as fields and properties. To be included, properties must have both a getter and a setter. A class that implements the interface or has a serialization surrogate does not have to serialize all these members, or can serialize additional members. -Because the `GetSerializableMembers` method calls the method, it does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned. +Because the `GetSerializableMembers` method calls the method, it does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned. ]]> @@ -414,7 +414,7 @@ Because the `GetSerializableMembers` method calls the enumeration value, transient fields are also included in the array returned by this method. -Because the `GetSerializableMembers` method calls the method, it does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned. +Because the `GetSerializableMembers` method calls the method, it does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned. ]]> @@ -608,7 +608,7 @@ Because the `GetSerializableMembers` method calls the [!NOTE] -> You cannot use the method to create instances of types that derive from the class. +> You cannot use the method to create instances of types that derive from the class. ]]> @@ -680,7 +680,7 @@ Because the `GetSerializableMembers` method calls the does not write anything to that field. + If an element in `data` is `null`, does not write anything to that field. ]]> diff --git a/xml/System.Runtime.Serialization/IDataContractSurrogate.xml b/xml/System.Runtime.Serialization/IDataContractSurrogate.xml index b576c1034d2..4125a265ab6 100644 --- a/xml/System.Runtime.Serialization/IDataContractSurrogate.xml +++ b/xml/System.Runtime.Serialization/IDataContractSurrogate.xml @@ -135,7 +135,7 @@ method. + The following example shows an implementation of the method. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/idatacontractsurrogate/cs/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/idatacontractsurrogate/vb/source.vb" id="Snippet1"::: @@ -178,7 +178,7 @@ ## Examples - The following example shows an implementation of the method. + The following example shows an implementation of the method. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/idatacontractsurrogate/cs/source.cs" id="Snippet3"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/idatacontractsurrogate/vb/source.vb" id="Snippet3"::: @@ -213,7 +213,7 @@ method. + This method is required during schema export or schema import only if annotations are inserted into the schema using the method. ]]> @@ -253,7 +253,7 @@ ## Examples - The following example shows an implementation of the method. + The following example shows an implementation of the method. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/idatacontractsurrogate/cs/source.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/idatacontractsurrogate/vb/source.vb" id="Snippet2"::: @@ -298,7 +298,7 @@ ## Examples - The following example shows an implementation of the method. + The following example shows an implementation of the method. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/idatacontractsurrogate/cs/source.cs" id="Snippet4"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/idatacontractsurrogate/vb/source.vb" id="Snippet4"::: diff --git a/xml/System.Runtime.Serialization/IFormatter.xml b/xml/System.Runtime.Serialization/IFormatter.xml index faacfbda3d0..fa37c526c14 100644 --- a/xml/System.Runtime.Serialization/IFormatter.xml +++ b/xml/System.Runtime.Serialization/IFormatter.xml @@ -53,13 +53,13 @@ Provides functionality for formatting serialized objects. - architecture. - - Objects controlling their own serialization can do so by implementing the interface. In order for an object to be serialized, you must mark that object as being serializable. You can do this by applying the serializable attribute to a class. If any object in the graph is not serializable, serialization will fail. - + architecture. + + Objects controlling their own serialization can do so by implementing the interface. In order for an object to be serialized, you must mark that object as being serializable. You can do this by applying the serializable attribute to a class. If any object in the graph is not serializable, serialization will fail. + ]]> @@ -110,13 +110,13 @@ Gets or sets the that performs type lookups during deserialization. The that performs type lookups during deserialization. - method on the . This method resolves these parameters to a object. The binder can find a at deserialization time that is in a different assembly than it was at serialization time. - - Setting this property has no effect during serialization. - + method on the . This method resolves these parameters to a object. The binder can find a at deserialization time that is in a different assembly than it was at serialization time. + + Setting this property has no effect during serialization. + ]]> @@ -160,11 +160,11 @@ Gets or sets the used for serialization and deserialization. The used for serialization and deserialization. - or . The indicates the destination (during serialization) or the source (during deserialization) of the data. An object implementing can alter the data that it transmits depending on value of the . - + or . The indicates the destination (during serialization) or the source (during deserialization) of the data. An object implementing can alter the data that it transmits depending on value of the . + ]]> @@ -230,13 +230,13 @@ Deserializes the data on the provided stream and reconstitutes the graph of objects. The top object of the deserialized graph. - method reads graph information from the stream and reconstructs a clone of the original graph. The topology of the graph is preserved. - - The deserialization process allocates an empty object of the appropriate type and repopulates its fields from the data transmitted in the `serializationStream` stream. It is important to note that no constructor is ever called on the object during deserialization. - + method reads graph information from the stream and reconstructs a clone of the original graph. The topology of the graph is preserved. + + The deserialization process allocates an empty object of the appropriate type and repopulates its fields from the data transmitted in the `serializationStream` stream. It is important to note that no constructor is ever called on the object during deserialization. + ]]> XML and SOAP Serialization @@ -300,13 +300,13 @@ The object, or root of the object graph, to serialize. All child objects of this root object are automatically serialized. Serializes an object, or graph of objects with the given root to the provided stream. - method automatically serializes the provided objects, and all objects connected to it, to the provided stream. - - By default, the serialization process records an object's state by gathering the values of all its fields (public and private). These fields are saved to the stream along with information about the object such as the name qualified by the assembly for its type. - + method automatically serializes the provided objects, and all objects connected to it, to the provided stream. + + By default, the serialization process records an object's state by gathering the values of all its fields (public and private). These fields are saved to the stream along with information about the object such as the name qualified by the assembly for its type. + ]]> XML and SOAP Serialization @@ -352,11 +352,11 @@ Gets or sets the used by the current formatter. The used by this formatter. - allows the user to specify an object best suited to handle the serialization of a particular object or class of objects. Think of it as an implementation of but provided by a different object. - + allows the user to specify an object best suited to handle the serialization of a particular object or class of objects. Think of it as an implementation of but provided by a different object. + ]]> diff --git a/xml/System.Runtime.Serialization/IObjectReference.xml b/xml/System.Runtime.Serialization/IObjectReference.xml index 07ae90e8bd4..9b8bed2141e 100644 --- a/xml/System.Runtime.Serialization/IObjectReference.xml +++ b/xml/System.Runtime.Serialization/IObjectReference.xml @@ -109,13 +109,13 @@ Returns the real object that should be deserialized, rather than the object that the serialized stream specifies. The actual object that is put into the graph. - method. At this point, the proxy-creator object creates a new instance of the proxy object that refers back to the original actual object, perhaps on a remote computer. Finally, the proxy-creator object is discarded and reclaimed later by garbage collection. - - For example, consider how objects are serialized. Instead of transmitting the data from the object, the system transmits a holder object with the name of the type object and information on the assembly where it is found in an object implementing . When both the type name and assembly name are available, the deserialization infrastructure calls on the holder object that has been transmitted. This holder returns the object that is inserted into the graph. - + method. At this point, the proxy-creator object creates a new instance of the proxy object that refers back to the original actual object, perhaps on a remote computer. Finally, the proxy-creator object is discarded and reclaimed later by garbage collection. + + For example, consider how objects are serialized. Instead of transmitting the data from the object, the system transmits a holder object with the name of the type object and information on the assembly where it is found in an object implementing . When both the type name and assembly name are available, the deserialization infrastructure calls on the holder object that has been transmitted. This holder returns the object that is inserted into the graph. + ]]> The caller does not have the required permission. The call will not work on a medium trusted server. diff --git a/xml/System.Runtime.Serialization/ISafeSerializationData.xml b/xml/System.Runtime.Serialization/ISafeSerializationData.xml index 83ede18a4fb..f29d89dc147 100644 --- a/xml/System.Runtime.Serialization/ISafeSerializationData.xml +++ b/xml/System.Runtime.Serialization/ISafeSerializationData.xml @@ -51,9 +51,9 @@ method. Starting with .NET Framework 4.0, that method is marked with the attribute, which prevents execution in security-transparent code. To work around this condition, implement the interface and add custom data as shown in the example below. + In versions previous to.NET Framework 4.0, serialization of custom user data in a security transparent code was accomplished using the method. Starting with .NET Framework 4.0, that method is marked with the attribute, which prevents execution in security-transparent code. To work around this condition, implement the interface and add custom data as shown in the example below. - The method is called after serialization, and uses the to restore the custom data. + The method is called after serialization, and uses the to restore the custom data. ]]> diff --git a/xml/System.Runtime.Serialization/ISerializable.xml b/xml/System.Runtime.Serialization/ISerializable.xml index 0ca5b719ca2..f12da19c41d 100644 --- a/xml/System.Runtime.Serialization/ISerializable.xml +++ b/xml/System.Runtime.Serialization/ISerializable.xml @@ -66,28 +66,28 @@ Allows an object to control its own serialization and deserialization through binary and XML serialization. - . If a class needs to control its binary or XML serialization process, it can implement the interface. The calls the at serialization time and populates the supplied with all the data required to represent the object. The creates a with the type of the object in the graph. Objects that need to send proxies for themselves can use the and methods on to change the transmitted information. - - In the case of class inheritance, it is possible to serialize a class that derives from a base class that implements . In this case, the derived class should call the base class implementation of inside its implementation of . Otherwise, the data from the base class will not be serialized. - - The interface implies a constructor with the signature `constructor (SerializationInfo information, StreamingContext context)`. At deserialization time, the current constructor is called only after the data in the has been deserialized by the formatter. In general, this constructor should be `protected` if the class is not `sealed`. - - The order in which objects are deserialized cannot be guaranteed. For example, if one type references a type that has not been deserialized yet, an exception will occur. If you are creating types that have such dependencies, you can work around the problem by implementing the `IDeserializationCallback` interface and the `OnDeserialization` method. - - The serialization architecture handles object types that extend the same as types that extend . These types can be marked with the and implement the interface as any other object type. Their object state will be captured and persisted onto the stream. - - When these types are being used through , the remoting infrastructure provides a surrogate that preempts typical serialization and instead serializes a proxy to the . A surrogate is a helper that knows how to serialize and deserialize objects of a particular type. The proxy, invisible to the user in most cases, will be of type . - - As a general design pattern, it would be unusual for a class to be both marked with the serializable attribute and extend . Developers should think carefully about the possible serialization and remoting scenarios when combining these two characteristics. One example where this might be applicable is with a . While the base class of () extends from , it is possible to capture the state of a and restore it at will. It might, therefore, be meaningful to serialize the state of this stream into a database and restore it at some later point in time. However, when used through remoting, an object of this type would be proxied. - + . If a class needs to control its binary or XML serialization process, it can implement the interface. The calls the at serialization time and populates the supplied with all the data required to represent the object. The creates a with the type of the object in the graph. Objects that need to send proxies for themselves can use the and methods on to change the transmitted information. + + In the case of class inheritance, it is possible to serialize a class that derives from a base class that implements . In this case, the derived class should call the base class implementation of inside its implementation of . Otherwise, the data from the base class will not be serialized. + + The interface implies a constructor with the signature `constructor (SerializationInfo information, StreamingContext context)`. At deserialization time, the current constructor is called only after the data in the has been deserialized by the formatter. In general, this constructor should be `protected` if the class is not `sealed`. + + The order in which objects are deserialized cannot be guaranteed. For example, if one type references a type that has not been deserialized yet, an exception will occur. If you are creating types that have such dependencies, you can work around the problem by implementing the `IDeserializationCallback` interface and the `OnDeserialization` method. + + The serialization architecture handles object types that extend the same as types that extend . These types can be marked with the and implement the interface as any other object type. Their object state will be captured and persisted onto the stream. + + When these types are being used through , the remoting infrastructure provides a surrogate that preempts typical serialization and instead serializes a proxy to the . A surrogate is a helper that knows how to serialize and deserialize objects of a particular type. The proxy, invisible to the user in most cases, will be of type . + + As a general design pattern, it would be unusual for a class to be both marked with the serializable attribute and extend . Developers should think carefully about the possible serialization and remoting scenarios when combining these two characteristics. One example where this might be applicable is with a . While the base class of () extends from , it is possible to capture the state of a and restore it at will. It might, therefore, be meaningful to serialize the state of this stream into a database and restore it at some later point in time. However, when used through remoting, an object of this type would be proxied. + For more information about serialization of classes that extend , see . For more information about implementing , see [Custom Serialization](/dotnet/standard/serialization/custom-serialization). > [!NOTE] > This interface does not apply to JSON serialization using . - + ]]> @@ -158,14 +158,14 @@ The destination (see ) for this serialization. Populates a with the data needed to serialize the target object. - are automatically tracked and serialized by the formatter. - + > [!NOTE] > It's not guaranteed that this method will be called only once per object instance during serialization. Therefore, the method should be implemented in such a way that its behavior will be the same regardless of the number of times it is called. - + ]]> The caller does not have the required permission. diff --git a/xml/System.Runtime.Serialization/ISerializationSurrogate.xml b/xml/System.Runtime.Serialization/ISerializationSurrogate.xml index be1119ccbd7..aac11b37e2c 100644 --- a/xml/System.Runtime.Serialization/ISerializationSurrogate.xml +++ b/xml/System.Runtime.Serialization/ISerializationSurrogate.xml @@ -107,13 +107,13 @@ The destination (see ) for this serialization. Populates the provided with the data needed to serialize the object. - `info` parameter. - + `info` parameter. + Having located the surrogate, this method stores information on the object `obj` in the `info` parameter. This information describes its view of that object, including the object's fields, properties, and current values. The might correspond to the actual object, or it can be a synthesized view of the surrogate. - + ]]> The caller does not have the required permission. @@ -182,11 +182,11 @@ Populates the object using the information in the . The populated deserialized object. - method is called during deserialization. With this method, you can take the empty `obj` that has already been created, and enter `info` data into that object. Constructors are not invoked during deserialization of information and reconstruction of the object. - + method is called during deserialization. With this method, you can take the empty `obj` that has already been created, and enter `info` data into that object. Constructors are not invoked during deserialization of information and reconstruction of the object. + ]]> The caller does not have the required permission. diff --git a/xml/System.Runtime.Serialization/ImportOptions.xml b/xml/System.Runtime.Serialization/ImportOptions.xml index 29664019bee..45f2c86cdd5 100644 --- a/xml/System.Runtime.Serialization/ImportOptions.xml +++ b/xml/System.Runtime.Serialization/ImportOptions.xml @@ -103,7 +103,7 @@ class, which provides a method to check whether it supports particular . + To support better code generation for different languages, information about what is supported by the target language needs to be passed to the schema importer. This is done by passing an instance of the class, which provides a method to check whether it supports particular . ]]> @@ -339,7 +339,7 @@ collection, that type will be used. For example, when importing schema that contains a list of integers, an array of integers will normally be generated. However, if the collection contains the of type integer, that type will be used instead of the array. + By default, an array will be generated when importing a collection schema (unless the schema has a special annotation that mentions a different type). However, if there is a matching type in the collection, that type will be used. For example, when importing schema that contains a list of integers, an array of integers will normally be generated. However, if the collection contains the of type integer, that type will be used instead of the array. ]]> diff --git a/xml/System.Runtime.Serialization/KnownTypeAttribute.xml b/xml/System.Runtime.Serialization/KnownTypeAttribute.xml index 661f3ff1c60..f804a743dd7 100644 --- a/xml/System.Runtime.Serialization/KnownTypeAttribute.xml +++ b/xml/System.Runtime.Serialization/KnownTypeAttribute.xml @@ -138,7 +138,7 @@ of objects. During serialization or deserialization, the types found in the collection can be used within the root type to which the attribute is applied. + This constructor uses a method name that matches a method of the class. The method returns a of objects. During serialization or deserialization, the types found in the collection can be used within the root type to which the attribute is applied. @@ -250,7 +250,7 @@ is applied to, must be static, must accept no parameters, and must return an instance of any type that implements the generic interface, such as the class, or an array of objects. + The method must exist on the class or structure that the is applied to, must be static, must accept no parameters, and must return an instance of any type that implements the generic interface, such as the class, or an array of objects. The method is called once per application domain when the data contract is loaded for the type. diff --git a/xml/System.Runtime.Serialization/NetDataContractSerializer.xml b/xml/System.Runtime.Serialization/NetDataContractSerializer.xml index ec298b120b1..8f3215c3092 100644 --- a/xml/System.Runtime.Serialization/NetDataContractSerializer.xml +++ b/xml/System.Runtime.Serialization/NetDataContractSerializer.xml @@ -560,9 +560,9 @@ determines whether it can read an object by examining the name and namespace of the XML element the reader is positioned at, and comparing the values to expected name and namespace. The expected name and namespace can be set with the following: the data contract name and namespace of the type passed into the constructor, or the `rootName` and `rootNamespace` values passed into the constructor (if present). + The determines whether it can read an object by examining the name and namespace of the XML element the reader is positioned at, and comparing the values to expected name and namespace. The expected name and namespace can be set with the following: the data contract name and namespace of the type passed into the constructor, or the `rootName` and `rootNamespace` values passed into the constructor (if present). - You can set the `rootName` and `rootNamespace` in the following constructors: , , and . + You can set the `rootName` and `rootNamespace` in the following constructors: , , and . ]]> @@ -712,7 +712,7 @@ ## Remarks The `verifyObjectName` parameter determines whether it can read an object by examining the name and namespace of the XML element the reader is positioned at, and comparing the values to expected name and namespace. The expected name and namespace can be set with the following: the data contract name and namespace of the type passed into the constructor, or the `rootName` and `rootNamespace` values passed into the constructor (if present). - You can set the `rootName` and `rootNamespace` in the following constructors: , , and . + You can set the `rootName` and `rootNamespace` in the following constructors: , , and . [!INCLUDE [untrusted-data-method-note](~/includes/untrusted-data-method-note.md)] @@ -753,7 +753,7 @@ ## Remarks The `verifyObjectName` parameter determines whether it can read an object by examining the name and namespace of the XML element the reader is positioned at, and comparing the values to expected name and namespace. The expected name and namespace can be set with the following: the data contract name and namespace of the type passed into the constructor, or the `rootName` and `rootNamespace` values passed into the constructor (if present). - You can set the `rootName` and `rootNamespace` in the following constructors: , , and . + You can set the `rootName` and `rootNamespace` in the following constructors: , , and . [!INCLUDE [untrusted-data-method-note](~/includes/untrusted-data-method-note.md)] @@ -838,7 +838,7 @@ , , and methods are used in succession to write the complete serialization using the pattern: write start, write content, and write end. The three methods are also called by the method. + The , , and methods are used in succession to write the complete serialization using the pattern: write start, write content, and write end. The three methods are also called by the method. ]]> @@ -870,7 +870,7 @@ , and an instance of the class. The example uses the , , and methods to write the object data into the XML document. + The following example creates an object to serialize, an instance of the , and an instance of the class. The example uses the , , and methods to write the object data into the XML document. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/netdatacontractserializer/cs/source.cs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/netdatacontractserializer/vb/source.vb" id="Snippet5"::: @@ -948,7 +948,7 @@ , , and methods are used in succession to write the complete serialization using the pattern: write start, write content, and write end. The three methods are also called by the method. + The , , and methods are used in succession to write the complete serialization using the pattern: write start, write content, and write end. The three methods are also called by the method. ]]> @@ -982,7 +982,7 @@ , and an instance of the class. The example uses the , , and methods to write the object data into the XML document. + The following example creates an object to serialize, an instance of the , and an instance of the class. The example uses the , , and methods to write the object data into the XML document. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/netdatacontractserializer/cs/source.cs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/netdatacontractserializer/vb/source.vb" id="Snippet5"::: @@ -1062,7 +1062,7 @@ , and an instance of the class. The example uses the , , and methods to write the object data into the XML document. + The following example creates an object to serialize, an instance of the , and an instance of the class. The example uses the , , and methods to write the object data into the XML document. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/netdatacontractserializer/cs/source.cs" id="Snippet5"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/netdatacontractserializer/vb/source.vb" id="Snippet5"::: diff --git a/xml/System.Runtime.Serialization/ObjectIDGenerator.xml b/xml/System.Runtime.Serialization/ObjectIDGenerator.xml index a1f8101defc..c2ad3b35219 100644 --- a/xml/System.Runtime.Serialization/ObjectIDGenerator.xml +++ b/xml/System.Runtime.Serialization/ObjectIDGenerator.xml @@ -64,17 +64,17 @@ Generates IDs for objects. - keeps track of previously identified objects. When you ask for the ID of an object, the knows whether to return the existing ID, or generate and remember a new ID. - - The IDs are unique for the life of the instance. Generally, a life lasts as long as the that created it. Object IDs have meaning only within a given serialized stream, and are used for tracking which objects have references to others within the serialized object graph. - - Using a hash table, the retains which ID is assigned to which object. The object references, which uniquely identify each object, are addresses in the runtime garbage-collected heap. Object reference values can change during serialization, but the table is updated automatically so the information is correct. - - Object IDs are 64-bit numbers. Allocation starts from one, so zero is never a valid object ID. A formatter can choose a zero value to represent an object reference whose value is `null`. - + keeps track of previously identified objects. When you ask for the ID of an object, the knows whether to return the existing ID, or generate and remember a new ID. + + The IDs are unique for the life of the instance. Generally, a life lasts as long as the that created it. Object IDs have meaning only within a given serialized stream, and are used for tracking which objects have references to others within the serialized object graph. + + Using a hash table, the retains which ID is assigned to which object. The object references, which uniquely identify each object, are addresses in the runtime garbage-collected heap. Object reference values can change during serialization, but the table is updated automatically so the information is correct. + + Object IDs are 64-bit numbers. Allocation starts from one, so zero is never a valid object ID. A formatter can choose a zero value to represent an object reference whose value is `null`. + ]]> @@ -220,11 +220,11 @@ Determines whether an object has already been assigned an ID. The object ID of if previously known to the ; otherwise, zero. - differs from in that it never creates an ID for an object that has not already been seen by the . - + differs from in that it never creates an ID for an object that has not already been seen by the . + ]]> The parameter is . diff --git a/xml/System.Runtime.Serialization/ObjectManager.xml b/xml/System.Runtime.Serialization/ObjectManager.xml index 850cde0097b..e4c22b68f13 100644 --- a/xml/System.Runtime.Serialization/ObjectManager.xml +++ b/xml/System.Runtime.Serialization/ObjectManager.xml @@ -60,20 +60,20 @@ Keeps track of objects as they are deserialized. - queries the to determine whether a reference to an object in the serialized stream refers to an object that has already been deserialized (a backward reference), or to an object that has not yet been deserialized (a forward reference). If the reference in the serialized stream is a forward reference, then the can register a fixup with the . If the reference in the serialized stream is a backward reference, the immediately completes the reference. Fixup refers to the process of finalizing object references not already completed during the object deserialization process. After the required object has been deserialized, the will complete the reference. - - The follows a set of rules that dictate the fixup order. All objects that implement or have a can expect to have all the objects that they transmitted through available when the object tree is deserialized. However, a parent object cannot presume that all its child objects will be fully completed when it is fully deserialized. All child objects will be present but not all the grandchild objects will necessarily be present. If an object needs to take certain actions that depend on executing code on its child objects, it can delay these actions, implement the interface, and execute the code only when it is called back on this interface. - - - -## Examples - The following code example shows how to use the class to walk through an object graph, traversing to each object only once. - - :::code language="csharp" source="~/snippets/csharp/System.Runtime.Serialization/ObjectManager/ObjectManager.cs" id="Snippet1"::: - + queries the to determine whether a reference to an object in the serialized stream refers to an object that has already been deserialized (a backward reference), or to an object that has not yet been deserialized (a forward reference). If the reference in the serialized stream is a forward reference, then the can register a fixup with the . If the reference in the serialized stream is a backward reference, the immediately completes the reference. Fixup refers to the process of finalizing object references not already completed during the object deserialization process. After the required object has been deserialized, the will complete the reference. + + The follows a set of rules that dictate the fixup order. All objects that implement or have a can expect to have all the objects that they transmitted through available when the object tree is deserialized. However, a parent object cannot presume that all its child objects will be fully completed when it is fully deserialized. All child objects will be present but not all the grandchild objects will necessarily be present. If an object needs to take certain actions that depend on executing code on its child objects, it can delay these actions, implement the interface, and execute the code only when it is called back on this interface. + + + +## Examples + The following code example shows how to use the class to walk through an object graph, traversing to each object only once. + + :::code language="csharp" source="~/snippets/csharp/System.Runtime.Serialization/ObjectManager/ObjectManager.cs" id="Snippet1"::: + ]]> @@ -182,11 +182,11 @@ Performs all the recorded fixups. - ), or the default implementation. - + ), or the default implementation. + ]]> A fixup was not successfully completed. @@ -236,11 +236,11 @@ Returns the object with the specified object ID. The object with the specified object ID if it has been previously stored or if no such object has been registered. - method. - + method. + ]]> The parameter is less than or equal to zero. @@ -396,11 +396,11 @@ The ID of the object that the current array element will point to after fixup is completed. Records a fixup for one element in an array. - The or parameter is less than or equal to zero. @@ -453,11 +453,11 @@ The ID of the object the array elements will point to after fixup is completed. Records fixups for the specified elements in an array, to be executed later. - The or parameter is less than or equal to zero. @@ -510,11 +510,11 @@ The ID of the object required by . Records a fixup for an object member, to be executed later. - @@ -568,11 +568,11 @@ The ID of the object required by . Records a fixup for a member of an object, to be executed later. - The or parameter is less than or equal to zero. @@ -647,11 +647,11 @@ The ID of the object to register. Registers an object as it is deserialized, associating it with . - retains information about both the object and its ID. Later during deserialization, can be used to determine whether a particular object ID has already been deserialized, or whether it is a forward reference to an object that has not yet been deserialized. - + retains information about both the object and its ID. Later during deserialization, can be used to determine whether a particular object ID has already been deserialized, or whether it is a forward reference to an object that has not yet been deserialized. + ]]> The parameter is . @@ -719,11 +719,11 @@ The used if implements or has a . will be completed with any required fixup information and then passed to the required object when that object is completed. Registers an object as it is deserialized, associating it with , and recording the used with it. - retains the information about both the object and its ID. Later during deserialization, you can use to discover whether a particular object ID has already been deserialized, or if it is a forward reference to an object that has not yet been deserialized. - + retains the information about both the object and its ID. Later during deserialization, you can use to discover whether a particular object ID has already been deserialized, or if it is a forward reference to an object that has not yet been deserialized. + ]]> The parameter is . @@ -803,13 +803,13 @@ The field in the containing object where exists. This parameter has meaning only if is a value type. Registers a member of an object as it is deserialized, associating it with , and recording the . - because of the way fixups are performed on objects. The space to store the information for a is allocated inline with its containing object. However, when the is boxed to be registered with the , it loses the connection with its containing object. To guarantee that fixups occur in the instance of the stored in the containing object and not in the boxed instance, the retains some additional information. - - retains information about both the object and its ID. Later during deserialization, can be used to discover whether a particular object ID has already been deserialized, or whether it is a forward reference to an object not yet deserialized. - + because of the way fixups are performed on objects. The space to store the information for a is allocated inline with its containing object. However, when the is boxed to be registered with the , it loses the connection with its containing object. To guarantee that fixups occur in the instance of the stored in the containing object and not in the boxed instance, the retains some additional information. + + retains information about both the object and its ID. Later during deserialization, can be used to discover whether a particular object ID has already been deserialized, or whether it is a forward reference to an object not yet deserialized. + ]]> The parameter is . @@ -891,13 +891,13 @@ If is a and a member of an array, contains the index within that array where exists. is ignored if is not both a and a member of an array. Registers a member of an array contained in an object while it is deserialized, associating it with , and recording the . - because of the way fixups are performed on objects. The space to store the information for a is allocated inline with its containing object. However, when the is boxed to be registered with the , it loses the connection with its containing object. To guarantee that fixups occur in the instance of the stored in the containing object and not in the boxed instance, the retains some additional information. - - retains information about both the object and its ID. Later during deserialization, can be used to discover whether a particular object ID has already been deserialized, or whether it is a forward reference to an object not yet deserialized. - + because of the way fixups are performed on objects. The space to store the information for a is allocated inline with its containing object. However, when the is boxed to be registered with the , it loses the connection with its containing object. To guarantee that fixups occur in the instance of the stored in the containing object and not in the boxed instance, the retains some additional information. + + retains information about both the object and its ID. Later during deserialization, can be used to discover whether a particular object ID has already been deserialized, or whether it is a forward reference to an object not yet deserialized. + ]]> The parameter is . diff --git a/xml/System.Runtime.Serialization/SerializationException.xml b/xml/System.Runtime.Serialization/SerializationException.xml index e2b45f302ba..6b9056c1aa6 100644 --- a/xml/System.Runtime.Serialization/SerializationException.xml +++ b/xml/System.Runtime.Serialization/SerializationException.xml @@ -88,9 +88,9 @@ ## Remarks uses the `HRESULT` COR_E_SERIALIZATION with the value 0x8013150C. - uses the default implementation, which supports reference equality. + uses the default implementation, which supports reference equality. - For a list of initial property values for an instance of , see the constructors. + For a list of initial property values for an instance of , see the constructors. ]]> @@ -155,8 +155,8 @@ |Property|Condition| |--------------|---------------| -||`null`| -||Localized error message for .| +||`null`| +||Localized error message for .| ]]> @@ -215,8 +215,8 @@ |Property|Condition| |--------------|---------------| -||`null`| -||The `message` string.| +||`null`| +||The `message` string.| ]]> @@ -348,8 +348,8 @@ |Property|Value| |--------------|-----------| -||The inner exception reference.| -||The error message string.| +||The inner exception reference.| +||The error message string.| ]]> diff --git a/xml/System.Runtime.Serialization/SerializationInfo.xml b/xml/System.Runtime.Serialization/SerializationInfo.xml index d7b9dca77dd..270dfb8072e 100644 --- a/xml/System.Runtime.Serialization/SerializationInfo.xml +++ b/xml/System.Runtime.Serialization/SerializationInfo.xml @@ -75,9 +75,9 @@ method on either or populates the store with the name, type, and value of each piece of information it wants to serialize. During deserialization, the appropriate function can extract this information. + This class is used by objects with custom serialization behavior. The method on either or populates the store with the name, type, and value of each piece of information it wants to serialize. During deserialization, the appropriate function can extract this information. - Objects are added to the store at serialization time using the methods and extracted from the store at deserialization using the methods. + Objects are added to the store at serialization time using the methods and extracted from the store at deserialization using the methods. For more information about customizing serialization, see [Custom Serialization](/dotnet/standard/serialization/custom-serialization). @@ -1335,7 +1335,7 @@ End Sub is the same as the value returned by property of the assembly of the containing type. This is the assembly name that the formatter uses when serializing type information for this object. + The is the same as the value returned by property of the assembly of the containing type. This is the assembly name that the formatter uses when serializing type information for this object. The assembly name contains the name of the assembly, version, culture, and some security information about the object. @@ -1397,7 +1397,7 @@ End Sub is the same as what would be returned by calling the on . This is the type name the formatter uses when serializing type information for this object. + The is the same as what would be returned by calling the on . This is the type name the formatter uses when serializing type information for this object. Users who are changing the type to serialize (for example, to send a proxy for a particular type) will want to set the value of this property. @@ -2492,14 +2492,14 @@ End Sub is of the type requested (or one of its derived classes), that value is returned directly. Otherwise, is called to convert it to the appropriate type. + If the data stored in the is of the type requested (or one of its derived classes), that value is returned directly. Otherwise, is called to convert it to the appropriate type. - The value returned by the method can always be safely cast to the type specified in the `type` parameter. + The value returned by the method can always be safely cast to the type specified in the `type` parameter. ## Examples - The following code example demonstrates the use of the method: + The following code example demonstrates the use of the method: :::code language="csharp" source="~/snippets/csharp/System.Runtime.Serialization/SerializationInfo/GetValue/source.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/System.Runtime.Serialization/SerializationInfo/GetValue/source.vb" id="Snippet1"::: @@ -2749,7 +2749,7 @@ End Sub is responsible for setting the of the instance before passing it to . However, users who want to send proxies for their objects will need to change the type represented by this instance. Using the method is equivalent to setting both the and the . + The is responsible for setting the of the instance before passing it to . However, users who want to send proxies for their objects will need to change the type represented by this instance. Using the method is equivalent to setting both the and the . ]]> diff --git a/xml/System.Runtime.Serialization/SerializationInfoEnumerator.xml b/xml/System.Runtime.Serialization/SerializationInfoEnumerator.xml index 2e6e6ae6c51..0d19d46ce69 100644 --- a/xml/System.Runtime.Serialization/SerializationInfoEnumerator.xml +++ b/xml/System.Runtime.Serialization/SerializationInfoEnumerator.xml @@ -190,7 +190,7 @@ and go through each item until you reach the last element. + To initialize the enumerator, call and go through each item until you reach the last element. ]]> diff --git a/xml/System.Runtime.Serialization/SerializationObjectManager.xml b/xml/System.Runtime.Serialization/SerializationObjectManager.xml index 57b7b4f068f..7a55266dc10 100644 --- a/xml/System.Runtime.Serialization/SerializationObjectManager.xml +++ b/xml/System.Runtime.Serialization/SerializationObjectManager.xml @@ -50,11 +50,11 @@ Manages serialization processes at run time. This class cannot be inherited. - . The main difference is that the performs its tasks during serialization while the performs its tasks during deserialization. - + . The main difference is that the performs its tasks during serialization while the performs its tasks during deserialization. + ]]> @@ -138,11 +138,11 @@ Invokes the OnSerializing callback event if the type of the object has one; and registers the object for raising the OnSerialized event if the type of the object has one. - attribute to a method on the registered object. Similarly, the OnSerialized event is created by applying the attribute to a method on the registered object. - + attribute to a method on the registered object. Similarly, the OnSerialized event is created by applying the attribute to a method on the registered object. + ]]> @@ -202,11 +202,11 @@ The object to register. Registers the object upon which events will be raised. - method will be called on the registered object. - + method will be called on the registered object. + ]]> diff --git a/xml/System.Runtime.Serialization/StreamingContext.xml b/xml/System.Runtime.Serialization/StreamingContext.xml index 7f4b1b1fb0e..b05dc514716 100644 --- a/xml/System.Runtime.Serialization/StreamingContext.xml +++ b/xml/System.Runtime.Serialization/StreamingContext.xml @@ -319,7 +319,7 @@ and . + Two code groups are equivalent if they have the same and . ]]> diff --git a/xml/System.Runtime.Serialization/XPathQueryGenerator.xml b/xml/System.Runtime.Serialization/XPathQueryGenerator.xml index 2a1818a2823..df77aa56509 100644 --- a/xml/System.Runtime.Serialization/XPathQueryGenerator.xml +++ b/xml/System.Runtime.Serialization/XPathQueryGenerator.xml @@ -50,32 +50,32 @@ When given a class representing a data contract, and metadata representing a member of the contract, produces an XPath query for the member. - and as appropriate to the type and its fields or properties. - -2. Use the method of the class to generate the MemberInfo array. - -3. Pass the type and the array to the method. - -4. If needed, use the returned by the `namespaces` parameter to examine the XML namespaces referenced by the namespaces prefixes in the XPath query. - + and as appropriate to the type and its fields or properties. + +2. Use the method of the class to generate the MemberInfo array. + +3. Pass the type and the array to the method. + +4. If needed, use the returned by the `namespaces` parameter to examine the XML namespaces referenced by the namespaces prefixes in the XPath query. + > [!NOTE] -> The namespace prefix "xg" (for "XPath Generator") is used as the default in the XPath. This cannot be changed. Instead, refer to the NameTable collection to see what namespace the prefix is associated with. - - - -## Examples - The following example creates XPath queries from two classes to which the and attributes have been applied. - +> The namespace prefix "xg" (for "XPath Generator") is used as the default in the XPath. This cannot be changed. Instead, refer to the NameTable collection to see what namespace the prefix is associated with. + + + +## Examples + The following example creates XPath queries from two classes to which the and attributes have been applied. + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/xpathquerygenerator/cs/source.cs" id="Snippet0"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/xpathquerygenerator/vb/source.vb" id="Snippet0"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/xpathquerygenerator/vb/source.vb" id="Snippet0"::: + ]]> @@ -145,23 +145,23 @@ The XML namespaces and their prefixes found in the data contract. Creates an XPath from a data contract using the specified data contract type, array of metadata elements, and namespaces. - - + + The XPath generated from the type and member data. - and attributes have been applied. - + and attributes have been applied. + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/xpathquerygenerator/cs/source.cs" id="Snippet0"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/xpathquerygenerator/vb/source.vb" id="Snippet0"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/xpathquerygenerator/vb/source.vb" id="Snippet0"::: + ]]> @@ -231,8 +231,8 @@ The XML namespaces and their prefixes found in the data contract. Creates an XPath from a data contract using the specified contract data type, array of metadata elements, the top level element, and namespaces. - - + + The XPath generated from the type and member data. To be added. diff --git a/xml/System.Runtime.Serialization/XmlObjectSerializer.xml b/xml/System.Runtime.Serialization/XmlObjectSerializer.xml index ee0b8cae2f0..bded7c2aa59 100644 --- a/xml/System.Runtime.Serialization/XmlObjectSerializer.xml +++ b/xml/System.Runtime.Serialization/XmlObjectSerializer.xml @@ -54,19 +54,19 @@ Provides the base class used to serialize objects as XML streams or documents. This class is abstract. - to create your own serializer to serialize and deserialize objects. Both the class and the class inherit from the and are used to serialize and deserialize objects that conform to data contract rules (objects created using the and the ). - - - -## Examples - The following example shows a method named `WriteObjectWithInstance` that includes an as a parameter. The method serializes an object using either the or by calling the method. - + to create your own serializer to serialize and deserialize objects. Both the class and the class inherit from the and are used to serialize and deserialize objects that conform to data contract rules (objects created using the and the ). + + + +## Examples + The following example shows a method named `WriteObjectWithInstance` that includes an as a parameter. The method serializes an object using either the or by calling the method. + :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/xmlobjectserializer/cs/source.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/xmlobjectserializer/vb/source.vb" id="Snippet1"::: - + :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/xmlobjectserializer/vb/source.vb" id="Snippet1"::: + ]]> @@ -115,11 +115,11 @@ Initializes a new instance of the class. - @@ -132,13 +132,13 @@ Gets a value that specifies whether the serializer can read the object. - , the starting element is specified in the constructor of the extension class. For an example, see the constructors for the class. - + , the starting element is specified in the constructor of the extension class. For an example, see the constructors for the class. + ]]> @@ -199,13 +199,13 @@ if the reader can read the data; otherwise, . - implementation determines when to return `true`. Implementations may check that they are positioned on an element or look for an expected element name. One implementation of the , the , checks that it is positioned on an element and also checks that the element name is the top level expected name for the type currently being deserialized. - - If needed, additional attributes in the XML stream can be read while positioned on the top level element before reading XML contents using the method. - + implementation determines when to return `true`. Implementations may check that they are positioned on an element or look for an expected element name. One implementation of the , the , checks that it is positioned on an element and also checks that the element name is the top level expected name for the type currently being deserialized. + + If needed, additional attributes in the XML stream can be read while positioned on the top level element before reading XML contents using the method. + ]]> @@ -266,13 +266,13 @@ if the reader is positioned over the starting element; otherwise, . - , the starting element is specified in the constructor of the extension class. For an example, see the constructors for the class. - + , the starting element is specified in the constructor of the extension class. For an example, see the constructors for the class. + ]]> @@ -343,11 +343,11 @@ Reads the XML stream or document with a and returns the deserialized object. The deserialized object. - @@ -408,11 +408,11 @@ Reads the XML document or stream with an and returns the deserialized object. The deserialized object. - @@ -534,11 +534,11 @@ Reads the XML stream or document with an and returns the deserialized object; it also enables you to specify whether the serializer can read the data before attempting to read it. The deserialized object. - method to determine whether the element is the start of the object. - + method to determine whether the element is the start of the object. + ]]> @@ -602,11 +602,11 @@ Reads the XML document or stream with an and returns the deserialized object; it also enables you to specify whether the serializer can read the data before attempting to read it. The deserialized object. - method to determine whether the element is the start of the object. - + method to determine whether the element is the start of the object. + ]]> @@ -619,11 +619,11 @@ Writes the closing XML element to an XML stream or document. - , , and methods must be implemented. The three methods are used in succession to write the complete serialization using the pattern: write start, write content, and write end. Users can insert XML attributes during the writing of the object between the calls to and . The three methods are also called by the virtual implementation of the method. - + , , and methods must be implemented. The three methods are used in succession to write the complete serialization using the pattern: write start, write content, and write end. Users can insert XML attributes during the writing of the object between the calls to and . The three methods are also called by the virtual implementation of the method. + ]]> @@ -892,11 +892,11 @@ The object that contains the content to write. Writes the complete content (start, content, and end) of the object to the XML document or stream with the specified . - , , and methods. Because of this, this method is intended to be the most commonly used method on a serializer. - + , , and methods. Because of this, this method is intended to be the most commonly used method on a serializer. + ]]> the type being serialized does not conform to data contract rules. For example, the attribute has not been applied to the type. @@ -968,11 +968,11 @@ The object that contains the content to write. Writes the complete content (start, content, and end) of the object to the XML document or stream with the specified . - overload. - + overload. + ]]> the type being serialized does not conform to data contract rules. For example, the attribute has not been applied to the type. @@ -988,11 +988,11 @@ Writes only the content of an object to an XML document or stream. - , , and methods must be implemented. The three methods are used in succession to write the complete serialization using the pattern: write start, write content, and write end. If the implementation writes using XML elements, attributes can be inserted before writing the contents of the object. The three methods are also called by the virtual implementation of the method. - + , , and methods must be implemented. The three methods are used in succession to write the complete serialization using the pattern: write start, write content, and write end. If the implementation writes using XML elements, attributes can be inserted before writing the contents of the object. The three methods are also called by the virtual implementation of the method. + ]]> @@ -1143,11 +1143,11 @@ Writes only the starting XML element to an XML document or stream. - , , and methods must be implemented. The three methods are used in succession to write the complete serialization using the pattern: write start, write content, and write end. If the implementation writes using XML elements, attributes can be inserted before writing the contents of the object. The three methods are also called by the virtual implementation of the method. - + , , and methods must be implemented. The three methods are used in succession to write the complete serialization using the pattern: write start, write content, and write end. If the implementation writes using XML elements, attributes can be inserted before writing the contents of the object. The three methods are also called by the virtual implementation of the method. + ]]> diff --git a/xml/System.Runtime.Serialization/XmlSerializableServices.xml b/xml/System.Runtime.Serialization/XmlSerializableServices.xml index 5d8db1ed488..8ab73ae72c3 100644 --- a/xml/System.Runtime.Serialization/XmlSerializableServices.xml +++ b/xml/System.Runtime.Serialization/XmlSerializableServices.xml @@ -162,7 +162,7 @@ objects. It is a helper method used by the types that implement and that use the method. + This method reads all XML contained within the node the reader is positioned on when this call is made. This enables it to read and store all XML as an array of objects. It is a helper method used by the types that implement and that use the method. ]]> diff --git a/xml/System.Runtime.Serialization/XsdDataContractExporter.xml b/xml/System.Runtime.Serialization/XsdDataContractExporter.xml index d217f4dc007..8be7a92b6e2 100644 --- a/xml/System.Runtime.Serialization/XsdDataContractExporter.xml +++ b/xml/System.Runtime.Serialization/XsdDataContractExporter.xml @@ -53,7 +53,7 @@ For more information about this API, see Supplemental API remarks for XsdDataContractExporter. and calls the method. +The following example creates an instance of the and calls the method. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/xsddatacontractexporter/cs/overview.cs" id="Snippet0"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/xsddatacontractexporter/vb/overview.vb" id="Snippet0"::: @@ -155,7 +155,7 @@ The following example creates an instance of the to which you want to add new schemas. After you construct a with this overload, call the method to add new types to the existing set. + Use this overload when you have an existing to which you want to add new schemas. After you construct a with this overload, call the method to add new types to the existing set. ]]> @@ -348,7 +348,7 @@ The following example creates an instance of the method before calling the method. + The following example calls the method before calling the method. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/xsddatacontractexporter/cs/overview.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/xsddatacontractexporter/vb/overview.vb" id="Snippet1"::: @@ -369,9 +369,9 @@ The following example creates an instance of the overloads to determine whether the specified type or set of types can be exported. + As a recommended practice, use one of the overloads to determine whether the specified type or set of types can be exported. - After calling the method, retrieve the schemas from the property. + After calling the method, retrieve the schemas from the property. ]]> @@ -544,7 +544,7 @@ The following example creates an instance of the to determine whether the type can be exported. After calling the method, the schema can be retrieved through the property. + Call the to determine whether the type can be exported. After calling the method, the schema can be retrieved through the property. ]]> @@ -677,7 +677,7 @@ The following example creates an instance of the . This method returns the definition for such types. The types for which the method returns a valid name, this method returns `null`. + The main purpose of this method is to allow anonymous types in XML schema to be represented. Because anonymous types do not have a contract name and namespace, they cannot be looked up using the . This method returns the definition for such types. The types for which the method returns a valid name, this method returns `null`. ]]> diff --git a/xml/System.Runtime.Serialization/XsdDataContractImporter.xml b/xml/System.Runtime.Serialization/XsdDataContractImporter.xml index ecca5cbb5b6..73efc6e3c57 100644 --- a/xml/System.Runtime.Serialization/XsdDataContractImporter.xml +++ b/xml/System.Runtime.Serialization/XsdDataContractImporter.xml @@ -40,7 +40,7 @@ Web service, or to create data contract types from XML schemas. will transform a set of XML schemas and create the .NET Framework types that represent the data contract in a selected programming language. To create the code, use the classes in the namespace. - + Conversely, use the class when you have created a Web service that incorporates data represented by CLR types and when you need to export XML schemas for each data type to be consumed by other Web services.That is, transforms a set of CLR types into a set of XML schemas. @@ -117,7 +117,7 @@ ## Examples - The following example creates an and calls the method to create a . The is then used to create both Visual C# and Visual Basic code files. + The following example creates an and calls the method to create a . The is then used to create both Visual C# and Visual Basic code files. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/xsddatacontractimporter/cs/xsddatacontractimporterexample.cs" id="Snippet1"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/xsddatacontractimporter/vb/xsddatacontractimporterexample.vb" id="Snippet1"::: @@ -183,7 +183,7 @@ method to determine whether the can be generated. + The following example calls the method to determine whether the can be generated. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/xsddatacontractimporter/cs/xsddatacontractimporterexample.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/xsddatacontractimporter/vb/xsddatacontractimporterexample.vb" id="Snippet2"::: @@ -430,7 +430,7 @@ method. The contains the name of the generated type and can be used to look up the corresponding in the . + Use this method to look up the reference to a generated CLR type after calling the method. The contains the name of the generated type and can be used to look up the corresponding in the . ]]> @@ -477,7 +477,7 @@ . The element is passed in so that this importer can look up the element-level information and return the correct type reference accordingly. + The schema element is needed for data about the type that is specified at the element scope. The main example of this is the XSD attribute `nillable`. In schema, setting `nillable` to `true` is specified on the containing schema element whereas the concept of null is expressed in the CLR type . The element is passed in so that this importer can look up the element-level information and return the correct type reference accordingly. When importing WSDL, each parameter is imported separately and therefore the parameter elements need to be passed in separately. @@ -588,7 +588,7 @@ method to test whether a set of schemas can be imported. If the method returns `true`, the code invokes the method. + The following example uses the method to test whether a set of schemas can be imported. If the method returns `true`, the code invokes the method. :::code language="csharp" source="~/snippets/csharp/VS_Snippets_CFX/xsddatacontractimporter/cs/xsddatacontractimporterexample.cs" id="Snippet2"::: :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CFX/xsddatacontractimporter/vb/xsddatacontractimporterexample.vb" id="Snippet2"::: diff --git a/xml/System.Runtime.Versioning/ComponentGuaranteesAttribute.xml b/xml/System.Runtime.Versioning/ComponentGuaranteesAttribute.xml index f93d5080eb4..9b2276f7da6 100644 --- a/xml/System.Runtime.Versioning/ComponentGuaranteesAttribute.xml +++ b/xml/System.Runtime.Versioning/ComponentGuaranteesAttribute.xml @@ -157,7 +157,7 @@ property corresponds to the `guarantees` parameter of the constructor. + The value of the property corresponds to the `guarantees` parameter of the constructor. ]]> diff --git a/xml/System.Runtime.Versioning/FrameworkName.xml b/xml/System.Runtime.Versioning/FrameworkName.xml index 5550c0ab821..19d8f1dee01 100644 --- a/xml/System.Runtime.Versioning/FrameworkName.xml +++ b/xml/System.Runtime.Versioning/FrameworkName.xml @@ -130,7 +130,7 @@ constructor parses a string in the following format. + The constructor parses a string in the following format. `*identifier*,Version=*versionNumber*[,Profile=*profileName*]` @@ -148,11 +148,11 @@ - Any leading or trailing white space in the *identifier* component is removed and the resulting string is assigned to the property. -- Any leading or trailing white space and the initial "v" or "V", if present, are removed from the `versionNumber`. The returned string is then passed to the constructor, and the resulting object is assigned to the property. +- Any leading or trailing white space and the initial "v" or "V", if present, are removed from the `versionNumber`. The returned string is then passed to the constructor, and the resulting object is assigned to the property. - Any leading or trailing white space in the `profileName` component is removed and the resulting string is assigned to the property. - The following are examples of valid strings that can be passed to the constructor: + The following are examples of valid strings that can be passed to the constructor: - .NET Framework, Version=4.0 @@ -238,7 +238,7 @@ class requires that a object include at least a major and minor version number. + The class requires that a object include at least a major and minor version number. ]]> @@ -310,7 +310,7 @@ class requires that a object include at least a major and minor version number. + The class requires that a object include at least a major and minor version number. ]]> @@ -394,7 +394,7 @@ object and calls the overload to test for equality. If the conversion does not succeed or if `obj` is `null`, the method returns `false`. + The method converts `obj` to a object and calls the overload to test for equality. If the conversion does not succeed or if `obj` is `null`, the method returns `false`. ]]> @@ -468,7 +468,7 @@ - An ordinal comparison of the property values of the current instance and `other`. -- A comparison of the version properties by calling the method. +- A comparison of the version properties by calling the method. ]]> @@ -524,9 +524,9 @@ *identifier*, Version=*version*[, Profile=*profile*] - where *identifier* corresponds to the property, `version` is equivalent to calling on the value of the property, and `profile` corresponds to the property. If a profile has not been assigned to the object, the profile component is not included in the string. + where *identifier* corresponds to the property, `version` is equivalent to calling on the value of the property, and `profile` corresponds to the property. If a profile has not been assigned to the object, the profile component is not included in the string. - The value of the property is identical to the string returned by the method. + The value of the property is identical to the string returned by the method. ]]> @@ -630,7 +630,7 @@ property is set in the class constructor. + The value of the read-only property is set in the class constructor. ]]> @@ -690,9 +690,9 @@ method defines the operation of the equality operator for objects. + The method defines the operation of the equality operator for objects. - Languages that do not support custom operators can call the method instead. + Languages that do not support custom operators can call the method instead. @@ -760,9 +760,9 @@ method defines the operation of the inequality operator for objects. + The method defines the operation of the inequality operator for objects. - Languages that do not support custom operators can test for inequality by calling the method and reversing its value. + Languages that do not support custom operators can test for inequality by calling the method and reversing its value. @@ -828,7 +828,7 @@ property is set in the class constructor. + The value of the read-only property is set in the class constructor. ]]> @@ -887,13 +887,13 @@ method has the following format: + The string returned by the method has the following format: *identifier*, Version=*version*[, Profile=*profile*] - where *identifier* corresponds to the property, `version` is equivalent to calling on the value of the property, and `profile` corresponds to the property. If a profile has not been assigned to the object, the profile component is not included in the returned string. + where *identifier* corresponds to the property, `version` is equivalent to calling on the value of the property, and `profile` corresponds to the property. If a profile has not been assigned to the object, the profile component is not included in the returned string. - The value returned by the method is identical to the value of the property. + The value returned by the method is identical to the value of the property. ]]> @@ -951,7 +951,7 @@ property is set in the class constructor. + The value of the read-only property is set in the class constructor. ]]> diff --git a/xml/System.Runtime.Versioning/TargetFrameworkAttribute.xml b/xml/System.Runtime.Versioning/TargetFrameworkAttribute.xml index d79ed990d27..f72c680d8c7 100644 --- a/xml/System.Runtime.Versioning/TargetFrameworkAttribute.xml +++ b/xml/System.Runtime.Versioning/TargetFrameworkAttribute.xml @@ -122,7 +122,7 @@ method. + The string that is assigned to the `frameworkName` parameter generally takes the same form as the string that is returned by the method. ]]> @@ -234,7 +234,7 @@ property maps to the `frameworkName` parameter of the constructor. It represents the .NET version in a compact form and typically corresponds to the string that is returned by the method. + The property maps to the `frameworkName` parameter of the constructor. It represents the .NET version in a compact form and typically corresponds to the string that is returned by the method. ]]> diff --git a/xml/System.Runtime/GCSettings.xml b/xml/System.Runtime/GCSettings.xml index 6dcebbfab75..7d37853b32e 100644 --- a/xml/System.Runtime/GCSettings.xml +++ b/xml/System.Runtime/GCSettings.xml @@ -274,7 +274,7 @@ For information about server garbage collection, see [Workstation and Server Gar ## Remarks You can reduce the level of intrusiveness of garbage collection in your application by setting the to during critical operations. After such operations are completed, return to a higher latency mode so that more objects can be reclaimed to increase memory. - Ordinarily, you set the value of the property to define the garbage collector's latency mode. However, you cannot set the no GC region latency mode by assigning the enumeration value to the property. Instead, you call the method to begin the no GC region latency mode, and you call the to end it. + Ordinarily, you set the value of the property to define the garbage collector's latency mode. However, you cannot set the no GC region latency mode by assigning the enumeration value to the property. Instead, you call the method to begin the no GC region latency mode, and you call the to end it. See [Latency Modes](/dotnet/standard/garbage-collection/latency) for a discussion of how the runtime configuration settings for garbage collection affect the default value of the enumeration. diff --git a/xml/System.Runtime/MemoryFailPoint.xml b/xml/System.Runtime/MemoryFailPoint.xml index f142f55ee61..880ffbe8d4e 100644 --- a/xml/System.Runtime/MemoryFailPoint.xml +++ b/xml/System.Runtime/MemoryFailPoint.xml @@ -50,35 +50,35 @@ Checks for sufficient memory resources before executing an operation. This class cannot be inherited. - [!NOTE] -> This class is intended for use in advanced development. - - Creating an instance of the class creates a memory gate. A memory gate checks for sufficient resources before initiating an activity that requires a large amount of memory. Failing the check results in an exception being thrown. This exception prevents an operation from being started and reduces the possibility of failure due to lack of resources. This enables you decrease performance to avoid an exception and any state corruption that may result from improper handling of the exception in arbitrary locations in your code. - +> This class is intended for use in advanced development. + + Creating an instance of the class creates a memory gate. A memory gate checks for sufficient resources before initiating an activity that requires a large amount of memory. Failing the check results in an exception being thrown. This exception prevents an operation from being started and reduces the possibility of failure due to lack of resources. This enables you decrease performance to avoid an exception and any state corruption that may result from improper handling of the exception in arbitrary locations in your code. + > [!IMPORTANT] -> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. - - By throwing an exception, an application can distinguish between an estimate that an operation will not be able to complete and a partially completed operation that may have corrupted the application state. This allows an application to reduce the frequency of a pessimistic escalation policy, which may require unloading the current or recycling the process. - - checks to see whether sufficient memory and consecutive virtual address space are available in all garbage collection heaps, and may increase the size of the swap file. makes no guarantees regarding the long-term availability of the memory during the lifetime of the gate, but callers should always use the method to ensure that resources associated with are released. - - To use a memory gate, you must create a object and specify the number of megabytes (MB) of memory that the next operation is expected to use. If enough memory is not available, an exception is thrown. - - The parameter of the constructor must be a positive integer. A negative value or 0 raises an exception. - - operates at a granularity of 16 MB. Any values smaller than 16 MB are treated as 16 MB, and other values are treated as the next largest multiple of 16 MB. - - - -## Examples - enables an application to slow itself to avoid running out of memory in a corrupting manner. It should be used within a lexical scope. The following example launches threads to process items in a work queue. Before each thread is launched, the available memory resources are checked using . If an exception is thrown, the main method waits until memory is available before launching the next thread. - - :::code language="csharp" source="~/snippets/csharp/System.Runtime/MemoryFailPoint/Overview/program.cs" id="Snippet1"::: - +> This type implements the interface. When you have finished using the type, you should dispose of it either directly or indirectly. To dispose of the type directly, call its method in a `try`/`catch` block. To dispose of it indirectly, use a language construct such as `using` (in C#) or `Using` (in Visual Basic). For more information, see the "Using an Object that Implements IDisposable" section in the interface topic. + + By throwing an exception, an application can distinguish between an estimate that an operation will not be able to complete and a partially completed operation that may have corrupted the application state. This allows an application to reduce the frequency of a pessimistic escalation policy, which may require unloading the current or recycling the process. + + checks to see whether sufficient memory and consecutive virtual address space are available in all garbage collection heaps, and may increase the size of the swap file. makes no guarantees regarding the long-term availability of the memory during the lifetime of the gate, but callers should always use the method to ensure that resources associated with are released. + + To use a memory gate, you must create a object and specify the number of megabytes (MB) of memory that the next operation is expected to use. If enough memory is not available, an exception is thrown. + + The parameter of the constructor must be a positive integer. A negative value or 0 raises an exception. + + operates at a granularity of 16 MB. Any values smaller than 16 MB are treated as 16 MB, and other values are treated as the next largest multiple of 16 MB. + + + +## Examples + enables an application to slow itself to avoid running out of memory in a corrupting manner. It should be used within a lexical scope. The following example launches threads to process items in a work queue. Before each thread is launched, the available memory resources are checked using . If an exception is thrown, the main method waits until memory is available before launching the next thread. + + :::code language="csharp" source="~/snippets/csharp/System.Runtime/MemoryFailPoint/Overview/program.cs" id="Snippet1"::: + ]]> @@ -128,18 +128,18 @@ The required memory size, in megabytes. This must be a positive value. Initializes a new instance of the class, specifying the amount of memory required for successful execution. - method to determine the amount of memory available before and after calling the method that processes the work item. See the class for a code example that dynamically determines the value for the `sizeInMegabytes` parameter. - - - -## Examples - The following example demonstrates how to determine the amount of memory a method requires when executing. This code example is part of a larger example provided for the class. - - :::code language="csharp" source="~/snippets/csharp/System.Runtime/MemoryFailPoint/Overview/program.cs" id="Snippet2"::: - + method to determine the amount of memory available before and after calling the method that processes the work item. See the class for a code example that dynamically determines the value for the `sizeInMegabytes` parameter. + + + +## Examples + The following example demonstrates how to determine the amount of memory a method requires when executing. This code example is part of a larger example provided for the class. + + :::code language="csharp" source="~/snippets/csharp/System.Runtime/MemoryFailPoint/Overview/program.cs" id="Snippet2"::: + ]]> The specified memory size is negative or 0. @@ -194,14 +194,14 @@ Releases all resources used by the . - when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). - + when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see [Cleaning Up Unmanaged Resources](/dotnet/standard/garbage-collection/unmanaged) and [Implementing a Dispose Method](/dotnet/standard/garbage-collection/implementing-dispose). + > [!NOTE] -> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method. - +> Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's `Finalize` method. + ]]> @@ -249,11 +249,11 @@ Ensures that resources are freed and other cleanup operations are performed when the garbage collector reclaims the object. - method when the current object is ready to be finalized. - + method when the current object is ready to be finalized. + ]]> diff --git a/xml/System.Runtime/ProfileOptimization.xml b/xml/System.Runtime/ProfileOptimization.xml index 2e696413129..a7475b113fd 100644 --- a/xml/System.Runtime/ProfileOptimization.xml +++ b/xml/System.Runtime/ProfileOptimization.xml @@ -40,23 +40,23 @@ Improves the startup performance of application domains in applications that require the just-in-time (JIT) compiler by performing background compilation of methods that are likely to be executed, based on profiles created during previous compilations. - [!IMPORTANT] -> Profile optimization requires a multicore computer. The methods are ignored on other computers. - - Each time you initiate profile optimization in an application domain, the profile that was created during the previous use is read. The information in the profile is used to guide background compilation by identifying the methods that are most likely to be executed during startup. On multicore computers, this increases the chances that a method is already compiled by the time it is needed so that the main application thread does not have to call the JIT compiler. - - The profile file is overwritten on each use, so it always contains the most recent information about which methods are used during startup. - - Optimization profiles are not restricted to application domain startup. They can be used for any activity that will require heavy use of the JIT compiler. You can maintain multiple profiles for an application domain so that each such activity has its own profile. - - To use optimization profiles in an application domain, you must call the method and specify the folder where profiles are stored. The folder must already exist. To begin using a profile, call the method and specify the file name of the profile. If the file was not recorded previously, it is created on first use. There is no performance benefit the first time a profile is created. - - Profile optimization does not change the order in which methods are executed. Methods are not executed on the background thread; if a method is compiled but never called, it is simply not used. If a profile file is corrupt or cannot be written to the specified folder (for example, because the folder does not exist), program execution continues without optimization profiling. - +> Profile optimization requires a multicore computer. The methods are ignored on other computers. + + Each time you initiate profile optimization in an application domain, the profile that was created during the previous use is read. The information in the profile is used to guide background compilation by identifying the methods that are most likely to be executed during startup. On multicore computers, this increases the chances that a method is already compiled by the time it is needed so that the main application thread does not have to call the JIT compiler. + + The profile file is overwritten on each use, so it always contains the most recent information about which methods are used during startup. + + Optimization profiles are not restricted to application domain startup. They can be used for any activity that will require heavy use of the JIT compiler. You can maintain multiple profiles for an application domain so that each such activity has its own profile. + + To use optimization profiles in an application domain, you must call the method and specify the folder where profiles are stored. The folder must already exist. To begin using a profile, call the method and specify the file name of the profile. If the file was not recorded previously, it is created on first use. There is no performance benefit the first time a profile is created. + + Profile optimization does not change the order in which methods are executed. Methods are not executed on the background thread; if a method is compiled but never called, it is simply not used. If a profile file is corrupt or cannot be written to the specified folder (for example, because the folder does not exist), program execution continues without optimization profiling. + ]]> @@ -104,15 +104,15 @@ The full path to the folder where profile files are stored for the current application domain. Enables optimization profiling for the current application domain, and sets the folder where the optimization profile files are stored. On a single-core computer, the method is ignored. - method for the first time in the current application domain. If you call more than once in the same application domain, all calls after the first are ignored. - - The specified folder must already exist. If it does not exist, calling this method does not create it, and no profiling occurs. - - On computers that do not have multiple cores, this method is ignored. - + method for the first time in the current application domain. If you call more than once in the same application domain, all calls after the first are ignored. + + The specified folder must already exist. If it does not exist, calling this method does not create it, and no profiling occurs. + + On computers that do not have multiple cores, this method is ignored. + ]]> @@ -161,19 +161,19 @@ The file name of the profile to use. Starts just-in-time (JIT) compilation of the methods that were previously recorded in the specified profile file, on a background thread. Starts the process of recording current method use, which later overwrites the specified profile file. - method, the information it contains is used to determine the order in which methods are compiled on the background thread. The method creates the profile if it does not already exist, and initiates the recording of method use. - - Only methods that are actually called are recorded, regardless of whether they were compiled on the background thread or on the main application thread. A method is compiled on the main application thread if the application needs to call it before the background thread has compiled it. - - The code that performs the recording tracks the rate at which methods are compiled, including methods that are compiled on both the background thread and on the main thread. When the rate falls below a predetermined level, recording stops. Recording also stops if the rate of JIT compilation exceeds a predetermined upper limit. - + method, the information it contains is used to determine the order in which methods are compiled on the background thread. The method creates the profile if it does not already exist, and initiates the recording of method use. + + Only methods that are actually called are recorded, regardless of whether they were compiled on the background thread or on the main application thread. A method is compiled on the main application thread if the application needs to call it before the background thread has compiled it. + + The code that performs the recording tracks the rate at which methods are compiled, including methods that are compiled on both the background thread and on the main thread. When the rate falls below a predetermined level, recording stops. Recording also stops if the rate of JIT compilation exceeds a predetermined upper limit. + Calling this method stops any previous recording in progress. Calling this method with a null profile file name stops any recording in progress and does not start a new recording. - - If the method has not been called for the current application domain, or if the computer does not have multiple cores, the method has no effect. - + + If the method has not been called for the current application domain, or if the computer does not have multiple cores, the method has no effect. + ]]>