How can I assure a class to have a static property by using interface or abstract?
Posted
by burak ozdogan
on Stack Overflow
See other posts from Stack Overflow
or by burak ozdogan
Published on 2010-03-14T22:44:48Z
Indexed on
2010/03/14
23:05 UTC
Read the original article
Hit count: 208
Hi,
I have one abstract class -let's say myBase. And I want all the classes derived from myBase to have one static field called
public static List<string> MyPArameterNames
{
get {return _myParameterNames;}
}
So, every child class can tell what parameter names it uses; I want static because I do not want to create an instance just for this.
How can I achieve this?
© Stack Overflow or respective owner