Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Threading.Tasks;
- namespace AsynchronousProgramming
- {
- class EntryPoint
- {
- static void Main()
- {
- char charToConcatenate = '1';
- Task t = new Task(ConcatenateChars);
- t.Start();
- t.Wait();
- for(int i = 0; i < 200; i++)
- {
- Console.WriteLine("Finished");//This runs as often as the other one
- }
- Console.ReadLine();
- }
- public static void ConcatenateChars()
- {
- string concatenatedString = string.Empty;
- for (int i = 0; i < 200; i++)
- {
- concatenatedString += "i";
- Console.WriteLine(concatenatedString);//This runs as often as the other one
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement