using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
namespace ConsoleTestThread
{
public delegate void ParameterizedThreadStart(object obj);
class Program
{
static void Main(string[] args)
{
Thread t = new Thread(Go);
Thread tName = new Thread(delegate() { GoTo("chenou", "I want to have many money"); });
t.Start(true);
tName.Start();
Go(false);
Console.ReadLine();
}
static void Go(object upperCasr)
{
bool upper = (bool)upperCasr;
Console.WriteLine(upper ? "HELLO!" : "hello!");
}
static void GoTo(string name, string word)
{
Console.WriteLine("My Name is " + name + "--- I Sad:" + word);
}
}
}