Make this static class?

Camillia
Camillia used Ask the Experts™
on
I want to create a class to log user action. I'll call it UserAction. I will call this class in pages...for example...what user logged in, what page they clicked on...at what time, etc.

Should I make this class as static? or just a public class and user the "new" keyword?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Farzadw just make this class as normal public class instead of static
Commented:
The class can be whatever you want but you could make the method static to save yourself from instantiating it every time you need it (as you have mentioned), ie:

UserAction ua = new UserAction();
ua.Log("My Message");

vs.

UserAction.Log("My Message");

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial