Tricked by the IDE, broke the build

Posted on Tue 18 September 2012 in Coding • Tagged with fail, vb.net, csharp, vs2010

Over the last year, I’ve written a fair amount of Visual Basic .NET code for a customer project. As a result, I know a lot more VB.NET than I would like to, and I’ve run into a number of peculiar behaviors, such as this one. In this ...


Continue reading

Regular expression multiline mode - what's a newline?

Posted on Wed 30 May 2012 in Coding • Tagged with newline, regular expressions, csharp, java

I stumbled upon an interesting little detail as I was using a regular expression in a unit test case in a C# application. I had a multiline string and was searching for a particular substring in multiline mode. The newlines in the string were Windows newlines, meaning CR followed by ...


Continue reading

Strongly typed properties in Java vs C#

Posted on Thu 19 January 2012 in Coding • Tagged with delegate, generics, method group, csharp, java

The background for this post was that I needed to implement strongly typed properties in a C# project. With strongly typed property, I specifically mean a strongly typed version of public object GetProperty(string propertyName), where the property name is a constant (or name) of some sort, and the return ...


Continue reading