Skip to content

Why method assigns the parameter to refer to a different object aren't visible from the caller, when pass a value type by reference? #41087

@Unarimit

Description

@Unarimit

Type of issue

Typo

Description

Does it mean such method as void foo(ref int num) is not reasonable? I can not got it.

Page URL

https://learn.microsoft.com/zh-cn/dotnet/csharp/language-reference/keywords/method-parameters

Content source URL

https://github.com/dotnet/docs/blob/main/docs/csharp/language-reference/keywords/method-parameters.md

Document Version Independent Id

7241f712-8d73-b5e0-37c0-5f05c92412c6

Article author

@BillWagner

Metadata

  • ID: b8dd92fe-5053-1bc6-1c8f-cf9f88635cb5
  • Service: dotnet-csharp
  • Sub-service: lang-reference

Associated WorkItem - 335968

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions