views:

279

answers:

4

Hi, I never work with multithreading in c#. Can some body give me a simple code example to do this?

(c# with asp.net web application)

My intention is i want to read 10 values at a same time. So I'm going for multithreading concept. Is it right thing what I choose? Or is there any best way to approach?

Thank you, nagu

+4  A: 

I suggest you read Joe Albahari's free e-book: Threading in C#

Mitch Wheat
Good one + search stackoverflow as there are numerous questions about threading in .NET.
Brian Rasmussen
I think this is a console application. I want to implement threads concept in web applicaiton with asp.net and c#
Nagu
@Nagu: the principles of threading are very similiar.
Mitch Wheat
ok thank you, but my in simple words my problem is i want to send sms to 100 members exactly at a same time (Ex : sharp 12:00 AM). Is it possible through multi threading in c#?
Nagu
Ok thank you, But in simple words my problem is to sms for 1000 members at a same time (For Ex: 12:00 AM sharp) is it possible throu c# multithreading?
Nagu
Yes, if your gateway also use 'multithreading' :-)
NinethSense
A: 

A simple tutorial here: http://www.codersource.net/csharp_tutorial_multithreading.html

A good one is here: http://www.albahari.com/threading/

NinethSense
A: 

MSDN is always a good place to start, with extensive information on just about everything, including threading.

See: http://msdn.microsoft.com/en-us/library/ms173178.aspx

Also, a good tutorial on threading in C# is available here: http://msdn.microsoft.com/en-us/library/aa645740%28VS.71%29.aspx

Cloud
+2  A: 

Based on your response to Mitch's answer, it sounds like what you really want is to multicast your messages (one message to many addresses) as opposed to many simulatenous messages. What API are you using to send the message? Does it support multicast?

ebpower