C#
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
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
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
4 01 2014
Welcome in the new year! Hope you all enjoyed your holidays 🙂 Today I will show you how to make use of indexed properties in your own classes. Why we want it? Well, in some situations you want to give your class a partial behavoir of an array, or list, or dictionary. Let’s use a […]
Array, C#, Chess, dictionary, field, Indexed, list, pattern, Properties
10 04 2013
Today I will show up how we could build an application that is able to can debug another. Since a while I got a problem to control an obsolete program that is productive for a while in the company I work, because it is regulary crashing and we have to know when this happens to […]
C#, debug, exception, mdbg, NET
1 04 2013
It is good practice to use enums to choose which part of the code should be executed, but sometimes you’ll get a string and have to convert it to an enum. Here is, how you can do it. First, declare a custom enum or use a given one. And then use the Enum.Parse command. This […]
C#, convert, enum, snippets
15 03 2013
In .Net 4.0 Microsoft indroduces a new universal cache. For quite some time caches were already present in ASP.Net, but could (should) not be used in C# or VB.Net. With the new package System.Runtime.Caching there is now an easy way to implement a cache in any program, like a WebService or WPF-Application. As you will […]
C#, Cache, NET