Visual Basic Blog

A group blog from members of the VB team

The many cases of ByRef

One of the overlooked or simply misunderstood features of the VB language is calling a function which has a ByRef parameter.  Most languages support only a single method of passing parameters by reference [1], that is the scenarios directly supported by the CLR.  The CLR has a lot of restrictions on the type of values it supports for...

VB Catch … When: Why so special?

The VB Catch syntax has a unique feature: When.  It allows users to filter expressions based on something other than their type.  Any arbitrary code can enter a When block to decide whether or not to handle an Exception. Newsgroups often ask, "Why's this so special? I could effectively get the same behavior out of C# by doing the ...

Did you know? 300+ Visual Studio Tips & Tricks (Lisa Feigenbaum)

Did you know that Sara Ford just recently passed the 300 mark for her Visual Studio Tips & Tricks? Sara used to be a tester on the Visual Studio Core IDE team, and knows the IDE inside and out! I remember the first time I met Sara was 4 years ago when she was writing some automation and called to find out the expected ...

PInvoke Interop Assistant on CodePlex (Jared Parsons)

I'm happy to announce that the PInvoke Interop Assistant tool is now available on CodePlex.  This includes the binaries, source code and the dev authored unit tests.  It is hosted on the more general CLR Interop Tools page.  http://www.codeplex.com/clrinterop I will be actively maintaining this tool in the future and (hopefully...

Did you know? You can now manage your snippet highlighting (Lisa Feigenbaum)

Do you use code snippets (introduced in VB 2005)? If you do, then you've probably noticed the green highlighting that stays around for the lifetime of the file. We've heard *a lot* of feedback that once you are done customizing the snippet, it is distracting to see this highlighting stay around. To address this, VB 2008 has improved the ...

Making PInvoke Easy

Jared here again.  I very excited to announce we recently released a tool I've been working on to MSDN that will greatly help with using PInvoke in managed code.  The tool is called the "PInvoke Interop Assistant" and is included as part of a MSDN article on marshalling data for PInvoke and Reverse PInvoke scenarios.  Here is ...

Did you know? VB IntelliSense now filters as you type! (Lisa Feigenbaum)

Our goal in designing VB2008 IntelliSense was to make users of the feature the most productive that they could be. One problem we found in watching people use the feature, is that sometimes intelliSense displays so many items that it is hard to know whether or not you're close to the item you're looking for. You basically have to read them all...

Did you know? What you can do with Debugger Datatips… (Lisa Feigenbaum)

There's a lot of cool functionality built into VS debugger datatips that often goes unnoticed... For example, did you know that not only can you *see* values in the expanded datatips, but you can also edit them? Watch the following walk-through... While debugging, hover over a variable to view its debugger datatip: (image) Next press the '+' ...

Did you know? Ctrl+Tab to navigate windows in VS (Lisa Feigenbaum)

Just like Alt+Tab for Windows you can use Ctrl+Tab for Visual Studio. Ctrl+Tab will show you the active tool windows *and* the active files, so it is a good navigation tool for both. VS2008 has even added a cool miniature-sized visualization to this view, so that you can better determine which item you're after. Windows: (image) Visual Studio...