If you have a set of variable members those don’t change for each instance of that class, you can declare them as Static Variable Members.
If a method inside class, accesses no member variables you can declare the method as Static Methods.
Member methods can not use This (VB)/ base (CS) object, as there is no specific instance associated with it.
For accessing static members, you don’t have to instantiate the class. You can directly call the member with class name.
No comments:
Post a Comment