4

I have an ASP.NET WebForms 4.0 application that I built as a sole developer. I started it in VB/Webforms because that is what I knew at the time.

I have now been doing C#/MVC and desperately want to switch the project over.

I know you can integrate MVC into Webforms (I've done that on another project). However, how can I move from VB to C#? I really don't want to start MVC in VB, so I feel the first thing I need to do is switch the project to VB.

If I want to move to C# slowly over time (part time development, as I add features), how can I go about doing that since it's an application and not a website? As far as I know, the application has to be all VB or C# unlike websites.

7
  • As far as I know you can have both .cs and .vb files in the same solution.. Commented Jul 30, 2013 at 3:00
  • 1
    @retailcoder, you can in the same solution, but AFAIK, you can't in the same web application project. Commented Jul 30, 2013 at 3:21
  • No, but you can reference the c# dll from the vb dll and rewrite it in c# one bite at a time, replacing vb implementations by their rewritten c# equivalents.. that's how I'm tackling a VB6 to c# rewrite, while keeping the VB6 app in production. Commented Jul 30, 2013 at 3:27
  • @retailcoder, but would I be able to have C# aspx pages in a separate project and can you have two webform projects in the same solution? Commented Jul 30, 2013 at 4:04
  • 1
    Webforms and MVC are two different technologies just concentrate on that and for vb to c# each part of vb can be converted to C# and there google will help a lot in that Commented Jul 30, 2013 at 9:40

3 Answers 3

1

This is an online translator for the two programming languages:

http://converter.telerik.com/

From my past experience it works pretty well.

Sign up to request clarification or add additional context in comments.

1 Comment

Good suggestion, I just tried it. I don't know if I'd like all the code it produces, but something I could slowly tweak at least.
0

As I mentioned in the comment .

Webforms and MVC are two different technologies just concentrate on that and for vb to c# each part of vb can be converted to C# and there google will help a lot in that

anything in VB can converted to C#, all of them make use of the same framework but vb has inherited some old functions from the vb6 that can be converted to c# look at my answer to that question Using LSET or RSET in a c#-aspx application, what I have done in that is that I used ILSpy and opened Microsoft.VisualBasic dll and looked at the Strings class implementation the ILSpy allow you to view the code in vb or in C#

Comments

0

you can also try this url

developerfusion.com/tools/

This site provides conversion from C# to Vb.Net even you can also convert into Ruby and Python too using this.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.