Skip to Content
C# 7.0 – kurz & gut, 5th Edition
book

C# 7.0 – kurz & gut, 5th Edition

by Joseph Albahari, Ben Albahari
April 2018
Intermediate to advanced content levelIntermediate to advanced
238 pages
4h 32m
German
dpunkt
Content preview from C# 7.0 – kurz & gut, 5th Edition

Interfaces

Ein Interface ähnelt einer Klasse, stellt aber für ihre Member nur eine Spezifikation und keine Implementierung bereit. Ein Interface hat folgende Besonderheiten:

  • Interface-Member sind alle implizit abstrakt. Im Gegensatz dazu kann eine Klasse sowohl abstrakte als auch konkrete Member mit Implementierungen bereitstellen.
  • Eine Klasse kann mehrere Interfaces implementieren. Im Gegensatz dazu kann sie nur von einer einzigen Klasse erben. Structs können Interfaces implementieren, aber nicht von einer Klasse erben (davon abgesehen, dass sie von System.ValueType abgeleitet sind).

Eine Deklaration eines Interface ist wie eine Klassendeklaration, stellt aber für seine Member keine Implementierungen bereit, da alle seine Member implizit abstrakt ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

C# 8.0 – kurz & gut, 6th Edition

C# 8.0 – kurz & gut, 6th Edition

Joseph Albahari, Ben Albahari
Reguläre Ausdrücke Kochbuch

Reguläre Ausdrücke Kochbuch

Jan Goyvaerts, Steven Levithan

Publisher Resources

ISBN: 9781492067740