• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

VB.NET to C# conversion

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    VB.NET to C# conversion

    Before I JFGI I have some VB.NET and this wants converting to C#. Has anybody any experiences good (preferably) of any of the various automatic converters? Suggestion will at least give me ones to review first.

    Bad ones of course also welcome. I'll know not to bother persuing those.

    #2
    I've written my own in around a few days and it did 90% of the job - commercial tools are far more advanced and should give very good conversions since both languages map so well and all variable names can be kept.

    Basically Google for it and try the first one that ranks, if not good enough go for second - that's will give you result much quicker than asking on a public forum.

    Comment


      #3
      Originally posted by AtW View Post
      I've written my own in around a few days and it did 90% of the job - commercial tools are far more advanced and should give very good conversions since both languages map so well and all variable names can be kept.

      Basically Google for it and try the first one that ranks, if not good enough go for second - that's will give you result much quicker than asking on a public forum.
      Cheers, I'm not in a rush though :-)

      I shall JFGI. The panacea would be give it a VB project and out pops a C# one. Somehow I doubt I'll get that for free though!!

      Comment


        #4
        I'd imagine there are some free / open source ones that will do the job. I'd start here: { End Bracket }: C# to Visual Basic Translation Tool

        .Net has something called the CodeDom that is a language independent representation of code that can be created from and translated back into source. Have a look at System.CodeDom, Microsoft.CSharp, Microsoft.VisualBasic etc. It's not that hard to roll your own for simple stuff, I wanted something along the lines of the beanshell / bsh scripting components for c# and I literally got something working in an afternoon that would take either VB.net or C# "scriptlets", turn them into a class implementing a single invokable method and output C# source. Considering I had ~3 months .Net experience at the time I expect someone who knew their stuff could do something pretty cool.
        While you're waiting, read the free novel we sent you. It's a Spanish story about a guy named 'Manual.'

        Comment


          #5
          Originally posted by ASB View Post
          Somehow I doubt I'll get that for free though!!
          Are you doing this job for free? Conversion software can be worth a fraction compared to saved billable time that will be needed to do very dull job.

          Be grateful you are not doing C# to VB.NET...

          Comment

          Working...
          X