views:

225

answers:

3

Does any one know of a Delphi to .NET converter (either C# or VB.NET)? I've inherited a bunch of Delphi code, never seen Pascal before and rather than learn it, I'd rather just try to use an automated converter, if available, and clean up the code after that. Can't seem to find this kind of tool anyway I search - maybe that's because one doesn't exist - so I thought someone here may know.

+1  A: 

You need to work on your google skills. Second hit on this google query, the first one is a commercial solution.

Hans Passant
Otaku
+8  A: 

I have no experience using these tools, but here are a couple:

Delphi2CS

TurnSharp

A similar question was asked:

What tools exist to convert a Delphi 7 application to C# and the .Net framework?

Edward Leno
Good stuff. Now see, there's something wrong with search here. I had tried http://stackoverflow.com/search?q=delphi+to+c%23 and it didn't kick that link.
Otaku
I prefer TurnSharp...
Amit Ranjan
+3  A: 

Spare your time.. If you want to convert code because you don't understand or like the original language, my advice is: "Don't bother" (believe me, I've made numerous attempts to convert code). Especially if you're planning to just make a couple of small changes to the existing code.

You won't be able to convert the code and have it compile, let alone run flawlessly.

You might be able to translate portions into something that is syntactically correct, but you won't have the libraries or frameworks (RTL/VCL) that the software relies on.

You're going to have to go back to the Delphi code and be able to understand what's happening to fix parts that are not working. It's going to take more time to fix bugs in the generated code than it would take to study the existing code and rewrite it entirely.

And if you have the time to rewrite software in another language, you might as well just roll up your sleeves, learn the original language, and change what you need to change in the existing code.

Wouter van Nifterick
+1 for answering the underlying question.
Jeroen Pluimers
-1. Sound ridiculous to me. There are just too many technologies out there to try to learn them all.
WinnerWinnerChickenDinner
@ChickenDinner: Nobody promised that programming is easy, and nobody said that you need to learn *all* technologies. But if you "inherit" code, you're pretty much f*cked if you don't understand the language, and no code-converter is going to save your ass. That's my point basically.
Wouter van Nifterick