If you have a static class full of static methods aren't you really just defining macros (without all of the problems that go along with macros)?
You know, I agree with you… Static classes can *certainly* be abused. Static classes are not a very “OO” friendly concept. That said, good API design is a compromise between pure OO design and usability. There are just some cases where the problem
space doesn’t warrant full OO mapping… Check out System.IO.Path as an example.
We have used static classes a judiciously in the framework and it is good to see that pattern being enforced in the compiler.
Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.