hi, i have went through countless examples of how to use delegates, and still no success
here is my problem:
WFA application
Code://myClassA.cs class myClassA { private AddLabel(string text) // add few labels on the Panel which is placed on the form { // got ref to panel 'p' so i just call p.Controls.Add( //my new label); } }Code://myClassB.cs class myClassB { public void OnDataReceived // receiving data from socket, new thread { now i need to call method from myClassA - AddLabel("some text") to add new label on the panel, how ? } }Code://Form1.cs public partial class Form1 : Form { private myClassA objA; private myClassB objB; // i can call objA.AddLabel and its working fine, but i need to call that method inside myClassB }




Reply With Quote