Wednesday, July 25, 2012

How to pass more than one parameter to c# thread

Here goes sample:-
void MySample()
{
    string sName = "NACL";
    int iAge = 420;
    Thread thread = new Thread(delegate()
    {
        MyTestMethod(sName,iAge);
    });
    thread.Start();
}
void MyTestMethod(string sName ,int iAge)
{
}

No comments:

Post a Comment

How to upload app to macOS

1. Open Terminal Press Cmd (⌘) + Space , type Terminal , and hit Enter . 2. Navigate to Your Build Output Directory Your .app file is likel...