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
Does a class need a constructor c#?
What is garbage collection? How to force garbage collector to run?
Can I use parseint?
What is Assembly. and Describe type of assembly. why most developer happy with private assembly.
How can we set the class to be inherited, but prevent the method from being over-ridden?
What is assembly c#?
What is use of a HashTable in .NET?
What do you mean by default constructor?
Can we inherit private members of class in c#?
What is the implicit name of the parameter that gets passed into the class set method?
What is the importance of closing an ado.net application?
What does return do in for loop?
What is the difference between protected and internal in c#?
Are c# generics the same as c++ templates?
What are handlers in c#?