Home of the AlmostImplementedException

Difference between a Duck

cast vs “as”

Another good example for our categories “difference between a duck” AND “CleanCode” is an ordinary ()-cast against “as”-cast. Why is it in both categories? Both do roughly the same thing and its more a question of code-style which one you use. But more important both use different ways to approaching the same problem and thats […]

Modulus vs Bit Operation

Modulus vs Bit Operation A while ago i read a question on stackoverflow what method is faster to determine if a number is odd or even in C#. Modulus (i % 2) or a bit operation (i & 1). And the first answere marked as right was the bit-operation. Everybody knows that this way was […]

For vs Foreach

Sometimes, especially with C# you hear alot of “common knowledge” about performance and developers mistakes. As an (bad) example I want to refer to 8 Most common mistakes C# developers make and in particular point 7 “using foreach instead of for”. So whats wrong with this kind of post? First of all, it refers to […]

Difference between a duck

Today we introduce a new category on Difference between a duck. We took that line from the movie Postal. And the category is about things that are the same or look alike and also about things other think are the same but actually they are different. For a start I’ll show that for and […]