C# Corner
Tech
News
Videos
Forums
Trainings
Books
Events
More
Interviews
Jobs
Live
Learn
Career
Members
Blogs
Challenges
Certifications
Bounties
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Create Multiple Thread in C#
WhatsApp
Rajan Singh
Dec 29
2015
1.1
k
0
0
using
System;
using
System.Collections.Generic;
using
System.Linq;
using
System.Text;
using
System.Threading.Tasks;
using
System.Threading;
namespace
MultipleThread
{
class
Program
{
static
void
Main(
string
[] args)
{
Thread thread =
new
Thread(DefferentThread);
thread.Start();
while
(
true
)
{
Console.WriteLine(
"This is MainThread"
);
}
}
static
void
DefferentThread()
{
while
(
true
)
{
Console.WriteLine(
"This is DefferentThread"
);
}
}
}
}
Output:
This is DefferentThre
This is DefferentThre
This is DefferentThre
This is DefferentThre
This is DefferentThre
This is DefferentThre
This is MainThread
This is MainThread
C#
Multiple Thread
Up Next
Create Multiple Thread in C#