简体   繁体   English

Delphi 到 .NET 转换器

[英]Delphi to .NET Converter

Does any one know of a Delphi to .NET converter (either C# or VB.NET)?有谁知道 Delphi 到 .NET 的转换器(C# 或 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.我继承了一堆 Delphi 代码,以前从未见过 Pascal,与其学习它,不如尝试使用自动转换器(如果可用),然后清理代码。 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.无论如何我搜索似乎都找不到这种工具 - 也许那是因为一个不存在 - 所以我想这里有人可能知道。

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.您也许能够将部分翻译成语法正确的内容,但您将没有软件所依赖的库或框架 (RTL/VCL)。

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.您将不得不返回到 Delphi 代码,并能够了解修复不起作用的部分发生了什么。 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.如果您有时间用另一种语言重写软件,您不妨卷起袖子,学习原始语言,并在现有代码中更改您需要更改的内容。

I have no experience using these tools, but here are a couple:我没有使用这些工具的经验,但这里有一些:

Delphi2CS Delphi2CS

TurnSharp转尖

A similar question was asked:有人问过类似的问题:

What tools exist to convert a Delphi 7 application to C# and the .Net framework? 有哪些工具可以将 Delphi 7 应用程序转换为 C# 和 .Net 框架?

Does any one know of a Delphi to .NET converter (either C# or VB.NET)?有谁知道从Delphi到.NET转换器(C#或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.我继承了许多Delphi代码,以前从未见过Pascal,并且不愿学习它,而宁愿尝试使用自动转换器(如果有的话),然后再清理代码。 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.无论如何,我似乎都找不到这种工具-也许是因为一个工具不存在-所以我以为这里的某人可能知道。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM