I had a C++ static and C# static method design problem.
In C++, we can call the static method through class name or the class instance. For example, the class defined here(In visual C++ 6.0)
Class Test{
Public static void Hello(void){}
}
We can call the static method by:
Test::Hello();
Or by :
Test t ;
t.Hello();
or by :
Test* t = new Test();
t->Hello();
but in C# , we can only access the method by the class name, can’t do it by using the instance call. I want to know, why we use this design in C# language?
Thanks!