Tuesday, November 28, 2017

Classes in C#

asd

  1. class MyClass
  2. {
  3. protected void MyMethod() { }
  4. }

new

internal

A common use of internal access is in component-based development because it enables a group of components to cooperate in a private manner without being exposed to the rest of the application code.

public

Eric Lippert on Everything public: Modifiable, extensible and customizable code is a feature which costs money. You don't get it for free by making everything public because that causes even more problems; now the library maintains none of its invariants, and violations of invariants are called "bugs".