views:

101

answers:

8

Hi I want to convert the code at Webcam using DirectShow.NET to C#. It works perfectly in vb.net. I tried converting using an online converter, however I got about 30 errors,

Any suggestions to what I must do next:

This is the converter that I used :

1) Convert VB.NET to C#

+1  A: 

Maybe C-Sharpener For VB will work

npinti
+3  A: 

Without the errors and relavent source code, we can't really help. The best bet is to use an online converter (as you did) and fix compiler errors, then test for other errors.

Nate Bross
+1  A: 

I've used sharpdevelop to translate between vb and c# a few times for projects. It's really pretty great, only had to make minor changes.

http://www.sharpdevelop.net

jskaggz
+1  A: 

I'd echo the npinti's suggestion; but I've never found a converter that will do everything flawlessly.

My guess is that you'll find several that do a good/great job; but you're still going to have to do a little work to get everything to play nice.

Jim B
+1  A: 

Learn C#, then convert it.

Achilles
haha correct answer
Haxed
+6  A: 

The CodeProject article says the author originally converted this sample from C# to VB.NET. This may be the original C# source:

http://blogs.msdn.com/b/markhsch/archive/2007/11/19/c-webcam-user-control-source.aspx

MusiGenesis
+3  A: 

Who says you even have to convert it? You could throw it in a Class Library and use the DLL in your C# project. No need for translating perfectly working .Net code into other .Net code.

Corey Ogburn
+1  A: 

Use RedGate's reflector against the compiled assembly and the Denis Bauer's disassembler to get back code in the language of your choice.

mattmc3