有些人可以告诉我如何将VC ++迁移到.Net或WPF或WCF [英] Can some body tell me how to migrate VC++ to .Net or WPF or WCF

查看:62
本文介绍了有些人可以告诉我如何将VC ++迁移到.Net或WPF或WCF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从VC ++迁移到.Net或WPF或WCF这是当前行业的正确举措,我之前在金融服务方面的经验大约3年多。

解决方案

最多,它意味着从头开始编写所有项目,使用现有代码作为参考。



但是,如果你的C ++代码真的很好写的,它的不同方面彼此很好地隔离(特别是从你需要抛弃的UI),你有机会妥协,这将允许你重用大部分的C ++本机代码。这可以通过将此代码放入用C ++ / CLI编写的混合模式(托管+非管理)代码来完成。该语言提供了组合本机和CLI代码的独特功能,即使在同一个可执行模块中也是如此。您可以将本机类包装在CLIref类中,并将项目编译为正常的.NET程序集,该程序集可以用作其他程序集中引用的任何其他程序集。请参阅:

http://en.wikipedia.org/wiki/C %2B%2B / CLI [ ^ ],

http://www.ecma-international .org / publications / standards / Ecma-372.htm [ ^ ],

http:// www.gotw.ca/publications/C++CLIRationale.pdf [ ^ ],

http:// msdn.microsoft.com/en-us/library/xey702bw.aspx [ ^ ]。



-SA

I wanted to migrate from VC++ to .Net or WPF or WCF is it a right move in current Industry, i have my previous experiance in financial services around 3+ years.

解决方案

At most, it means writing all projects from scratch, using your existing code just as the reference.

However, if your C++ code is really well written, different aspect of it are well isolated from each other (especially from UI which you will need to throw out anyway), you have some chance for a compromise which will allow you to reuse big part of your C++ native code. This can be done by putting this code into the mixed-mode (managed + unmanages) code written in C++/CLI. This language provides unique capability to combine native and CLI code, even in the same executable module. You can wrap your native classes in CLI "ref" classes and compile your project into the normal .NET assembly which could be used as any other assembly, referenced in other assemblies. Please see:
http://en.wikipedia.org/wiki/C%2B%2B/CLI[^],
http://www.ecma-international.org/publications/standards/Ecma-372.htm[^],
http://www.gotw.ca/publications/C++CLIRationale.pdf[^],
http://msdn.microsoft.com/en-us/library/xey702bw.aspx[^].

—SA


这篇关于有些人可以告诉我如何将VC ++迁移到.Net或WPF或WCF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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