简体   繁体   中英

How does Visual Studio know Project is a VB project or How can I convert my project to C# project

I am looking to convert my project from a VB project into a C# project. How do Visual studio recocgnize that the project is a VB project? I have been looking through my project file in Notepad and I notice some of my old VB classes (they have been converted to C# by a useless utility). How can I change the actual Project and its files into C#?

Thanks

(AFAIK) Visual Studio uses the file extension to know what sort of file it is .vbproj is a vb project file .vb is a vb source file, etc.

You can't just convert a project from one type to another, you will have to re-write each file individually but to get you most of the way there you can convert the code using an online converter:

http://www.carlosag.net/Tools/CodeTranslator/

http://converter.telerik.com/

http://www.developerfusion.com/tools/convert/csharp-to-vb/

Instant troll note: Why convert it at all? VB is much better: https://www.simple-talk.com/dotnet/.net-framework/10-reasons-why-visual-basic-is-better-than-c/

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