Freelance Project Requests info@CodeDocu.de Software Development in C# WPF Asp.Net Core Vba Excel Word SQL-Server EF Linq, UWP Net
#

Async Task in Sync Methode

 

How to perform an asynchronous method within a synchronous method in C-

 

Problem: here Async call in Sync event

Async await

            ApplicationData.Current.LocalSettings.Values["Set_CameraNr"]=CameraNr.SelectedIndex ;

            mainpage._mediaCapture = null;

 

            mainpage. InitializeCameraAsync();    

 

 

 

Solution:
Task task

Create a task that calls the method

            Task task = mainpage. InitializeCameraAsync();

            var result = task. Wait(-1);  //wait 1 sek

 

 

 

Mobile
»
Run Async Task in Sync Method
»
C #: find value in a dictionary and compare
»
C#: Determine folder name from path
»
C#: Removal of escape sequences
»
C#: Text without special characters
»
C# Code: Suche Tag und Einfügen String in eime HTML Text
»
C#: Wait() einbauen
»
WPF: Umschreiben einer Methode, Funktion in einen Task
»
C#: Button Event auslösen aus einer anderen Funktion
»
C#: Umschreiben einer Funktion in einen Asynchronen Task

.

Contact for Jobs, Project Requests: raimund.popp@microsoft-programmierer.de