Snippets

Cees Alberts on June 29th, 2014

I made a small application to get images from Flickr and wanted to display this in a website in random order. I found this little snippet of code, which shuffles any collection (using generics) into a random collection. It’s an extension method that extends any collection with a Shuffle method. I just love those extension methods and use […]

Continue reading about Shuffling a collection using generics and an extension method

Cees Alberts on May 20th, 2014

This is a small piece of code I’m using to make the layout of an XML string a bit prettier. It’s very useful if you want to write some XML to a text file that will be edited later. protected string PrettyPrintXml(string xmlString) { XmlDocument xmlDoc = new XmlDocument(); StringWriter stringWriter = new StringWriter(); XmlTextWriter […]

Continue reading about Codesnippet: Prettyfie XML

Cees Alberts on April 3rd, 2011

To stay in the spirit of code sharing and showing of the plugin I found for putting source code in my blog post I decided to add another code snippet! This little snippet of C# shows a method that will make all the first letters of the words in a string uppercase. Okay, okay not […]

Continue reading about A string manipulater method; InitCap

Cees Alberts on April 2nd, 2011

So after registering my URL developerblog.nl and installing wordpress I started thinking about what I would write about. I decided that I will write general ramblings about being a freelance .NET developer having a strange infatuation with the Macbook pro, the iPad and the iPhone. Next to that I also will write more technical blogs […]

Continue reading about Using syntax highlighting