check the link....
What are the access specifier in dotnet(C#.net)?
you know we have objects (such as classes,methods,variables,
events,...) in programming, so we should define scope for accessing them.
access modifier(or specifier) helps us with that.
we define access scope of an object via access modifier.
for example:
1)public %26gt;%26gt;%26gt;%26gt; object is accessible from anywhere of your code within the namespace
2)private %26gt;%26gt;%26gt;%26gt; object is accessible from the class which object is defined in,and all subclasses of it
3)protected %26gt;%26gt;%26gt;%26gt; object is accessible from the class which object is defined in, and all inherited classes
attention:
if you want to access it from another name space should use "static" after public %26gt;%26gt;%26gt; "public static"
I wish it would be helpful
Reply:Upto my knowledge,
private,
protected,
protected friend,
public,
friend
These are the access specifiers in dot net
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment