C#
4 04 2014
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 […]
3 04 2014
Welcome to a short trip to a concrete function of the .Net Framework: Path.GetTempFileName In my current project we have a lot of unit tests where a lot of temp files (created by Path.GetTempFileName) are used and a build server that builds the projects and executes the unit tests. Some week ago we noticed that […]
65536, C#, Code, exception, GetTempFileName, Limitation, Method, NET, Path, Path.GetTempFileName
24 03 2014
As announced in my post about the “Null Object Pattern” I will explain the “Visitor Pattern” today. At the first time I maintained an application with visitors, I found it a bit confusing – Therefore I try to explain it based on my own experiences. The Visitor is a pattern of the category of behavior […]
Accept, C#, Code, Design, Game, Interface, Method, NET, Object, Patterns, Visit, Visitor
17 03 2014
As preparation for the post about the “Visitor Pattern”, we will make a short trip to the “Creational Patterns” with the “Singleton”. As the name suggests it means: single, only one. Like the Highlander: There can be only one! Let’s take a look at the UML diagram. The singleton assumes responsibility over it’s creation – […]
C#, Central, Design, GetInstance, Highlander, Patterns, Single, singleton, UML, Unique
17 03 2014
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 […]
enum, iterate, performance
23 02 2014
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 […]
Architecture, C#, Design, Null, Object, Patterns
7 02 2014
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 […]
Archtecture, Behaviour, C#, Code, Creation, Design, Facade, GoF, Object, Observer, Patterns, Proxy, Quality, Structure, Visitor
4 02 2014
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 […]
3 02 2014
For my current customer I develop tools and plugins for Eclipse and TTCN3 ( a hardware testing language) in Java and help the development team to improve the coding-style with code reviews on a weekly basis. The question above occurred on the review last Friday and I thought it’s worth sharing, although C# don’t allow […]
break, continue, finally, Java, return
15 01 2014
Some days ago i got the problem, that I have to use a custom dictionary with as parameter for a service – therefore it must be serializable. I found an interessting solution from “Paul Welter” at his blog (XML Serializable Generic Dictionary). But that’s not all! I had to implement the Constructors for Dictionary and […]
C#, dictionary, Generic, Interface, NET, Serializable, Snippet, XMl