Monday, May 9, 2011

ByVal goes bye, bye

One of the nice enhancements to VB.NET in Visual Studio 2010 sp1 is the removal of the auto-insert-ByVal keyword.  If you don't type ByVal, then Visual Studio now respects that and doesn't try to insert it for you.  As ByVal is the default anyway, it's much nicer to omit it so that when you use ByRef, it really stands out.  A simple find and replace of your ByVal's, and your code instantly looks and feels cleaner.  Thanks Microsoft!