Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Converting vb.net to c#

Converting vb.net to c#

Scheduled Pinned Locked Moved The Lounge
csharpquestionvisual-studiocom
33 Posts 22 Posters 23 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Christopher Duncan

    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

    J Offline
    J Offline
    Judah Gabriel Himango
    wrote on last edited by
    #8

    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

    C 1 Reply Last reply
    0
    • W wout de zeeuw

      Christopher Duncan wrote:

      I use professional editors for that. Big Grin

      ed?

      Wout

      C Offline
      C Offline
      Christopher Duncan
      wrote on last edited by
      #9

      edlin :-D

      Christopher Duncan www.PracticalUSA.com Author of The Career Programmer and Unite the Tribes Copywriting Services

      1 Reply Last reply
      0
      • J Judah Gabriel Himango

        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

        C Offline
        C Offline
        Christopher Duncan
        wrote on last edited by
        #10

        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

        1 Reply Last reply
        0
        • C Christopher Duncan

          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

          H Offline
          H Offline
          Henry Minute
          wrote on last edited by
          #11

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

          C D 2 Replies Last reply
          0
          • H Henry Minute

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

            C Offline
            C Offline
            Christopher Duncan
            wrote on last edited by
            #12

            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

            L 1 Reply Last reply
            0
            • C Christopher Duncan

              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

              L Offline
              L Offline
              linuxjr
              wrote on last edited by
              #13

              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.

              1 Reply Last reply
              0
              • C Christopher Duncan

                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

                R Offline
                R Offline
                RCoate
                wrote on last edited by
                #14

                I used developer fusion's online tool to convert a VB.Net website to c#. Free, but does not like "handles" clauses. http://www.developerfusion.com/tools/convert/vb-to-csharp/[^] Everything else seemed to be ok.

                1 Reply Last reply
                0
                • C Christopher Duncan

                  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

                  C Offline
                  C Offline
                  Chris Fulstow
                  wrote on last edited by
                  #15

                  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[^]

                  1 Reply Last reply
                  0
                  • C Christopher Duncan

                    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

                    S Offline
                    S Offline
                    Shog9 0
                    wrote on last edited by
                    #16

                    SharpDevelop has a converter feature built in. Appears to just call this webservice for the actual conversion... so try before you download.

                    D 1 Reply Last reply
                    0
                    • C Christopher Duncan

                      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

                      D Offline
                      D Offline
                      davidkhale
                      wrote on last edited by
                      #17

                      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.

                      1 Reply Last reply
                      0
                      • C Christopher Duncan

                        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

                        L Offline
                        L Offline
                        Lost User
                        wrote on last edited by
                        #18

                        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[^]

                        1 Reply Last reply
                        0
                        • C Christopher Duncan

                          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

                          G Offline
                          G Offline
                          Guy Harwood
                          wrote on last edited by
                          #19

                          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 ;-)---

                          C H 2 Replies Last reply
                          0
                          • C Christopher Duncan

                            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

                            S Offline
                            S Offline
                            Sinisa Hajnal
                            wrote on last edited by
                            #20

                            Try with http://download.cnet.com/Convert-NET/3000-2096_4-10696573.html[^] It occasionaly hickups, but all in all it is dependable.

                            1 Reply Last reply
                            0
                            • C Christopher Duncan

                              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

                              A Offline
                              A Offline
                              Argyle4Ever
                              wrote on last edited by
                              #21

                              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

                              K 1 Reply Last reply
                              0
                              • C Christopher Duncan

                                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

                                F Offline
                                F Offline
                                Finbar
                                wrote on last edited by
                                #22

                                Artisoft have a good product.

                                1 Reply Last reply
                                0
                                • G Guy Harwood

                                  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 ;-)---

                                  C Offline
                                  C Offline
                                  Carl Reid
                                  wrote on last edited by
                                  #23

                                  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.

                                  D 1 Reply Last reply
                                  0
                                  • A Argyle4Ever

                                    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

                                    K Offline
                                    K Offline
                                    Kevin McFarlane
                                    wrote on last edited by
                                    #24

                                    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

                                    1 Reply Last reply
                                    0
                                    • G Guy Harwood

                                      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 ;-)---

                                      H Offline
                                      H Offline
                                      hjpc
                                      wrote on last edited by
                                      #25

                                      maybe this can help ? [^]

                                      H 1 Reply Last reply
                                      0
                                      • H hjpc

                                        maybe this can help ? [^]

                                        H Offline
                                        H Offline
                                        hjpc
                                        wrote on last edited by
                                        #26

                                        i meant [^] this helped me a lot in converting from a Outlook addin in VB to C# addin cheers, biozes

                                        1 Reply Last reply
                                        0
                                        • H Henry Minute

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

                                          D Offline
                                          D Offline
                                          Daniel Grunwald
                                          wrote on last edited by
                                          #27

                                          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.

                                          H 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups