I have to pass value into RichTextBox from a class. Here is my code. I have to pass values into any tools like textbox, listbox but I don't know how. I have to use delegates to pass md value to both methods and into the same richtextbox.
namespace delegateEx2
{
public class MyClass : Form1
{
delegate void MyDelegate(string MyString);
public void ShowThoseMessages()
{
MyDelegate md = new MyDelegate(log1);
md += log2;
md("Error Log Text");
}
public void log1(string message) {
//what can I write here to pass the md into the RichTextBox on Form1.cs
//I tried something like Systems.Windows.Form.rtxblog but did not work
//......................................
}
public void log2(string message2)
{
//.....................................
}
}
this.rtxblog.Text += message?