[Solved] Cannot call start on a completed task [closed]

This code works for me and I can click the button multiple times without throwing the error in your title: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } void Button1Click(object … Read more

[Solved] All tasks are blocked from ContinueWith [C#].. while calling Task.Delay waiting a value that should be changed by other tasks

Calling Run Initializing the tasks from within the constructor was the crime comitted.. Just by moving it to the constuctor of the Control .. it was solved! 1 solved All tasks are blocked from ContinueWith [C#].. while calling Task.Delay waiting a value that should be changed by other tasks

[Solved] Returning values from thread

Your code, in general, seems pretty solid, but there are several problems. The task you created does the trick, and the progress bar will work, but it uses a thread so returning that the tests are complete without confirming the progress of the thread is wrong. Because the tests are in a thread and the … Read more

[Solved] Awaited method call doesnt appear to complete [closed]

The problem is you have two separate tasks running that call ShowProgressText. Task.Run() is not something you normally use unless you are interfacing with code that does not use the C# async/await pattern. So perhaps LoadRapport could be like this: bool IsCompleted; string LogText; private async Task LoadRapport() { LogText = “Disable Replication”; IsCompleted = … Read more