简体   繁体   中英

Switch ASP.NET Project From Visual Basic to C#

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.

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM