Why not just set the property for the string variable and always process the string through the property? It is easier to do it under the installer: rtxt_chatLog.Text = test;
EDIT: from OP: Well, I want to keep a log of messages in a string in one window (behind the scenes) and then, at user request, pop up another window that will list the contents of the string from the parent form in real time
If you want to list the contents of a string only at the request of the user, you do not need any of this. You just need to process the user request and make rtxt_chatLog.Text = test under this event (possibly some event handler). But if you need your richtextbox to be filled with every new value for your string, you can do something simple:
public string Test { set { test = value; rtxt_chatLog.Text = test; } get { return test; } }
The key here is to use only the property through out to set the values ββof the test variable. For example, in your code do not
test = "sdf";
Do
test = "sdf";
Simple
source share