Instant VB FAQ
Q: Are the original C# files altered in any way?
Your existing code is left completely intact.
The new VB.NET project is output to the new location that you specify.
Q: What version of C# is converted?
We attempt to convert as much as possible and are continually updating the converter
to handle newer C# features. However, many new C# features have no VB equivalent so the output will require adjustments.
Q: Do you guarantee a 100% complete conversion?
No — our accuracy is very high, but there will be
some adjustments required for all but the simplest conversions. Read the rest
of the FAQ to get an idea of a few things that are not converted.
Q: What type of code is not converted?
- 'unsafe' code blocks and types are not converted.
- ASP.NET script.
- Code having statements fragmented by preprocessor conditions.
Processing stops for a file when this type of situation occurs.
e.g.,
int i =
#if FOO
0;
#else
1;
#endif
The file can only be converted if the above code is rewritten as:
#if FOO
int i = 0;
#else
int i = 1;
#endif
Q: What are the most common adjustments necessary after conversion?
- VB does not allow assignments within expressions, but C# does (e.g.,
while ((x = y()) > 0) assigns a value to x as part of an
expression). Instant VB will convert some cases, but will mark other more
complex cases with a 'task' comment. You must manually
adjust these.
- Most reference type comparisons are converted, but occasionally you
may need to manually change an equals sign to "Is".
The VB compiler makes these adjustment requirements obvious.
- VB does not allow overloading when it is based only
on the direction of the parameters (ByVal vs ByRef).
Methods overloading done this way will require renaming of the method name in VB.
- Project conversions never produce auto-generated files, such as the Resources.Designer.vb or Settings.Designer.vb files.
For .NET Core projects, these should be automatically re-generated (may require saving the resources or settings), but for .NET Framework projects, after conversion you will need to right-click on the
"Settings.settings" file within Visual Studio and select "Run Custom Tool" to force auto-generation of the Settings.Designer.vb code file.
Similarly, you will need to right-click on the "Resources.resx" file within Visual Studio and select "Run Custom Tool" to force auto-generation of the Resources.Designer.vb file.
- Unfortunately, many new C# features beginning with C# 7 have
no equivalent in other languages.
Additional Resources
VB.NET and C# comparison and equivalents chart
C# – Visual Basic bilingual dictionary
Copyright © 2004 – 2024 Tangible Software Solutions, Inc.