1

I have a Delphi program consisting of mostly Visual Interface(Buttons, TextBoxes etc.) and a little bit business logic.

The business logic is mostly included in Pl-Sql of Oracle Database running by Delphi.
I want to carry the project in Delphi to C Sharp but i want to do this part by part.

What i think is to create a C Sharp project in Visual Studio and to run it with Delphi code(including Visual Interfaces) and part by part replace the code and the Visual Interface in Delphi with C Sharp.

Is it possible?

brasofilo
  • 25,496
  • 15
  • 91
  • 179
gesus
  • 471
  • 1
  • 10
  • 24
  • 1
    You really need to define and elaborate on what it is you are exactly looking to achieve; are you looking to convert an existing delphi application to C# or merely execute the delphi application from a C# application? – Clint Apr 05 '13 at 14:09
  • 3
    You really should look through the answers to [Migrating a Delphi 7 application to .NET](http://stackoverflow.com/questions/207169/migrating-a-delphi-7-application-to-net). No matter what versions of Delphi (well, win32/VCL Delphi at any rate) or VS you're dealing with, the answers are going to be the same. – afrazier Apr 05 '13 at 14:13
  • I want to convert the Delphi application to C Sharp but it's hard to achieve in a short time and i don't have time to run simultaneous projects one in Delphi and one in C Sharp. So i think it will be feasible to run the Delphi code in .net and replacing Delphi code with C Sharp code module by module. – gesus Apr 05 '13 at 14:13

2 Answers2

3

Mixing Delphi and C# GUI in the same application is possible, but hard to achieve. You'll need to set up a whole infrastructure to organise interop between the two languages. You'll end up creating a huge amount of interop code that you will subsequently abandon. Even worse, the interop code will need to be two way. You'll sometimes have C# visual code talking to Delphi non-visual. And vice-versa. The idea of converting the code module by module sounds good, but I predict it will entail vast amounts of interop scaffolding.

It would be easier to slice it along the visual/non-visual divide, but that's not what you are proposing. So frankly I think your current plan is far from optimal. I would not entertain it. I think a clean port is the best option.

David Heffernan
  • 601,492
  • 42
  • 1,072
  • 1,490
2

Remobjects Hydra seems to be exactly what you are looking for.

Anders E. Andersen
  • 1,635
  • 2
  • 14
  • 20