F
Franck
I am looking for a way to pass a function as parameter, NOT A
DELEGATE.
what i am trying to do is a worker process as for example of what i
want to do :
public static void StartWorking(FUNCTION MyFunction)
{
//thread object
private Thread tWorkingProcess;
Set the thread to use the function
tWorkingProcess = new Thread(new ThreadStart(MyFunction));
//start the thread
tWorkingProcess.Start();
Etc...........
}
So with that kind of function i'll just need to pass the function i
want to run
in a thread to that function and it will run it. Delegate dont work
because
they are attached to 1 function and i would be stupid to create 1
delegate
for each function i have.
Take note that thread object take only VOID function, so i would need
to pass only void
to it.
DELEGATE.
what i am trying to do is a worker process as for example of what i
want to do :
public static void StartWorking(FUNCTION MyFunction)
{
//thread object
private Thread tWorkingProcess;
Set the thread to use the function
tWorkingProcess = new Thread(new ThreadStart(MyFunction));
//start the thread
tWorkingProcess.Start();
Etc...........
}
So with that kind of function i'll just need to pass the function i
want to run
in a thread to that function and it will run it. Delegate dont work
because
they are attached to 1 function and i would be stupid to create 1
delegate
for each function i have.
Take note that thread object take only VOID function, so i would need
to pass only void
to it.