Threading Program

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

namespace mThreading
{
    class Program
    {
        static void Main(string[] args)
        {
            Thread th = new Thread(writey);
            th.Start();
            for (int i = 0; i <= 10;i++ )
            {
                Console.WriteLine("hello");
            }
            Console.Read();
        }
        private static void writey()
        {
            for (int i = 0; i <= 9;i++ )
            {
                Console.WriteLine("world");
            }
        }
    }
}

Share:

No comments:

Post a Comment

Monday, 31 August 2015

Threading Program

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;

namespace mThreading
{
    class Program
    {
        static void Main(string[] args)
        {
            Thread th = new Thread(writey);
            th.Start();
            for (int i = 0; i <= 10;i++ )
            {
                Console.WriteLine("hello");
            }
            Console.Read();
        }
        private static void writey()
        {
            for (int i = 0; i <= 9;i++ )
            {
                Console.WriteLine("world");
            }
        }
    }
}

No comments:

Post a Comment

Popular

Total Pageviews

Archive