The developerFusion web site provides code converters that let you translate between C#, Visual Basic, Ruby, and Python.
One of the most important uses for reflection is analyzing code to figure out what it does. Once you know what the code does, you can emit new code to do the same thing in a different programming language. That’s what these code converters do. (Although right now they seem to be having trouble.)
The site has a tools page with links to free web-based tools that convert between C#, Visual Basic, Ruby, and Python. The tools are:
- Convert C# to VB.NET
- Convert C# to Python
- Convert C# to Ruby
- Convert VB.NET to C#
- Convert VB.NET to Python
- Convert VB.NET to Ruby
The results are pretty good, although the languages do not provide exactly the same features so the results aren’t necessarily perfectly equivalent. For example, Visual Basic’s Select Case statement is more flexible than C#’s switch statement, so the tools cannot always perform a round trip conversion from Visual Basic to C# and back. For specific examples, it converts Case 0 To 9 into a series of 10 C# case statements and it cannot handle statements such as Case Is < 0, Is >= 30. (It should probably convert these kinds of Select Case statements into sequences of if-then-else statements instead if trying to use a switch statement.)
Overall, however, the results are reasonably good, can give you a big head start if you need to translate a lot of code, and are free.



Very good idea, at this moment it’s great for me. As I have not been able to evaluate developerFusion since the translation does not work at this moment, I have searched for alternatives and https://codeconverter.icsharpcode.net/ works very well for me. Thank you
I have tried to convert a simple “Hello World” code of C# into python but nothing happened. It is just showing processing for last 12 hours.
Any solution?
It’s likely that those tools are no longer working. I’ve had problems with them, too. Unfortunately, I can’t find any others that work right now.
is there any good convertor for c++ to c#?
and for fortran 77 fixed format to c#?
There may be such translators, but I don’t know of any. The C++ –> C# translation shouldn’t be too hard. Translating from Fortran 77 will be harder.
saludo a todos
necesito convertir este codigo esta en C# a Python
I would probably use a class like this:
Or you could use a named tuple.
See this post for some discussion: C-like structures in Python