F
free.teranews.com
After defining a trace file listener, I wrote a small method for doing
logging and put it in the main class for a web service, Service1.cs :
public void log(string s)
{
Trace.WriteLine(DateTime.Now+":"+s);
}
Now I want to access it from other classes in other files, so that they
all write to a single trace file.
How can I call a method in my main class from one of these other classes?
logging and put it in the main class for a web service, Service1.cs :
public void log(string s)
{
Trace.WriteLine(DateTime.Now+":"+s);
}
Now I want to access it from other classes in other files, so that they
all write to a single trace file.
How can I call a method in my main class from one of these other classes?