Last active
April 12, 2016 05:28
-
-
Save tpdns90321/15fa3f12dbb3158ba9d179846d2d2cb5 to your computer and use it in GitHub Desktop.
C# Thread Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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