ecnf

ecnf halt

ecnf halt


F. O.
Diese Lernkarten bieten einen Überblick über fortgeschrittene Konzepte der Informatik auf Universitätsniveau, mit Fokus auf Methoden, Interfaces und abstrakte Klassen. Sie erklären, wie Interfaces als rein abstrakte Klassen mit Signaturen, aber ohne Implementierung fungieren, und wie sie von Klassen und Structs implementiert werden können. Zudem werden abstrakte Klassen behandelt, die Methoden ohne Implementierung enthalten und nicht instanziiert werden können. Die Karteikarten sind besonders nützlich für Studierende und Entwickler, die ihr Verständnis von objektorientierter Programmierung vertiefen möchten, insbesondere im Umgang mit Schnittstellen und abstrakten Klassen.
Cartes-fiches
10
Utilisateurs
1
Langue
Allemand
Catégorie
Informatique
Niveau
Université
Créé / Mis à jour
26.02.2014 / 26.02.2014

Cartes-fiches

Declare Field Access

aoeu

Use Field Access

aoeu

How to implement Indexers

aoeu

Usage of Indexers

aoeu

Characteristits of Abstract Classes (4)

  •  Abstract methods do not have an implementation.
  •  Abstract methods are implicitly virtual.
  •  If a class has abstract methods (declared or inherited) it must be abstract itself.
  •  One cannot create objects of an abstract class.
     

Characteristics of Interfaces (12)

  • Interface = purely abstract class; only signatures, no implementation.
  • May contain methods, properties, indexers and events (no fields, constants, constructors, destructors, operators, nested types).
  • Interface members are implicitly public abstract (virtual).
  • Interface members must not be static.
  • Classes and structs may implement multiple interfaces.
  • Implemented by classes and structs
  • A class can inherit from a single base class, but can implement multiple interfaces.
  • A struct cannot inherit from any type, but can implement multiple interfaces.
  • Every interface member (method, property, indexer) must be implemented or inherited from a base class.
  • Implemented interface methods must not be declared as override.
  • Implemented interface methods can be declared as virtual or abstract (i.e. an interface can be implemented by an abstract class).
  • If subclasses of MyClass should be able to override Add() it must be declared as virtual (although Add() is already implicitly virtual in IList).
  • Interfaces can extend other interfaces.
     

How to initialize a Multidimensional arrays (rectangle)

aoeu

imlicit and dynamic variables

Parameter modifiers

void Parameters(int i, ref int ref_i, out int out_i)

  • Implications on assignment
  • On return value

 

variable number of params

void Parameters(int i, params int[] ints)

  • Must be the last parameter
     

Étudier