The New C# 6.0 Language Features Explained

I am a professional and passionate software developer and have been using the Microsoft :NET platform for more than a decade now. A few months ago the new C# compiler was released which supports the new language version C# 6.0. The following video which I recorded “wiff ze German English accent” I explain some of…

Windows 10: Disable the Language Bar in the Taskbar

Windows 10, like other Windowses before it, bring the language bar with it. My Windows UI is in English by default but I prefer my keyboard the German way. For such use cases Microsoft invented the language bar. Normally the Language Bar is easy disable-able – at least it used to be. I don’t actually…

Yield return & using IDisposable

Deutsche Version “Yield return” is a powerful and handy statement if you want to quickly and easily an iteratable list without creating an Array or a List first: using System; using System.Collections.Generic; using System.Drawing; class Program { static void Main() { var colors = Rainbow; Console.WriteLine(“colors.GetType(): {0}”, colors.GetType()); Console.WriteLine(); foreach (Color color in colors) {…

Linq: Split()

Deutsche Version So you know the Cinderella saying “The good ones go into the pot, the bad ones go into your crop.”? Well, .NET Linq does have a solution for either one, it’s called Where(). If you use that, your solution probably looks like this: var evens = list.Where(number => ((number % 2) == 0));…

WPF: MVVM & Responsive UI

Deutsche Version A few days ago I wrote about my first tumbling steps into the world of WPF & MVVM. Now a friend of mine – who’s been working in that very field – has challlenged me: a) My GUI should remain responsive while the merge is being executed. b) I should not re-evaluate the…

WPF: MVVM, ViewModel, Model & MessageBoxes

Deutsche Version I’ve never been much of a GUI developer and my programs look it. Where I’m good at is the Businesslogic part of the application. That’s why I’ve always stuck to known territory, where you can align controls along lines and it looked halfway decent (though not pretty). But times they are a-Changin’ and…

My GetService Pattern

In .Net the Interface System.IServiceProvider is a simple and elegant method to query services from other objects without having – or even wanting – to know how the class structure behind it looks like. Is the interface at that class implemented or at another? No matter, you query IServiceProvider and you get an instance of…

My XmlSerializer Pattern

The idea behind the .NET System.Xml.Serialization.XmlSerializer class is that you can easily serialize an XML file into a class tree and vice versa. If you’re using XML Schema files, the xsd.exe tool can create that class tree for you. But for simple applications you don’t even need a schema. You simply create a class that…

Poker Chips Spreader

My buddies and I are playing Texas Hold’em cash games every once in a while. As a start stack you get 5,000 in chips. Since it is a varying degree of players every evening (from 4 up to 8 so far) I wrote a little app that would determine what kind of chips the start…

Windows 8 – The Keyboard Shortcuts You Should Know

Windows 8 was written primarily for touch devices such as tablets and touch screen monitors. If you’re a classic mouse and keyboard user there will be some challenges. For example, did you know that if you want to close one of the new Metro apps, you have to push your mouse to the top of…