Microsoft’s C# programming language sometimes reminds me of a pinata – it is full of surprises. The latest one comes in the form of the two delegate definitons below:

//DELEGATES
public delegate void doneSearchingDlg();
public delegate void newResultDumbDlg();

doneSearchingDlg doneSearching;
newResultDumbDlg newResultDumb;

In case anybody is new to C#: a delegate is a function pointer which can accumulate multiple functions, which are then all called at once with a single call. But this is not the reason for this little rant – instead, I am pissed about why the declarations cannot look like this:

//DELEGATES - CAN NOT COMPILE AS OF VS2005
public delegate void doneSearchingDlg() doneSearching;
public delegate void newResultDumbDlg() newResultDumb;

In plain-old vanilla C, almost every language primitive can be animated while it is being declared – why this feature was omitted from Delegates is a mystery to me.

Ideas, anyone?


Related posts:

  1. Determine a font’s line height in .NET CF(.NET compact framework)
  2. HTC’s Q1/Q2 2010 line-up
  3. Why version 2 of the .NET Compact Framework isn’t in the ROM of most Windows Mobile 5 devices
  4. Change your Agendus language
  5. News from the mobile flash world