Refer to Learning C# thread.