Untitled

mail@pastecode.io avatar
unknown
csharp
a year ago
571 B
1
Indexable
Never
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);
        }
    }
}