Managed Application Framework – Part 1 – The Beginnings!

By Charlotte

Last week I was tasked with developing a new App for the guys I work with, (not a developers app you understand, but for actual normal users!!! Luckily it puts me smack bang where I work best – developing functional, extendable (and most importantly) Windows based apps. I’m now officially in my comfort zone! The…

Ternary operators don’t work with nullable value types?

By Charlotte

I’ve got the following situation: DateTime? myDt = (DateTime) row[“Column”]; This fails when retrieving a DBNull value, so we check for that: DateTime? myDT = (row[“Column”] == DBNull.Value) ? null : (DateTime) row[“Column”]; This won’t compile, however doing: DateTime? myDT; if(row[“Column”] == DBNull.Value) myDT = null; else myDT = row[“Column”]; works fine, now, I realise…

Production LINQ!

By Charlotte

I’m happy today as I’ve written my first bit of Production LINQ code in the form of LINQ-to-XML. It’s not the most complicated bit of code – only a grabbing of data from a file, but it does do what it says on the tin – uses C# 3.0 and (unfortunately) causes Resharper to complain…