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

LIveCharts2: Charts for Windows and web

Charts for Windows and web including .Net MAUI  LiveCharts - LiveCharts2 (lvcharts.com)