Vote count:
0
Thread[] tr = new Thread[3]; //Creating three Dynamic Threads
for (int i = 0; i < 3; i++)
{
tr[i] = new Thread(new ThreadStart(Method1));
tr[i].Start();
tr[i].Name = String.Format("Thread_Name:{0}", i);
}
void Method1() //Function Name
{
WinOpTableAdapters.attendanceTableAdapter tx;
tx = new WinOpTableAdapters.attendanceTableAdapter();
DataTable dt = new DataTable();
DataTable dt2 = new DataTable();
DataTable dt3 = new DataTable();
dt = tx.GetDataAll(Convert.ToInt32(TxtNumbers.Text),"8/16/2012","11/10/2014");
double counts = dt.Rows.Count;
}
Creating 3 Dynamic Threads,But 3 threads calls the Same function (Method1) but i want to call each thread to call 3 different functions Simultaneously
asked 41 secs ago
Creating 3 Dynamic Threads,But 3 threads calls the Same function (Method1) but i want to call each thread to call 3 different functions Simultaneously
Aucun commentaire:
Enregistrer un commentaire