I am learning C sharp. I want to call a function (any simple function.
E.g. : Never ending while loop or large For loop inside the function).
I want to call this function from the main application window. I found
couple of tutorials but for some reason window freezes.
THis is what I did,
Thread FirstThread = new Thread(new ThreadStart(Thr eadFunc));
FirstThread.Sta rt();
FirstThread.Joi n();
protected static void ThreadFunc()
{
for (Int64 i = 0; i < 10000000; i++)
{
// Do my job . . . . .
}
}
Can some one help me to resolve this problem. I am still a bigginner.
Pubudu
E.g. : Never ending while loop or large For loop inside the function).
I want to call this function from the main application window. I found
couple of tutorials but for some reason window freezes.
THis is what I did,
Thread FirstThread = new Thread(new ThreadStart(Thr eadFunc));
FirstThread.Sta rt();
FirstThread.Joi n();
protected static void ThreadFunc()
{
for (Int64 i = 0; i < 10000000; i++)
{
// Do my job . . . . .
}
}
Can some one help me to resolve this problem. I am still a bigginner.
Pubudu
Comment