Closed cblaze22 closed 4 years ago
I would highly recommend you migrate the code to async nowadays. Though if you do need to have sync code, you can write the following:
// Add a .Result at the end for methods that return a value
var tweet = client.Tweets.PublishTweetAsync("hello").Result;
// Add a .Wait() at the end for methods that only return a Task.
client.Tweets.DestroyRetweetAsync(tweet).Wait();
I hope this helps.
What is the best way to run methods .like 4.0.3 Tweetinvi when everything was sync and not async. Having major issues with switching to async and getting deadlocks with a sync application.