Hello i am doing a WOW launcher but i wanted to switch from vB.net to C# so i used this converter http://www.developerfusion.com/tools/convert/vb-to-csharp/?batchId=afeaecee-b774-436c-a04a-97009e64a2bb

but i getting some errors
http://pastebin.com/enQ1s414

My code
http://pastebin.com/F9CnGyKp

I hope you guys might help me :) btw do not care about that missing GUI things just that Me.** and interact thing

Edited 3 Years Ago by mathias234

looks like mostly you'll need to add

        using System.Windows.Forms;

then use

        Application.ExecutablePath

instead of

        My.Application.Info.DirectoryPath.ToString

and

        using System.IO;
        File.WriteAllText(

instead of

        My.Computer.FileSystem.WriteAllText(

and

        MessageBox.Show(

instead of

        Interaction.MsgBox(

and

        MessageBoxButtons.OK

instead of

        MsgBoxStyle.Information
        MsgBoxStyle.Critical

I think that handles most of the errors.

Not sure what your trying to do there. can you show that line of the VB code you're converting from?

erase lines 139-142. Now you have to make sure the form knows to run the Form1_Load routine, if the conversion software misinterpreted what that routine is for then it probably didn't handled it right. But the easiest way, is to let VS do it for you. Copy the code inside the routine and delete that routine. now go to the form in the design window and double click on an empty spot of the form. This starts a new sub routine and registers it so the form will run it when the form loads. Now paste your code into this new routine. I know it looks like you've just made the same routine, and you have, the difference is behind the code.

Edited 3 Years Ago by tinstaafl

oooops, my bad. You need most of those lines. just replace line 141 with InitializeComponent();, but if the routine in Form1_Load doesn't run then follow the rest of my above instructions.

Again my apologies.

This article has been dead for over six months. Start a new discussion instead.