out ref parameters #4152
Unanswered
bill-poole
asked this question in
Language Ideas
Replies: 2 comments 36 replies
-
I'm not sure I understand the purpose of this proposal. Are you trying to achieve a |
Beta Was this translation helpful? Give feedback.
3 replies
-
Out is always passed by ref. |
Beta Was this translation helpful? Give feedback.
33 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
C# currently has the ability for a method to return a "ref" or "ref readonly" value, but no such ability exists with "out" parameters. That is, I'd like the ability to specify a "ref" or "ref readonly" out parameter of a method. I have an example below where I would use this feature if available. I've only included the pertinent parts from the code as I'd write it if the feature were available.
I'd be keen to get people's thoughts.
Beta Was this translation helpful? Give feedback.
All reactions