Metoda wirtualna

Metoda wirtualna (funkcja wirtualna) to metoda, która może zostać nadpisana w klasach dziedziczących[1][2][3]. Metody wirtualne umożliwiają polimorfizm[4].

  1. What are Virtual Methods? [online], Stackoverflow, 12 października 2024 [dostęp 2024-10-12] (ang.).
  2. C# language documentation: virtual [online], Microsoft, 12 października 2024 [dostęp 2024-10-12], Cytat: The virtual keyword is used to modify a method, property, indexer, or event declaration and allow for it to be overridden in a derived class (ang.).
  3. Virtual Function in C++ [online], Geeks for geeks, 12 października 2024 [dostęp 2024-10-12], Cytat: A virtual function (also known as virtual methods) is a member function that is declared within a base class and is re-defined (overridden) by a derived class (ang.).
  4. Virtual Function in C++ [online], Geeks for geeks, 12 października 2024 [dostęp 2024-10-12], Cytat: They are mainly used to achieve Runtime polymorphism (ang.).

From Wikipedia, the free encyclopedia · View on Wikipedia

Developed by Nelliwinne