Click here to Skip to main content
14,971,661 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a list object e.g. "DBBL,BAL,SBL,LBF,BBL,..........." and this list object has list of item. I want store list item concurrently e.g. when DBBL start execution, same time execute SBL and so on, I think threading is the best way but don’t understand how to implement it. Anyone help me.

I want to develop a sms service to broadcast sms to card holder for many bank. When transaction is occurred then sms send to card holder automatically.For this reason application need to connect all time to bank server for getting transaction information for every bank concurrently. For this purpose i create thread method for every bank, as a result some transaction notification are not send.I want to improve my code, then how to do that.
Updated 10-Dec-14 1:17am
Thanks7872 10-Dec-14 5:38am
Why? Threading is not meant for such stuff. Do you know what will happen if your list has thousands of items?
Praveen Kumar Upadhyay 10-Dec-14 6:19am
Can you elaborate your question??
Sinisa Hajnal 10-Dec-14 6:50am
Instead of saying what you think you need, state clearly your problem (your goal) and someone will suggest something. If you use threading for such list it will drown your computer for any sizeable list. Worse if it is web app.

1 solution

When you are using C#, a task might be the better solution!

Look at these articles:

Task Parallel Library: 1 of n[^]
Md. Shihab Uddin 17-Dec-14 3:03am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900