//https://stackoverflow.com/questions/1216791/winform-application-ui-hangs-during-long-running-operation Task.Run(() => YourMethod());