Tag Archives: c#.anti-patterns

A pet hate and anti-pattern: A method returning a bool that can never return false, but can throw an Exception.

Recently I came across some code that, while syntactically correct, does something that always gets to me. Let’s illustrate it with an example: using System; namespace Example { public class AntiPatterns { public bool NeverReturnsFalse() { try { // Do … Continue reading

Posted in Programming | Tagged | Leave a comment