Code Inspection and Quick-Fixes in Visual Basic .NET
Almost all ReSharper's code analysis features available in C# (except for Value Tracking) are also supported in Visual Basic .NET. You can find the detailed information on these features in the corresponding topics of the Code Analysis section.
In this topic, you can find some examples of using code analysis features in Visual Basic .NET:
ReSharper detects errors and highlights them with red curly line or displays unresolved symbols in red. Hover the pointer over the error to see its description as a tooltip. For more information about the ways to find out why the code is highlighted, see Finding Out What is Wrong with Your Code. Since ReSharper has its own code inspections, you can specify whether to display them as errors, warnings, suggestions, hints, or not to display at all. For more information about configuring inspections, see Configuring Code Inspection Settings.
ReSharper does not only analyze errors in the current file, but also
inspects the whole solution taking the dependencies between files into account and shows
the results of analysis in the
Errors in Solution
For more information, see
Inspect This is a shortcut to several analysis features. Those are rather powerful and allow you to see how values and method calls flow through you code. The list of available features depends on the current context. For more information, see Call Tracking, Value Tracking and Exploring Type Hierarchy.
Examples of Quick-fixes
Remove redundant 'imports'
If none of the symbols from a particular namespace are used, the corresponding
directive is considered as redundant.
ReSharper provides the quick-fix to remove all such directives from a file.
Add 'Async' modifier
Asynchronous operations have some advantages over synchronous programming, so ReSharper keeps pace with times and new language features for asynchronous programming are thoroughly supported. The
function contains the
operator, but the function isn't defined as asynchronous. ReSharper detects such mismatch and
prompts to improve the code using the
Add 'Async' modifier
After applying the quick-fix, the missing modifier is added to the function declaration.