我应该使用哪个平台:native C ++或C#? [英] Which platform should I use : native C++ or C#?

查看:185
本文介绍了我应该使用哪个平台:native C ++或C#?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想开发一个windows应用程序。如果我使用本机C + +和MFC的用户界面,那么应用程序将是非常快速和微小。但是使用MFC非常复杂。另外如果我使用C#,那么应用程序将比本机代码慢,它使.NET框架运行。但通过使用WinForm开发GUI非常容易。你更倾向哪个?

I want to develop a windows application. If I use native C++ and MFC for user interface then the application will be very fast and tiny. But using MFC is very complicated. Also If I use C# then the application will be slower than the native code and It reqiures .NET framework to run. But developing GUI is very easy by using WinForm. Which one do you prefer?

推荐答案

fast和slow是主观的,特别是今天的PC。我不是故意使事情变慢,但是在写一个托管应用程序时,不会有像你想象的那样多的开销。 JIT等工作得很好,使代码执行速度非常快。

"fast" and "slow" are subjective, especially with today's PC's. I'm not saying deliberately make the thing slow, but there isn't nearly as much overhead in writing a managed application as you might think. The JIT etc work very well to make the code execute very fast. And you can also NGEN for extra start-up speed if you really need.

实际上,如果你有时间学习它,你可能需要考虑WPF而不是winform - 这是一个不同的技能,但允许你非常好地使用图形硬件等。

Actually, if you have time to learn it, you might want to consider WPF rather than winform - this is a different skill-set, but allows you to make very good use of graphics hardware etc.

此外 - .NET框架配备了新的操作系统安装,仍然非常常见的那些早于它。所以对我来说,这将是一个相当明确的选择,用C#/ .NET开发。开发一个强大的,经过全面测试的C ++应用程序(没有泄漏等)的时间(至少对我来说)比C#大得多。

Also - .NET framework comes with new OS installs, and is still very common on those that pre-date it. So for me it would be a fairly clear choice to develop with C#/.NET. The time to develop a robust and fully tested C++ app (with no leaks, etc) is (for me at least) much greater than the same with C#.

这篇关于我应该使用哪个平台:native C ++或C#?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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