Skip to main content
added 27 characters in body
Source Link
spender
  • 121k
  • 36
  • 245
  • 369

Use async Task instead of async void

private static async Task MainAsync(string[] args) {   Console.WriteLine("Before start thread"); var task1 = Thread1(); var task2 = Thread2();  var taskList = new [] { task1, task2 }; Task.WaitAll(taskList); } 

var task1 = Thread1(); var task2 = Thread2();

var taskList = new [] { task1, task2 };

Task.WaitAll(taskList); }

Use async Task instead of async void

private static async Task MainAsync(string[] args) {   Console.WriteLine("Before start thread"); 

var task1 = Thread1(); var task2 = Thread2();

var taskList = new [] { task1, task2 };

Task.WaitAll(taskList); }

Use async Task instead of async void

private static async Task MainAsync(string[] args) { Console.WriteLine("Before start thread"); var task1 = Thread1(); var task2 = Thread2();  var taskList = new [] { task1, task2 }; Task.WaitAll(taskList); } 
deleted 5 characters in body
Source Link
Shane Ray
  • 1.5k
  • 1
  • 13
  • 18

Use async Task instead of async void

private static async Task MainAsync(string[] args) {

private static async Task MainAsync(string[] args) {  Console.WriteLine("Before start thread"); 

var task1 = Thread1(); var task2 = Thread2();

var taskList = new [] { task1, task2 };

Task.WaitAll(taskList); }

Use async Task instead of async void

private static async Task MainAsync(string[] args) {

 Console.WriteLine("Before start thread"); 

var task1 = Thread1(); var task2 = Thread2();

var taskList = new [] { task1, task2 };

Task.WaitAll(taskList); }

Use async Task instead of async void

private static async Task MainAsync(string[] args) {  Console.WriteLine("Before start thread"); 

var task1 = Thread1(); var task2 = Thread2();

var taskList = new [] { task1, task2 };

Task.WaitAll(taskList); }

added 68 characters in body; deleted 1 character in body
Source Link
Shane Ray
  • 1.5k
  • 1
  • 13
  • 18

Use async Task instead of async void

private static async Task MainAsync(string[] args) {

private static async Task MainAsync(string[] args) {  Console.WriteLine("Before start thread"); await Thread1(); await Thread2(); } 

var task1 = Thread1(); var task2 = Thread2();

var taskList = new [] { task1, task2 };

Task.WaitAll(taskList); }

Use async Task instead of async void

private static async Task MainAsync(string[] args) {  Console.WriteLine("Before start thread"); await Thread1(); await Thread2(); } 

Use async Task instead of async void

private static async Task MainAsync(string[] args) {

 Console.WriteLine("Before start thread"); 

var task1 = Thread1(); var task2 = Thread2();

var taskList = new [] { task1, task2 };

Task.WaitAll(taskList); }

deleted 11 characters in body
Source Link
spender
  • 121k
  • 36
  • 245
  • 369
Loading
added 5 characters in body; added 36 characters in body
Source Link
Shane Ray
  • 1.5k
  • 1
  • 13
  • 18
Loading
Source Link
Shane Ray
  • 1.5k
  • 1
  • 13
  • 18
Loading