Web service class, inherit from asmx class

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?
 
B

Bagger Vance

nevermind...I just forgot to put it in the same namespace...now I can
get it the same as with other classes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top