blindkilla has reported a post.
Reason:
Forum: C#
Assigned Moderators: N/A
Posted by: robinson1
Original Content:
Reason:
Post: Multi Threadding in C#.NETSpam. He's just creating backlinks.
Forum: C#
Assigned Moderators: N/A
Posted by: robinson1
Original Content:
A thread is defined as a path of execution for the given process task or function.
A thread is normally classified into:Single thread, Multiple thread
In single thread only one function or operation is executed at a time.
In multi thread ,we force to perform two more operation or function to execute simultaneously.
In .net every program is single thread by default.
Example of Multi Threadding is given below:
using System;
using System.Threading;
class threaddem
{
public threaddem()
{
Thread td = new Thread(new ThreadStart(show));
td.Start();
}
static void show()
{
for (int i = 0; i <= 10; i++)
{
Console.WriteLine("Secondary Thread {0} called with id {1}", i, Thread.CurrentThread.GetHashCode());
Thread.Sleep(1000);
}
}
}
class Program
{
static void Main()
{
threaddem td1 = new threaddem();
for (int i = 0; i <= 10; i++)
{
Console.WriteLine("Primary Thread {0} called with id {1}", i, Thread.CurrentThread.GetHashCode());
Thread.Sleep(1000);
}
}
}
}
............
Job Openings



