Converting vb.net to c#
-
I don't think this is a programming question as I'm looking for a tool, but I'm donning the asbestos suit just to be on the safe side... :) I have a VS 2005 project that's written in vb.net, and I'd like to find a tool (preferably free) that I can point at it to convert the codebehind to c# simply because I'm more familiar with the syntax. Anyone have recommendations / experiences to share? Thanks!
Christopher Duncan www.PracticalUSA.com Author of The Career Programmer and Unite the Tribes Copywriting Services
Reflector[^]? With the FileDisassembler[^] add in, you can point it to an assembly or a type and output in whatever language you like.
Religiously blogging on the intarwebs since the early 21st century: Kineti L'Tziyon Judah Himango
-
Christopher Duncan wrote:
I use professional editors for that. Big Grin
ed?
Wout
edlin :-D
Christopher Duncan www.PracticalUSA.com Author of The Career Programmer and Unite the Tribes Copywriting Services
-
Reflector[^]? With the FileDisassembler[^] add in, you can point it to an assembly or a type and output in whatever language you like.
Religiously blogging on the intarwebs since the early 21st century: Kineti L'Tziyon Judah Himango
Thanks, Judah. That would probably be useful for binaries, but this is source code and I don't want to lose the names, comments, etc. but rather just convert the VB to C#.
Christopher Duncan www.PracticalUSA.com Author of The Career Programmer and Unite the Tribes Copywriting Services
-
I don't think this is a programming question as I'm looking for a tool, but I'm donning the asbestos suit just to be on the safe side... :) I have a VS 2005 project that's written in vb.net, and I'd like to find a tool (preferably free) that I can point at it to convert the codebehind to c# simply because I'm more familiar with the syntax. Anyone have recommendations / experiences to share? Thanks!
Christopher Duncan www.PracticalUSA.com Author of The Career Programmer and Unite the Tribes Copywriting Services
Sharp Develop can do this. Only one file at a time though and it sometimes makes small errors. Hey it's free though. :)
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
-
Sharp Develop can do this. Only one file at a time though and it sometimes makes small errors. Hey it's free though. :)
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
Thanks, man. If I can't find a batch oriented critter I'll check it out.
Christopher Duncan www.PracticalUSA.com Author of The Career Programmer and Unite the Tribes Copywriting Services
-
Thanks, man. If I can't find a batch oriented critter I'll check it out.
Christopher Duncan www.PracticalUSA.com Author of The Career Programmer and Unite the Tribes Copywriting Services
I haven't tried this one yet Batch Code Converter[^] but I have used the single file vb to c# converter Single File Code Converter[^] and it works pretty decently. I hope this helps some.
-
I don't think this is a programming question as I'm looking for a tool, but I'm donning the asbestos suit just to be on the safe side... :) I have a VS 2005 project that's written in vb.net, and I'd like to find a tool (preferably free) that I can point at it to convert the codebehind to c# simply because I'm more familiar with the syntax. Anyone have recommendations / experiences to share? Thanks!
Christopher Duncan www.PracticalUSA.com Author of The Career Programmer and Unite the Tribes Copywriting Services
-
I don't think this is a programming question as I'm looking for a tool, but I'm donning the asbestos suit just to be on the safe side... :) I have a VS 2005 project that's written in vb.net, and I'd like to find a tool (preferably free) that I can point at it to convert the codebehind to c# simply because I'm more familiar with the syntax. Anyone have recommendations / experiences to share? Thanks!
Christopher Duncan www.PracticalUSA.com Author of The Career Programmer and Unite the Tribes Copywriting Services
I highly recommend Instant C#. It's not free but worth every penny, it's very accurate and we just used it to convert 10,000s of lines of VB.NET to C#. http://tangiblesoftwaresolutions.com/Product_Details/Instant_CSharp.html[^]
-
I don't think this is a programming question as I'm looking for a tool, but I'm donning the asbestos suit just to be on the safe side... :) I have a VS 2005 project that's written in vb.net, and I'd like to find a tool (preferably free) that I can point at it to convert the codebehind to c# simply because I'm more familiar with the syntax. Anyone have recommendations / experiences to share? Thanks!
Christopher Duncan www.PracticalUSA.com Author of The Career Programmer and Unite the Tribes Copywriting Services
SharpDevelop has a converter feature built in. Appears to just call this webservice for the actual conversion... so try before you download.
-
I don't think this is a programming question as I'm looking for a tool, but I'm donning the asbestos suit just to be on the safe side... :) I have a VS 2005 project that's written in vb.net, and I'd like to find a tool (preferably free) that I can point at it to convert the codebehind to c# simply because I'm more familiar with the syntax. Anyone have recommendations / experiences to share? Thanks!
Christopher Duncan www.PracticalUSA.com Author of The Career Programmer and Unite the Tribes Copywriting Services
I have had success with the CSharpener product, but I don't think it was free. Plus you must fix numerous syntax errors after the conversion process.
-
I don't think this is a programming question as I'm looking for a tool, but I'm donning the asbestos suit just to be on the safe side... :) I have a VS 2005 project that's written in vb.net, and I'd like to find a tool (preferably free) that I can point at it to convert the codebehind to c# simply because I'm more familiar with the syntax. Anyone have recommendations / experiences to share? Thanks!
Christopher Duncan www.PracticalUSA.com Author of The Career Programmer and Unite the Tribes Copywriting Services
You can try the below online tools http://www.developerfusion.com/tools/convert/vb-to-csharp/[^] and http://www.carlosag.net/Tools/CodeTranslator/[^]
Regards Aman Bhullar www.arlivesupport.com[^]
-
I don't think this is a programming question as I'm looking for a tool, but I'm donning the asbestos suit just to be on the safe side... :) I have a VS 2005 project that's written in vb.net, and I'd like to find a tool (preferably free) that I can point at it to convert the codebehind to c# simply because I'm more familiar with the syntax. Anyone have recommendations / experiences to share? Thanks!
Christopher Duncan www.PracticalUSA.com Author of The Career Programmer and Unite the Tribes Copywriting Services
http://converter.telerik.com has a bulk file converter tool too. i have used that extensively over the last few years on various projects and works well. just the indexers that you have to do manually, and the last time i used it it didnt like LINQ
---Guy H ;-)---
-
I don't think this is a programming question as I'm looking for a tool, but I'm donning the asbestos suit just to be on the safe side... :) I have a VS 2005 project that's written in vb.net, and I'd like to find a tool (preferably free) that I can point at it to convert the codebehind to c# simply because I'm more familiar with the syntax. Anyone have recommendations / experiences to share? Thanks!
Christopher Duncan www.PracticalUSA.com Author of The Career Programmer and Unite the Tribes Copywriting Services
Try with http://download.cnet.com/Convert-NET/3000-2096_4-10696573.html[^] It occasionaly hickups, but all in all it is dependable.
-
I don't think this is a programming question as I'm looking for a tool, but I'm donning the asbestos suit just to be on the safe side... :) I have a VS 2005 project that's written in vb.net, and I'd like to find a tool (preferably free) that I can point at it to convert the codebehind to c# simply because I'm more familiar with the syntax. Anyone have recommendations / experiences to share? Thanks!
Christopher Duncan www.PracticalUSA.com Author of The Career Programmer and Unite the Tribes Copywriting Services
How about rewriting it from the start in C#? Im not really in favour of these conversion tools as all they do is a straight port and can add a bit of baggage on the way. if you rewrite it you can optimise it more for the new language, and possibly increase performance. personally, if you just want to translate from vb to c# without rewriting or adding new features then I would question the need of doing this task in the first place. JC
View my CodePlex Projects here -> http://www.codeplex.com/site/users/view/john\_crocker
-
I don't think this is a programming question as I'm looking for a tool, but I'm donning the asbestos suit just to be on the safe side... :) I have a VS 2005 project that's written in vb.net, and I'd like to find a tool (preferably free) that I can point at it to convert the codebehind to c# simply because I'm more familiar with the syntax. Anyone have recommendations / experiences to share? Thanks!
Christopher Duncan www.PracticalUSA.com Author of The Career Programmer and Unite the Tribes Copywriting Services
-
http://converter.telerik.com has a bulk file converter tool too. i have used that extensively over the last few years on various projects and works well. just the indexers that you have to do manually, and the last time i used it it didnt like LINQ
---Guy H ;-)---
I can vouch for the Telerik tool. This is the most effective (free) converter I have used. Still don't understand why it can't work out that C# uses square brackets for indexers and VB.NET uses normal brackets. I always have to fix these manually. Also watch out for array declaration. In C# you declare an array according to the number of items in it, in VB.NET you specify the upper boundary. This can cause difficult to find run-time errors if you don't look out for it.
-
How about rewriting it from the start in C#? Im not really in favour of these conversion tools as all they do is a straight port and can add a bit of baggage on the way. if you rewrite it you can optimise it more for the new language, and possibly increase performance. personally, if you just want to translate from vb to c# without rewriting or adding new features then I would question the need of doing this task in the first place. JC
View my CodePlex Projects here -> http://www.codeplex.com/site/users/view/john\_crocker
John_Crocker wrote:
personally, if you just want to translate from vb to c# without rewriting or adding new features then I would question the need of doing this task in the first place
So would I. IMO all .NET developers should be able to read code reasonably well (and look up the little bits they don't understand) in both C# and VB regardless of which they code in.
Kevin
-
http://converter.telerik.com has a bulk file converter tool too. i have used that extensively over the last few years on various projects and works well. just the indexers that you have to do manually, and the last time i used it it didnt like LINQ
---Guy H ;-)---
-
Sharp Develop can do this. Only one file at a time though and it sometimes makes small errors. Hey it's free though. :)
Henry Minute Do not read medical books! You could die of a misprint. - Mark Twain Girl: (staring) "Why do you need an icy cucumber?" “I want to report a fraud. The government is lying to us all.”
SharpDevelop can convert whole projects in one step. And yes, while it does make errors; I think it does pretty good job nowadays. For example, SharpDevelop 3.1 RC2 correctly converts the different rounding semantics when casting floating-point values to integers (VB rounds, C# truncates). Most other converters just translate "CInt(x)" to "(int)x", introducing a subtle bug in the converted program if x was a floating-point value.