3 ms·
See the following example for why that is excluded. public string Foo { get { return ""; } } private void DoBar(ref string input) { input = "123"; }
by Guvante 12y ago
See the following example for why that is excluded.
public string Foo { get { return ""; } }
private void DoBar(ref string input) { input = "123"; }
public void Main() { DoBar(ref Foo); }
Typically C# points you towards using a different methodology than ref/out parameters. But I do agree it is annoying when you want to use them.