13.07.2015 Views

C# Language Specification - Willy .Net

C# Language Specification - Willy .Net

C# Language Specification - Willy .Net

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>C#</strong> LANGUAGE SPECIFICATIONabstract class C: IMethods{public abstract void F();public abstract void G();}Here, the implementation of IMethods maps F and G onto abstract methods, which must be overridden in nonabstractclasses that derive from C. end example]Explicit interface member implementations cannot be abstract, but explicit interface member implementations areof course permitted to call abstract methods. [Example: For exampleinterface IMethods{void F();void G();}abstract class C: IMethods{void IMethods.F() { FF(); }void IMethods.G() { GG(); }protected abstract void FF();protected abstract void GG();}Here, non-abstract classes that derive from C would be required to override FF and GG, thus providing the actualimplementation of IMethods. end example]292

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!