C#
Using var keyword in C#
Keyword var is cool thing we can use to make our code more readable for other programmers and why not - reviewers. But var can also be used to make our code difficult to understand. In this case, lte's say, we are overusing var. So, var is like wine - if one takes glass of it then everything is okay in the morning, but if somebody takes it couple of bottles then the morning will be awful. Or let's say - too much var will kill you?
Interface for Processes
I had to write one data import/export utility that moved data from one database to another. Once I was finished the first round of coding I found one thing that needed refactoring - the import/export process wasn't generalized. It was part of importer/exporter utility main class (it was console application). After some refactoring I got some common things to use in other tasks like this.
C# and Partial Classes
.Net 2.0 provided us with new feature called partial classes. Using partial classes we can use multiple files to keep the code of same class. Yes - we can put some methods to one file and the others to another file. Although partial classes may be extremely useful they can be also used to ruin system's technical design if developers don't know what happens behind the compiler.
Safe foreach loops with C#
This is rewrite of my old post about bullet-proof foreach loops. The post covers internals and functioning of foreach. It also shows how to write safe loops and how to modify collections that foreach is stepping through. This post is excellent reading for those who want to have better understanding of foreach loops.