When ….

Posted Sat, Feb 21 2009 11:56 by bill

VB has a lot of high level features other .Net languages, in particular C# don’t.  Sadly these are often overlooked by some developers because other languages like C# don’t have them – the lowest common denominator syndrome.  This is sad because many of these features are actually part of the .NET runtime.  For example, VB has full interface mapping, C# has only a limited form of interface mapping they call explicit interface implementation which for them relies on a  constrained naming pattern.  Another example is custom events in VB, where VB provides the full encapsulation the CIL provides: being the Add, Remove and Raise for the event. (C# doesn’t support the Raise or Fire).  The most obvious example would have to be Optional parameters. For years the C# brethren dismissed them as evil and in C# 4.0 now tout them as their amazing new feature they’ve added ;)

Another rarely spoken of feature that VB and the .NET runtime support are exception filters … the When clause.  

Read why you should use When in the CLR team’s blog:


Filed under: , , ,