Monday, July 28, 2008


There are Five Access Modifiers available in .NET. Following are the functionalities of these Modifiers.

Term Used With… Visibility
Public Variables/Properties/Methods/Types Anywhere in or outside of a project

Private Variables/Properties/Methods/Types Only in the block where defined

Protected Variables/Properties/Methods Can be used in the class where defined. Can be used within any inherited class.

Friend Variables/Properties/Methods Can only be accessed by code in the same project/assembly.

ProtectedFriend Variables/Properties/Methods Combination of Protected and Friend

No comments:

Difference Between Apache Common Logging and Log4J

Dear Folks, Log4j is a logging framework, i.e. it provides the code to log messages while Commons-logging is an abstraction layer for log...