A
Amadelle
Hi All and thanks in advance,
I wanted to know when is a good idea to use a static class (with static
constructor) and when to use instance classes? I have read couple of
articles on line and the general example is when you want to write a log
file use static class ...but they don't say why?
My specific question is that I have a validation class with some data
validation methods which will be called through out the program and I am
debating whether this validation class should I set it up as a static class
or an instance class?
What about my data access class with methods for accessing database, opening
up connections and running queries? Should I set that up as an instance
class or static class?
Thanks I appreciate your help in this matter,
Amadelle
I wanted to know when is a good idea to use a static class (with static
constructor) and when to use instance classes? I have read couple of
articles on line and the general example is when you want to write a log
file use static class ...but they don't say why?
My specific question is that I have a validation class with some data
validation methods which will be called through out the program and I am
debating whether this validation class should I set it up as a static class
or an instance class?
What about my data access class with methods for accessing database, opening
up connections and running queries? Should I set that up as an instance
class or static class?
Thanks I appreciate your help in this matter,
Amadelle