tags:

views:

48

answers:

2

Is there a way to change the language of an ASP.NET project from Visual Basic to C# easily? I would even be willing to re-write the code as it's still fairly simple at this point.

+1  A: 

The language you choose to implement in can be either Visual Basic or C#. And, as far as I know, recoding those pages is the only way to go about doing it. There is nothing special you have to do with the actual project - you basically just choose to have a C# code-behind rather than a Visual Basic.

Of course, I would have to ask WHY you want to do this. If your site is already working in Visual Basic, is there some pressing need to do this? Matter of preference? No matter what, it can be done (fairly) easily, as long as you understand the code well enough to translate between the two.

JasCav
It is a matter of preference, actually. When I started the website a long time ago, I started coding in VB as it was my language of choice, but now that it has been switched to C# and I feel more comfortable in it, I was just wanting to make a simple switch if that was possible.
Tyler Murry
A: 

There's various converters out there, but the one I've liked the best is SharpDevelop's - using that IDE, you can do Tools -> Convert. If you just want to convert a snippet, you can use their online converter too.

James Manning