I\'d like to assign a reference to a member field. But I obviously do not understand this part of C# very well, because I failed :-) So, here\'s my code:
public
As answered by JaredPar, you can't.
But the problem is partly that string is immutable. Change your parameter to be of class Basket { public string status; }
and your code would basically work. No need for the ref
keyword, just change parameter.status
.
And the other option is of course Console.WriteLine("After: {0}", e.parameter);
. Do wrap parameter in a (write-only) property.