Skip to content

Instantly share code, notes, and snippets.

@tpdns90321
Last active April 12, 2016 05:28
Show Gist options
  • Save tpdns90321/15fa3f12dbb3158ba9d179846d2d2cb5 to your computer and use it in GitHub Desktop.
Save tpdns90321/15fa3f12dbb3158ba9d179846d2d2cb5 to your computer and use it in GitHub Desktop.
C# Thread Example
using System;
using System.Threading;
namespace FuncAB{
class Program{
static void FuncA(){
for (int i = 0; i < 100; i++){
Console.WriteLine("A : " + i);
}
}
static void FuncB(){
for (int i = 0; i < 100; i++){
Console.WriteLine("B : " + i );
}
}
void Main(string[] args){
Thread A = new Thread(FuncA);
Thread B = new Thread(FuncB);
A.Start();
B.Start();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment