When you using threads, in most cases you need to pass parameters or you need to get return value or you need to do both.
Following example demonstrates this scenario clearly in c#.
There’s a method called ExecutePackage that we want to start using our thread and should provide a parameter(String).
private String ExecutePackage(String pName)
You can pass parameter and get the return value using following thread.
thr = new Thread(delegate()
result = this.ExecutePackage(packageName);
It’s done !!!