Good day,
I am basically writing a generic namespace with various helper classes.
I don't want to add the calling form to the referrences.
Example of what I am trying to do. Please let me know if i am going in
the wrong direction. I am rather new to C# and .NET.
I have a form in another namespace that on a button click I call
DoProcessing and pass the RichTextBox to log to.
namespace Utils
{
class MiscUtils
{
RichTextBox LogRichTextBox = null;
public static void DoProcessing(RichTextBox aRichTextBox)
{
LogRichTextBox = aRichTextBox;
PrintOutput("A Message");
}
public static void PrintOutput(string aMessage)
{
if (LogRichTextBox != null)
{
LogRichTextBox.AppendText(aMessage);
{
}
}
}