I am sure this is possible (at least in java) and I am starting C #.
So, I have a function that includes a callback (notifies some other method of the completion of some work).
I don’t want to call another function because I am losing a parameter there (and cannot pass parameters in callback functions). How can I do everything in the same function?
What am I doing now:
public static Tween Play(Tween tweenToPlay)
{
return tweenToPlay.Play().OnComplete(RewindCallback);
}
private static void RewindCallback()
{
}
What I really want:
public static Tween Play(Tween tweenToPlay)
{
return tweenToPlay.Play().OnComplete();
}
source
share