N
~~~ .NET Ed ~~~
Yes, I think so at least... In C# you *can* have static properties which are
quite useful when used properly. Now imagine the scenario where you need the
ability (sp?) to implement a variety of classes that must implement an
interface. All these classes must have a particular *static* property, and
this in particular is handy not only to be consequent with the fact that you
can do it with classes but also with the fact that you cannot specify member
variables in an interface (which IMHO is good that way, ie no member
variables in an interface definition).
And then... you happily put your static interface property that all the
implementing classes must implement and then "Invalid attribute for an
interface member" !!!
I believe this is an omission in the specification, sadly now I must find
another less straightforward way to achieve the same.
quite useful when used properly. Now imagine the scenario where you need the
ability (sp?) to implement a variety of classes that must implement an
interface. All these classes must have a particular *static* property, and
this in particular is handy not only to be consequent with the fact that you
can do it with classes but also with the fact that you cannot specify member
variables in an interface (which IMHO is good that way, ie no member
variables in an interface definition).
And then... you happily put your static interface property that all the
implementing classes must implement and then "Invalid attribute for an
interface member" !!!
I believe this is an omission in the specification, sadly now I must find
another less straightforward way to achieve the same.