What is difference between private, protected, and public in C#?
Answer / Ravindra Kumar Tiwari
In C#, Access Modifiers are used to control access to a class member (field, property, method, or event) from other classes. The three access modifiers are Private, Protected, and Public.nnPrivate members can only be accessed within the same class.nProtected members can be accessed within the same class and derived classes.nPublic members can be accessed from any class.
| Is This Answer Correct ? | 0 Yes | 0 No |
What does the term immutable mean?
3 Answers Satyam, Siebel Systems, Techno Labs,
What is a static class in c#?
What is default constructor c#?
What is an enumerator c#?
What is equal c#?
What is difference between int and int in c#?
Explain the advantage of using system.text.stringbuilder over system.string?
Is string passed by reference in c#?
How do you implement multiple inheritance in .NET?
What is Reflection in .NET? Namespace? How will you load an assembly which is not referenced by current assembly?
Explain constructor?
Can destructors have access modifiers?
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)