如何将用C编写的旧程序移动到C# [英] How to move an old program written in C to C#

查看:85
本文介绍了如何将用C编写的旧程序移动到C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个用C编写并在DOS中运行的程序.有没有简单的方法可以将此程序移至C#(而无需完全重新编写该程序)?移动是指更改用户界面和显示结果的方式(与任何标准Windows应用程序一样).
预先表示感谢.

I have a program written in C and running in DOS. Is there any simple way to move this program to C# (without completely re-writing the program)? By moving I mean changing in the user interface and the way of showing results (as it is in any standard Windows application).
Thanks in advance.

推荐答案

DLL中转换以前的应用程序,您可以将C -program功能公开给C#用户界面. br/> :)
Transforming the former application in a DLL, you may expose the C-program functionality to the C# user interface.
:)


您可以用C#编写一个控制台应用程序-看一下System.Console类.

如果您想要一个真正的Windows应用程序,那么就没有-没有简单的方法.您将不得不重写用户界面.

尼克
You can write a Console app in C# - have a look at the System.Console class.

If you want a real Windows application, then no - there is no simple way. You will have to rewrite the user interface.

Nick


这篇关于如何将用C编写的旧程序移动到C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆