Is there an automated way to convert Delphi to C#?

Every client I work with asks about autmoated conversion tools. Some conversion tools do exist, but are they the magic silver bullet? In fact should you use a covnersion tool at all?

Currently there are two automated conversion tools for converting code and projects from Delphi to C#. They are:

Other tools are also listed on the resource links page.

How well do these tools work?

I have requested information and evaluation versions of each of the products from the vendors. If received I will post a review of each, and keep installed copies available to analyze their usefulness of client's applications before recommending them. Until that time, I cannot speak of their specific capabilities.

What problems are there with conversion tools?

Typically conversion tools from any language to another can easily convert code, but run into issues with classes and components. Conversion tools in these situations make a best attempt but in most cases there is no exact match available.

If you wish to convert raw code conversion tools can be quite useful. However the more classes you use, the more code you will be left to manually fix up. In the case of forms, often quite a bit is left to fix up. In such cases, conversion tools normally produce reports or insert comment markers with information. Conversion tools for most users are not magic bullets, however can be quite useful and save developers a lot of tedious typing and manual busy work. Be prepared however that there will still be many manual steps to perform after such a conversion.

Should I use a conversion tool?

This is really the most important question. Even if a conversion tool could magically take your Delphi project and emit a completely functional C# version, is that what you really want? Reexamine for a minute why you are moving to .NET? .NET contains a lot of new features and functionality, but .NET is also a platform and many things operate differently. To be effective, your code must do things "the .NET way". A simple conversion would result in a .NET application doing things "the Delphi way". This would certainly be a useful step and allow you to then slowly modify a functioning application, but when moving  to .NET it is best to rearchitect your application to be specifically designed for .NET, and also to take advantage of the extra capabilities of .NET.

Conclusion

Conversion tools can be a useful tool in moving some code to .NET. However they should not be viewed as a complete solution and even code converted to C# should be reexamined and rewritten to better take advantage of the .NET platform.

About the Author

Chad Z. Hower aka Kudzu was formerly the the Regional Developer Adviser (DPE) for Microsoft MEA (Middle East and Africa). Chad is the team leader of Delphi to .NET and a professional speaker for Woo Hoo. Chad has worked with dozens of migrations from Delphi to .NET involving many of Europe's largest ISV's. Chad is also the original author and architect of both Indy and IntraWeb, which have been an essential part of Delphi since Delphi 6. More about Chad






Copyright 2006-2007 Delphi to .NET