What are the access-specifiers available in c#?
Answer Posted / vakil vijay vamangari
Public: With respect to the assembly the variable,methods of
public class can be access any where .
Private: This is default in c#.net.With respect to the
assembly the variable,methods of private class can be
access only with in that class only.
Protected: With respect to the assembly the variable,methods
of protected class can be access with in that class(base
class) and accessed in class which is derived from that
base class.
Internal(friend in vb.net): With respect to the assembly the
variable,methods of internal class can be access with in
that assembly not the outside of that assembly
Protected Internal: Protected + Internal
With with respect to the assembly the variable,methods
of this class can be access with in that assembly and
protected out side the assembly
| Is This Answer Correct ? | 4 Yes | 13 No |
Post New Answer View All Answers
What are Memory foot print of an exe?
What is concrete class in c#?
What are virtual classes in c#?
Explain dataset.acceptchanges method in .net?
What are the uses of namespaces?
Does c# support parameterized properties?
Distinguish between the Debug class and Trace class with its functionality?
Can we inherit partial class in c#?
What is the difference between xml documentation tag?
Do void methods have parameters?
What are custom exceptions? Why do we need them?
what are the Disadvantages of vb
What is datareader c#?
What is web forms in c#?
What is list array in c#?