Hello there, Can you share the script your are following? Also if you're new to asynchronous programming or do not understand how an async method uses the await operator to do potentially long-running work without blocking the caller's thread, read the introduction in Asynchronous programming with async and await. The following code is found inside an async method and calls the HttpClient.GetStringAsync method: https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/async Hope this resolves your Query !! --If the reply is helpful, please Upvote and Accept it as an answer--
Async method is not showing UI context of declared variables
Sanjay Kumar Jha
156
Reputation points
Hi,
I am using the async method in my application. The first time when I run the application, It is showing UI context for declared variables or passed parameters but the second time when I call the same function, It is not showing UI context for passed parameters or declared variables. I have also tried the ConfigureAwait(true)
or ConfigureAwait(false)
. But still, I am facing the problem. No idea what is the cause behind it.
I am attaching a screenshot for the help of the first cars and 2nd cases. Please have a look.
Thanks, Sanjay