2
Reply

how to share a procedure between all application parts

Eduardo

Eduardo

Mar 22 2010 11:43 AM
2.1k
Hi guys,

I am using C#.NET 2008 and i was wondering about how to create a procedure to store information to trace erros in an application, I made this code:
public void Report(string What, string Where, string About)
{
l_Report += DateTime.Now.ToString("HH:mm:ss") + "\t" + What + "\t" + Where + "\t" + About + "\r\n";
}


So, I want to call this procedure from any place of my application.
I need to let this procedure and the l_Report variable visible for all code in any part of my application.

Is it possible?  how?

thanks in advance,

Answers (2)