dotnetomaniak.pl - Artykuły z tagiem C# delegate

Have you ever wondered why blue screens of death happen so rarely, nowadays? Of course, we can thank Microsoft for this but the way they fixed this problem is not so obvious! According to Marino Posadas (and his book Mastering C# and .Net Framework) back in 2010, Microsoft made an analysis of this topic and they came to the conclusion that the 90% (wow!) of the blue screens were caused by drivers! So, Microsoft made manufacturers to follow the Hardware Compatibility List. That somehow solved most of...

C# stuff nobody told you – delegate is a class! And there is a good reason for that! – A Girl Among Geeks

Sztuka programowania 2444 dni, 23 godziny, 22 minuty temu AGirlAmongGeeks 187 źrodło rozwiń

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 źrodło rozwiń