Delegates available to you in .NET 2.0

25 Aug 2006 With the introduction of anonymous methods, using delegates has become a lot more straightforward. Even so, delegate definitions are still required to which an anonymous method can map. Thankfully there are a few delegates already defined in the framework so that you can reuse them in your own methods, saving...

Easy to be forgotten in the history of science

04 Aug 2006 Emilie du Châtelet - the scientist whom history forgot - A woman that in her emancipation was well beyond her time and whose intelligence must have scared most of them away. Apparently she was fairly important to physics, yet it's a name you do not come across very often.

Log Entry 2711.07.16

24 Jul 2006 Bonkers. Crap. Shite. We have spent the last 12 hours fishing containers escaping from the Limelight's portside. Don't ask. Right, you can't, you're just a diary. I am supposed to tell you. Compartment  10 was vacuum'd, after which I opened the lock, just to be on the safe side. Unfortunately...

Unit testing events with anonymous delegates

24 Jul 2006 The other day I figured out that anonymous delegates can also help you to test an event while staying nicely contained within a single test method. The following is one of the unit tests of the FixedUndoStack class which you can find at my downloads section: [Test] public void TestOnPopEvent()...

Small trap on .NET 2.0 List object

19 Jul 2006 Consider the following small c# 2.0 program: class Program { static void Main(string[] args) { List<int> l = new List<int>(); int i = 0; bool truth = l.TrueForAll(delegate(int z) { i++; return false; }); Console.WriteLine("i is {0} and truth is {1}", i, truth); Console.ReadKey(); } } The delegate passed into...