Imagine that you have some methods needed to access from your entire application. A static class is ideal for this.
public static class MyStaticClass { public static void MyMethod() {
But perhaps in the future I will add a second implementation of static methods to another static class.
public static class MyStaticClass2 { public static void MyMethod() {
Is there a way to change the static class used in my other code without changing the calls from MyStaticClass.MeMethod(); before MyStaticClass2.MyMethod(); ?
I was thinking about the interface, but I have no idea how to implement this ... If I talk crazy, say it and I just change the calls: D
source share