public async Task Move(int n, MyObservableCollection beginning, MyObservableCollection end, MyObservableCollection aux) { if (n > 0) { await Move(n - 1, beginning, aux, end); var b = beginning.ElementAtOrDefault(0); end.Insert(0, b); beginning.RemoveAt(0); string z = "Moved disk " + n + " from " + beginning.Name + " to " + end.Name; Steps = z; await Task.Delay(DelayMilliSecond); await Move(n - 1, aux, end, beginning); } }