Which async/await pattern should be used to avoid blocking the UI thread when performing I/O operations in Xamarin apps?
-
A
Task.Run(() => LongOperation()).Wait()
-
B
await Task.Run(() => LongOperation())
-
C
Thread.Sleep() followed by UI update
-
D
Dispatcher.BeginInvoke with synchronous calls