As the title, such a lot of information online, but also said very in place, but all feel a lot of explanation, theoretical too strong, here I briefly summarize and summarize the difference between them, can be at a glance:
I. Static and non-static classes
Definition:
Static classes can be considered as a single process in a class library, and there is no concept of "state";
Non-static class is a kind of operation procedure that stores stateful
Summary:
A non-static class can contain static methods;
Static classes can only contain static methods (no non-static methods are allowed to exist)
Two. Static and non-static methods (instance methods)
Priority in Memory when Class Loaded:
Class loads at load time: Static variables----and non-static members/variables (after class instantiation)
Access Different:
In C #, non-static methods can access static and non-static members, but static methods can only access static members
(A static member is a resource that you share, and a static method does not belong to an instance, so a non-static member (instance member) cannot be called)
. Static and non-static classes, static and non-static members in net