Click here to Skip to main content
15,906,567 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
can u tell me about public and private and protected
Posted

Read a book! Please stop posting these basic questions here, you can get all the answers by looking at the link I posted for one of your other queries, or getting hold of a book on C#.
 
Share this answer
 
when we declared a class or class member access modifier as 

Public:
 when we declared as public which can accessed by all the classes and  project members

Private:
 it can be accessed by only current class members,which can't accessed by outside class members.

Protected:
 which can accessed by current class members and derived class(inherited class) members.

I hope it gives overview on that... Accept as solution if it helps..
thanks...;)
 
Share this answer
 
Atleast try to search in google..There you will get many learning websites..

http://stackoverflow.com/questions/614818/what-is-the-difference-between-public-private-protected-and-nothing[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900