We help IT Professionals succeed at work.

cross thread event in c#

murfinp used Ask the Experts™

I am new to c# so this is all a bit of a steep learning curve for me!

I have two programs 1) The first talks to s stock market data feed and calculates some statistics. (I have got that working fine).

2) The second program needs to listen to events  raised by the first program in order to make automated trades. I though I might be able to pass data from program 1 to program 2 via named pipes? Is that fast and sensible? The problem is if I set the second program up to listen to a pipe it also needs to be doing other things while listening ... so I am thinking within program 2) I have my main gui thread and a thread that listens to the named pipe and then raises an event to the main gui thread to process. Can that be done ... am I barking up the wrong tree completely? ANY help , code suggestions would be much appreciated! I am using c# .net 3.5

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Mike TomlinsonHigh School Computer Science, Computer Applications, Digital Design, and Mathematics Teacher
Top Expert 2009

Look up REMOTING which allows you to pass objects between .Net apps (local or across the internet):


Thanks - your help is much appreciated ....