▩▩ 프로그래밍 ▩▩/C#

[C#] 스레드(thread) 사용 시 매개변수 넘기기 (delegate)

남쿤 2013. 3. 27. 13:55
반응형
void Run()
{
    string param1 = "hello";
    int param2 = 42;

    Thread thread = new Thread(delegate()
    {
        MyMethod(param1,param2);
    });
    thread.Start();
}

void MyMethod(string p,int i)
{

}


반응형