So, you think you know LINQ?
I’ve just stumbled upon this quiz which is published as part of a “C# 4.0 In A Nutshell” book, but provides a great test for your LINQ knowledge: C# 4.0/3.0 in a Nutshell – LINQ Quiz There are some particularly tricky ones in there. I fell flat on questions 6 and 9. Those are the [...]
The Invention of “CharvaScript”
James (at work) said to me out of the blue that he thought of a language when at uni to be called “CharvaScript”. Apart from making me laugh, it made me think a little. So I thought some more. Then I stopped thinking and picked my nose. Then I thought some more again. I came [...]
DataRow[DataColumn] performance enhancements
Since the system I work on performs about 1000 DataTable specific manipulations per minute, I’ve been going through and working out some ways to speed it up that little bit more. Take the following code: DataTable myData = new DataTable(); myData.ReadXml(“myxml.xml”); if (myData.Rows[0].IsNull(“column1″)) return null; else return myData.Rows[0]["column1"]; The obvious performance improvement here [...]
T-SQL Race Conditions (and how to avoid them)
I’ve been writing T-SQL stored procedures for many years now, and I never fully understood how the concurrency of multiple users truly affects the asynchronous operation of certain types of paradigms until now. Take the following T-SQL: SELECT @ID = ID FROM tblTable WHERE nvhSomeText = ‘match’ IF @ID IS NULL INSERT INTO tblTable (nvhSomeText, [...]
