Untitled
unknown
csharp
3 years ago
571 B
7
Indexable
using System;
using System.Threading;
class Program {
static void Main(string[] args) {
Thread t1 = new Thread(PrintAlphabet);
Thread t2 = new Thread(PrintAlphabet);
t1.Start('a');
t2.Start('A');
t1.Join();
t2.Join();
Console.ReadLine();
}
static void PrintAlphabet(object startChar) {
char c = (char)startChar;
for (int i = 0; i < 26; i++) {
Console.WriteLine(Thread.CurrentThread.Name + ": " + c++);
Thread.Sleep(100);
}
}
}
Editor is loading...