Sunday, December 03, 2006

Declared Accessibility Keywords .NET

Declared accessibility keywords definition are mostly the same for all the programming lanugage. In the next lines, I will state the basic definition of each acessibility keyword for .NET languages

Class Accessibility:

A class or struct can be declared as internal or public

internal:
access limited to the current assembly only.

public:
class marked as public can be accessed from outside the assembly.

By default, classes are declared as internal, unless you didn't add the public kewyrod in the class declaration.


Class Members Accessibility

protected:
Access limited to the types derived from the containing class.

private:
only class contains this member can access this member.

internal protected:
access limited to the current assembly OR access limited to the types derived from the containing class.

kick it on DotNetKicks.com

0 comments: