Web Development

Some keywords in C#

All members have their own accessibility level, defined in all cases by one of the following keywords

  • public: Member is accessible from any code
  • private: Member is accessible only from code that is part of the class
  • internal: Member is accessible from code within the project where it is defined
  • protected: Member accessible only from code that is part of either the class or a derived class
  • protected internal: These are only accessible from code-derived classes within the project
  • static: Static members owned by the class rather than by object instances.
  • virtual: Method may be overridden
  • abstract: Method must be overridden in non abstract derived classes
  • override: Method overrides a base class method
  • extern: Method definition is found elsewhere
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s