I have this:
public void GetFish(Func<List<Fish>> goFishing) { ... }
and this:
public List<Fish> getFish { get { return ... } }
If the second line was actually a method, I could just do
GetFish(getFish);
However because it’s a property, the above will return an error.
What I need is something like:
GetFish(getFish.Getter)
Any ideas?
Just wrap the property in an lambda: