Home of the AlmostImplementedException

Load a DLL at runtime – with hash-check

If you work with very dynamic code or external libraries or need to update your own libraries regularly, you sometimes need to load DLL’s at runtime. With C# that’s very easy. We just have to use the Assembly-class from System.Reflection and call the static methods LoadFrom or LoadFile. You can get a lot of information […]

Fluent Interface Pattern

Chris already discussed a few design pattern like the Null Object Pattern and the Singleton Pattern and today its my pleasure to introduce you to the Fluent Interface Pattern. This pattern is known since 2005 and the founders are Eric Evans and Martin Fowler as you can read in his post and it’s very likely […]

How to iterate through an enum

On occasions it’s necessary to iterate through an enum. Maybe you need to show all values or names or want to use all values in a unit test. Since .Net 4 there are two ways to get the names and values, but as you will see the old way is the better choice. First of […]

, ,

Null Object Pattern

As announced in my previous post about Introducing Design Patterns, I will start with the first concrete post about the “Null Object Pattern”. For this I will take the chess board example from Indexed Properties. What is the Null Object Pattern? It is a design pattern that belongs to the “Behavioral patterns”. This object does […]

, , , , ,

Introducing Design Patterns

As promised in my previous post about “Indexed Properties”, I will start to give you some insights into design patterns. What are “Design Patterns”? To make it short: Design Patterns are universal (language independed) solutions for recurring problems in object-oriented software architecture and development. In this post series we will limit to the common design […]

, , , , , , , , , , , , , ,

Unexpected behavior of foreach

When a program produces wrong results sometimes(!) your code is not the problem, but the compiled result. Thats nothing new, but most developers are not aware of it. It doesn’t necessarily mean, there is a bug in the compiler. Maybe you (and the rest of the world) just expected another behavior. Today I want to […]

Previous Posts

Theme created by Powered by