NET
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
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
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
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
11 03 2013
In some cases it is necessary to cleanup unmanaged resources before the GC will do that. Because the GC only have the hand over managed but not unmanaged resources. So you won’t know when exactly unmanaged resource are cleaned up. For this you have to cleanup manually. A pattern for this work is called IDisposable. […]
C#, IDisposable, Interface, NET, Resources, Unmanaged, using
27 02 2013
This is a follow-up of Introducing Extension Methods This method is an extension of the string-class. It reverts a string in a very efficient way and it is widely used around the world. Faster methodes use either unsafe code or only work fast on very short strings. Share :
C#, Extension, Method, NET
1 02 2013
With Extension methods you can extend the existing funtionality of objects and types. In this case we will extend the functionality of an Array. So we need to create two extensions. One for changing the size and one for appending a new element. What do we need for this? At first we need a static […]
Array, C#, Extension, Method, NET
14 01 2013
This time I have a small snippet for you which is for simple processing of ini files. I programmed the snippet a long time ago. At this time I used an other naming convention for code than now. I hope this can be useful. Ini files are still in use for simplified storage of settings. […]
C#, Ini, NET, Snippet