public class MyThread {
private int _data;
public MyThreadClass(int data) {
this._data = data;
}
public void Start() {
new Thread(new ThreadStart(ThreadProc)).Start();
}
private void ThreadProc() {
// use this._data in your thread;
}
}
to call it, use:
Code:
new MyThread(55).Start();
but i didn't test it, don't know if it will compile, but you should get the jist of it
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.