Advertisement



< Prev
Next >



C# Class Member Access Modifiers






In C# language, when you define a class, you declare its data members and define its function members, where: These class members(data member/function members) are declared with an access modifier to specify how they are accessed by the other classes. In this tutorial, we are only going to discuss the access modifiers of class members such as instance variables and methods. The rest of the class members are discussed in their separate tutorials.




Class member access modifiers


In C#, a class member can take any of the access modifiers, such as -



After compiling :


Hello from class A
10





Please share this article -





< Prev
Next >
< C# Class and its members
C# Interface >



Advertisement

Please Subscribe

Please subscribe to our social media channels for daily updates.


Decodejava Facebook Page  DecodeJava Twitter Page Decodejava Google+ Page




Advertisement



Notifications



Please check our latest addition

C#, PYTHON and DJANGO


Advertisement