Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
<strong>C#</strong> method dispatching modifiers<br />
From the perspective of a base class designer<br />
<strong>C#</strong> Syntax<br />
virtual<br />
abstract<br />
sealed<br />
Meaning<br />
Method may be replaced by derived class.<br />
Method must be replaced by a derived class (or redeclared abstract).<br />
Method may not be replaced by a derived class.<br />
From the perspective of a derived class designer<br />
<strong>C#</strong> Syntax<br />
Meaning<br />
override<br />
new<br />
Method replaces a virtual/abstract/override method in the base with its own<br />
implementation, and is still overridable by further derived types.<br />
Method is unrelated to a similarly defined method in the base class. Typically<br />
used to deal with a change to a base class that creates a collision where one<br />
didn't exist before, and where it's not practical to just choose a different method<br />
name.<br />
36