Re: [ANN] Introduction to Object Oriented Programming Concep
От: igna Россия  
Дата: 19.04.08 07:13
Оценка:
Здравствуйте, SchweinDeBurg, Вы писали:

SDB>Introduction to Object Oriented Programming Concepts (OOP) and More


Неортодоксальный пример полиморфизма оттуда:

In OOP the polymorphisms is achieved by using many different techniques named method overloading, operator overloading and method overriding,

4.18. What is Method Overloading?

The method overloading is the ability to define several methods all with the same name.

public class MyLogger
{
    public void LogError(Exception e)
    {
        // Implementation goes here
    }

    public bool LogError(Exception e, string message)
    {
        // Implementation goes here
    }
}

 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.