C-sharp: When to mark class and members static

This is very straight forward, when your object need to share some variable values then make them static. There will be only one memory allocation to that variable which will be accessible for all objects. For more clarity in c#, you can’t access static members using object. You can access it by using class name.

Continue