Strona głównaSztuka programowania

Many people neglect C# delegates because they cannot find a reason to use them. On the other hand, there is (rather small) group of people who overuse delegates in code that could be easily replaced by literal method call. So when should we use delegates? Well, they show their real power in situations when we need a mechanism to easily switch from one logic to another, without changing our application’s core code. Sounds ok but what does it mean in a real life? It’s time for a fairy tale 😊. Imagine...

Dziel się z innymi:
C# Delegates – a fairy tale about when (and how) to use them – A Girl Among Geeks

Sztuka programowania 2457 dni, 1 godzinę, 35 minut temu AGirlAmongGeeks 117 pokaż kod licznika zwiń

Wczytywanie artykułów...