what is accessspecifier and explation each with example?

Answer Posted / pranoti moghe

There are basically 5 access specifiers in .net...
Public - meaning members can be accessed from anywhere..even outside the assembly...
Private - meaning members cannot be accessed outside a class..
Protected - meaning members can be accessed in that class and to the derived classes....
Protected internal
Internal

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define a manifest in .net?

623


What is an escape sequence? Name some string escape sequences in c#.

579


What is a dimensional array?

521


What is linq c#?

564


Is string immutable in c#?

639






What is yield return in c#?

550


What is difference between string and string builder?

577


How is a string immutable?

554


What is the difference between finalize() and dispose() methods?

613


Why do we use static methods in c#?

594


What is default method in c#?

568


What is private class in c#?

538


What's the difference between System.String and System..StringBuilder in C#?

552


What is the difference between a constant and a static readonly field?

589


What is the main method?

548