Fixing Errors and Code Issues

The light bulb and quick actions can help you fix errors and code issues very quickly, without needing to leave the active code editor window. To understand more about this feature, consider the following line of code, which attempts to declare an object of type Perso that obviously does not exist:

Dim p As New Perso

The compiler detects that the Perso object does not exist, and so it shows a red error squiggle. At this point, hover over the Perso object with your mouse, and when the light bulb appears, click the arrow to expand the available quick actions or click Show Potential Fixes. As you can see in Figure 6.7, Visual Basic shows a number of possible solutions. For each solution, it also shows a preview where ...

Get Visual Basic 2015 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.