0

I've looked around for a while and I can't find the answer to my question - or if it is even possible. My question is not simply how to pass a method as a parameter to a second method, but whether it is possible for the method passed to use a reference (ref) parameter.

For instance some sudo code might look like:

public double Foo(int value, ref string error)
{
...
}


public double Bar(int value, ref string error)
{
...
}

public void Main(Func<double, int, ref string> method, object[] params)
{
...  Do something then call function passed in 
}
C. Knight
  • 739
  • 2
  • 5
  • 20
  • This sounds a bit like the [XY problem](http://meta.stackexchange.com/questions/66377/what-is-the-xy-problem). Perhaps elaborate more on what you're trying to accomplish. – Yuval Itzchakov Dec 02 '15 at 15:30
  • What you want is information on how to use delegates: https://msdn.microsoft.com/en-us/library/ms173171.aspx – Russ Dec 02 '15 at 15:30
  • thanks - I didn't manage to find that link - solves the problem – C. Knight Dec 02 '15 at 15:33

0 Answers0