Does anyone know how to Change VB project code to开发者_如何学C C# using Visual Studio 2010?
Any help appreciated
I don't believe Visual Studio itself provides any capabilities around this, but there are various other options. There are specific converters such as the ones from Tangible. Alternatively, you could build the VB code and then decompile to C# in something like Reflector or dotPeek. (Latest versions of Reflector are not free, but there is still a version 6 release which will not have a time bomb.)
Note that a verbatim translation of the code is likely to end up calling various methods in the Microsoft.VisualBasic
assembly - you'll want to do a bit more work to turn it into idiomatic C#.
Directly in Visual Studio you can't do this. However, you can use tools such as this one or this one.
Telerik has a free converter here
精彩评论