Example of Static and instance class member in c# programming

In my previous article, we have already discussed about difference between both static and non static members. Today we will learn example of both. Static member are not accessible by instance of the class. Look
Example of Static and instance class member in c# programming
 In above snap, you can see that compile time error has been occurred, because static member are not accessible by the instance of the class. Static member are only accessible by the class name. Look
Example of Static and instance class member in c# programming
so common variables are composed static members. While, we need object for calling non-static members.
While, we need object for calling non-static members.

Comments

Popular posts from this blog

difference between structure and union in C Language

Difference between Linear search and Binary Search in c language

Difference between static and dynamic websites