C# FAQ: How do I convert or upgrade my Visual Basic application to a CSharp application?
Microsoft .NET Framework, ASP.NET, Visual C# (CSharp, C Sharp, C-Sharp) Developer Training, Visual Studio
| CSharp-Online.NET:FAQs |
| edit |
[edit]
How do I convert or upgrade my Visual Basic (VB) application to a C# application?
There are several options:
- Manually, recode the entire Visual Basic application in C#.
- Use the existing code as a VB class library; but, use C# for your new development. Your C# application can call the VB functions via COM Interop.
- Convert the existing VB code base to VB.Net; then, develop new C# code in a separate assembly. (Remember that VB.NET can do virtually anything that C# can and with comparable performance.)
- Use the Visual Basic Upgrade Wizard to convert from VB 6 to VB.Net; then, use a third-party VB.Net to C# conversion utility. However, the Wizard generates ugly code which depends on the Visual Basic 6.0 Compatibility Library for backwards compatability with legacy code. If the Wizard is unable to convert everything on the first try, you will have to painfully iterate through the whole process.