Question : using Task.IsCompleted

i try to figure out Task with isCompleted method,

by trying actually
start task2 once task1 is finished without using Wait();

so after there are 111, words,1111111 , then if task2 start, should continue with 222222222,
however 222222222 does not start after 11111111 is completed.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
class Program
    {
        static void Main(string[] args)
        {
            Task task1 = new Task(() =>
                {
                    for (int i = 0; i < 10; i++)
                    {
                        Thread.Sleep(1000);
                        Console.WriteLine("1");
                    }

                });

            task1.Start();
            //task1.Wait();
            Task task2 = new Task(() =>
                {
                    Thread.Sleep(3000);

                    for (int j = 0; j < 10; j++)
                    {
                        Thread.Sleep(1000);
                        Console.WriteLine("2");
                    }
                });

            if (task1.IsCompleted)
            {
                task2.Start();
            }

            Task task3 = Task.Factory.StartNew(() => Task3void("abc"));
            //task3.Start();


            

            Console.ReadKey();


        }

        public static void Task3void(string strInput)
        {
            Thread.Sleep(3000);
            Console.WriteLine("Input string is : " + strInput); 
        }
    }

Answer : using Task.IsCompleted

have you tried just http://connect
?

if so, you need to make sure your workstations have ONLY the ip address of your inside dns server listed in their network card properties, or dhcp.

use ipconfig /all
to verify
Random Solutions  
 
programming4us programming4us