Example of Static and instance class member in c# programming

February 12, 2014 0 Comments

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.

Jacob Lefore

Some say he’s half man half fish, others say he’s more of a seventy/thirty split. Either way he’s a fishy bastard. Google

0 comments: