Skip to content

Commit 13f3187

Browse files
authored
Fix copy/paste error (#31692)
Fixes #31691 changes to `ref` arguments are visible outside the method. However, changing a ref parameter to refer to a different element is not.
1 parent 2f04324 commit 13f3187

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/csharp/language-reference/keywords/method-parameters.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ The variable `n` is a value type. It contains its data, the value `5`. When `Squ
4545
When you pass a *value* type *by reference*:
4646

4747
- If the method assigns the parameter to refer to a different object, those changes **aren't** visible from the caller.
48-
- If the method modifies the state of the object referred to by the parameter, those changes **aren't** visible from the caller.
48+
- If the method modifies the state of the object referred to by the parameter, those changes **are** visible from the caller.
4949

5050
The following example is the same as the previous example, except that the argument is passed as a `ref` parameter. The value of the underlying argument, `n`, is changed when `x` is changed in the method.
5151

0 commit comments

Comments
 (0)