I have a basic understanding of what delegates are for, but I am stuck with something I am trying to accomplish.
I am trying to create a socket class which uses asynchronous connections. I want the programmers who use it to be totally oblivious to the fact that there is multithreading going on. I just want them to be able to use it and have it work, work well and work fast.
The problem I am having is I want to pass data from my class, but since it's in a seperate thread your supposed to invoke it from the control that your using. The whole point of my class is to remove that kind of complexity from the person utlizing my class/dll.
I would like to know how to pass thread safe data from my class to any control in any form without invoking it from the form or control itself.
I had this problem about 3 years ago and after much discusion on gotdotnet forums, I resolved it. The solution was over my head, but with the code I was given I was able to accomplish what I wanted. It only took me about an hour to get to this point where 3 years ago it took weeks of struggling to get to this point. I have learned and remembered a lot, even though I havin't coded anything in the last 3 years. Now the website has been redesigned and the forums are gone so I can't look back at the solution that I was given.
I am trying to create a socket class which uses asynchronous connections. I want the programmers who use it to be totally oblivious to the fact that there is multithreading going on. I just want them to be able to use it and have it work, work well and work fast.
The problem I am having is I want to pass data from my class, but since it's in a seperate thread your supposed to invoke it from the control that your using. The whole point of my class is to remove that kind of complexity from the person utlizing my class/dll.
I would like to know how to pass thread safe data from my class to any control in any form without invoking it from the form or control itself.
I had this problem about 3 years ago and after much discusion on gotdotnet forums, I resolved it. The solution was over my head, but with the code I was given I was able to accomplish what I wanted. It only took me about an hour to get to this point where 3 years ago it took weeks of struggling to get to this point. I have learned and remembered a lot, even though I havin't coded anything in the last 3 years. Now the website has been redesigned and the forums are gone so I can't look back at the solution that I was given.