The question is how to pass a function with a parameter to the Task or Task class; all methods are interested. Thank.
Task
You probably need something like this.
private void RunAsync() { string param = "Hi"; Task.Run(() => MethodWithParameter(param)); } private void MethodWithParameter(string param) { //Do stuff }
Source: https://ru.stackoverflow.com/questions/662403/More articles:Why is the database creation request not working? [closed]Sorting SQL QueryOutput abstract syntax treeOptimize CSS DeliveryHow to use LINQ to fill a listCreating a two-dimensional array \ matrices with custom dimensiontransfer PSD site layout to OpenCartreading structure vector from fileKotlin, question on function referenceQuestion about reference typeAll Articles
Task"? Describe what you are doing and what you want to receive. - VladD