DEV Community

Discussion on: What coding concept or practice seem commonly understood, but you never learned?

Collapse
 
bugmagnet profile image
Bruce Axtens • Edited

How about this?

           Task task = GoogleWebAuthorizationBroker.ReauthorizeAsync(
                userCredential,
                CancellationToken.None
            );
            task.Wait();
Enter fullscreen mode Exit fullscreen mode

which seems to be how to make an async Task act in a sync way(???) The Wait appears to mean "wait (that is 'block') until the Task has finished."