Search code examples
c#genericsstaticmethodsvirtual

C# virtual static method


Why is static virtual impossible? Is C# dependent or just don't have any sense in the OO world?

I know the concept has already been underlined but I did not find a simple answer to the previous question.


Solution

  • virtual means the method called will be chosen at run-time, depending on the dynamic type of the object. static means no object is necessary to call the method.

    How do you propose to do both in the same method?