You cannot use Action , Func<T> or built-in delegates, but in this case you need to define your own:
delegate void ActionByRef<T>(ref T value);
Then, given this, you can:
int value = 3; ActionByRef<int> f2 = DoSomething; f2(ref value);
Reed copsey
source share