C# – Static versus Instance Members

Static member – no instance of the class required to call method.

Instance member – must create an instance w/ new keyword to call methods and properties.

Can mix in the same class, but can not reference instance members from inside of static members.

Classes can be decorated w/ static keyword – all members must be static, can not create a new instance of the class.

For Example System.Math

 

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.