Passing in an Action is an asynchronous programming trick - I think
this is "functional programming" (and someone will hopefully correct me if
I'm wrong.
Basically you would declare your method like:
private void
getUpcomingRaces(Action> callback) { ... }
Then you would call it with:
priv
Hi,
That's getting me a good bit further, but there is still something not quite
right. The new code looks like this
private string rTrack;
public ListgetUpcomingRaces(string track)
{
Listf = new List();
rTrack = track;
f = getUpcomingR
At a guess, it's to do with timing.
You could be returning your list f from your function before the Async
network call has occurred.
To get around this, change your method from:
private List DoThis()
to:
private void DoThisAndCallMeBack(Action> callback)
And then modify the return stat
Hi,
This is probably down to me being a klutz, but can anyone spot why
nothing is being returned? The Console.WriteLine is showing that
something is being added to the list. I'm guessing a scope problem...
(calling routine)
case 1:
List race = new List();