Kinyanjui Kamau
Kinyanjui Kamau

Reputation: 1936

Change VB project code to C# using Visual Studio 2010

Does anyone know how to Change VB project code to C# using Visual Studio 2010?

Any help appreciated

Upvotes: 0

Views: 5224

Answers (3)

Andrew Cooper
Andrew Cooper

Reputation: 32576

Telerik has a free converter here

Upvotes: 1

Jon Skeet
Jon Skeet

Reputation: 1500525

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#.

Upvotes: 4

Daniel Rose
Daniel Rose

Reputation: 17648

Directly in Visual Studio you can't do this. However, you can use tools such as this one or this one.

Upvotes: 3

Related Questions