SU
M
T
W
TH
F
S


JAN FEB MAR APR


MAY JUN JUL AUG


SEP OCT NOV DEC
2024
28
  Home :: Blog :: ASP.net Calling passing parameters and return with threads Skip Navigation Links
ASP.net Calling passing parameters and return with threads      
  11/4/2010 3:21:20 AM

For the longest time, I've wanted to be able to pass simple parameters and return values with threads as if I was calling a simple method. I recently came across something that allowed me to do just that. Here's a quick sample.

public class myClass
{
public myMainMethod()
{
string retValue;
string param1 = "Boogie";
string param2 = "Land";
ThreadStart myThreadStart = delegate { retValue = myClass.callThread(param1, param2); };
new Thread(myThreadStart).Start();
}


private string callThread(string param1, string param2)
{
return param1 +  param2;
}
}


 
Blogs
General
#DailyThanks
Some Things Were Never Me...
The Vegas Sandwich
Thankful Perspective
Chick-Fil-A and Swimming
Rude People Are Not Born ...
Time for Some Calcium
Cat Lovers Beware! The Re...
An Eventful Day
Making Iced Coffee
Brakes are underrated
Perpetual Victim
Cellphones and The Cancer...
Smoke and Mirrors
How to put a gash on the ...
How does one spot the ice...
Saddest Day At The Happie...
Awesome Grape Candy From ...
Recommended Vendor for Ca...
Trying To Figure Out If A...
Last Showing of Disneylan...
Free HotSpot Wifi Interne...
Bribing The Mexican Polic...
Vacation? Go fly a kite
Common Courtesy
Facebook Site with Google...
Water Damage Phase 5 - Fu...
Water Damage Phase 4-Furn...
Water Damage Phase 3
Water Damage Phase 2
Water Damage Phase 1
Home Sweet Home... Buyer...
Where Is America Going?
Taiwan, One Of The Jewels...
What's With These "Social...
Why Am I Still Up At This...
The Reason For The Season
Generation Of Mediocrity
One of the Strongest Typh...
Pouring Buckets
Familiar Sticky Feeling
Whatever Happened To Cust...
Software and Medicine
Lifetime Student...
All is well
Father's Love
Old Friends
Ant Problems (Round 3)...
Getting old...
Ant Problems (Round 2)...
Ant Problems...
Technology
Da Vinci 1.0 Stepper Moto...
The Infinite Wisdom of We...
Android 4.2 Battery Drain
VPN Using Cisco SOHO Rout...
Chinese IME for Android
Two Excel Documents Side-...
Facebook "Like" Button
VS 2008 TFS TF30177 Error
Microsoft Updates Killed ...
Host Department No More!
Microsoft Updates Killed ...
I Am LinkedIN
Traditional Chinese Suppo...
BlackBerry Enterprise Ser...
VMWare Virtual Machine Im...
URL Rewriter Blocking Res...
Missing XP Desktop Taskba...
Obout HTML Editor
Google Web Accelerator?
Working with Classes...
Slow Service... No More!
Slow Service...
Slow Service...