going from vb.net to c#

  • Thread starter Thread starter - Dan -
  • Start date Start date
D

- Dan -

i've seen before people say to go from vb.net to c# you need to compile and
then decompile to see the c#. can someone outline the steps for me to do
that?
 
Hi Dan,

I think that "people" are talking about IL DASM, with which you can see the
intermidiate code created by VB.net, which is by the way almost the same as
the code compiled by a C# program.

When you look in IL DASM code you might be get the idea looking at C.

..class public auto ansi Form1
extends [System.Windows.Forms]System.Windows.Forms.Form
{
} // end of class Form1


However this is no C#

Cor
 
Download .NET Reflector. It will give you pretty good decompile cod in
either VB.NET, C#, or Delphi. You can copy/paste this code, but be warned,
when VB/C# goes to IL, some things get goofed, and it can be a pain to
figure it out.

HTH,
JLW
 
* " - Dan - said:
i've seen before people say to go from vb.net to c# you need to compile and
then decompile to see the c#. can someone outline the steps for me to do
that?

I don't see any reason for doing that.
 
The easiest way is with a VB.NET to C# converter.
I've had great luck with Instant C# (www.instantcsharp.com) which does
projects in addition to snippets, but there are lots of them:

Instant C#
Immunicode
Ellkay (V#)
GBVB
Devfusion
C-Sharpener
 
LOL, I think Herfried only helps when going from C# to VB.
Then, the reason is obvious! :-)

-Rob Teixeira [MVP]
 
The easiest way is with a VB.NET to C# converter.
I've had great luck with Instant C# (www.instantcsharp.com) which does
projects in addition to snippets, but there are lots of them:

the open source #develop IDE
http://www.icsharpcode.net

also includes vb -> C# and C# -> vb converters.

I briefly tested the vb -> C# converter, and it did pretty well. The
only unexpected issue I came across is that it doesn't convert single
line If expressions (If xyz Then foo) and doesn't leave the original
code line in (but does print a warning line).
 
i've seen before people say to go from vb.net to c# you need to compile and
then decompile to see the c#. can someone outline the steps for me to do
that?


There's a new VB.Net to C# Converter available at:

http://www.vbconversions.com

The trial version is free and will convert whole projects less than
750 lines of code.
 
Hi Herfried,
If the code is in VB.NET, it's already in the right language...

Thank you for clearing this for me, I did not understand what your meaning
was whit that text.

:-))

Cor
 
* "Cor Ligthert said:
Thank you for clearing this for me, I did not understand what your meaning
was whit that text.

I just wrote it for the other people reading the thread ;-))).
 
Back
Top