Monday, March 16, 2009

Different accessibility levels defined in .NET

public : Access is not restricted.

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

internal : Access is limited to the current assembly.

protected internal : Access is limited to the current assembly or types derived from the containing class.

private : Access is limited to the containing type. Outside classed can't access private type

Only one access modifier is allowed for a member or type, except when using the protected internal combination

No comments: