来源:http://www.asawicki.info/Download/Productions/Publications/CPP_CLI_tutorial.pdf

Why Use C++/CLI?

Why learn and use such weird hybrid language if we have C# with nice syntax, designed specifically for .NET platform? C++/CLI has an unique feature among other .NET languages: You can freely mix managed (.NET) and native (C++) code in a single project, single source file, even single function code. It makes the language hard to replace in some applications, like:

  1. When you write software that needs to use some native as well as managed libraries.
  2. When you write a library that links native with managed code, for example exposes an interface of somenative library to .NET code.
  3. When you write a program that needs both efficient processing of some binary data (which is best done in native C++ code using pointers) and has complex graphical interface (which is best one using Windows Forms) – just like I did in my job.

What C++/CLI is Not?

You may think that C++/CLI is some ugly, proprietary hack to C++ introduced by bad “M$” to confuse programmers. That’s not exactly true. Microsoft put effort to make this language really good. Some famous computer scientists and 3 C++ gurus were involved in its development, like Stanley B. Lippman and Herb Sutter. The language itself is standardized as ECMA-372. I must also clarify that C++/CLI is not the same as the old language called Microsoft Extensions for C++. That strange language which extended C++ syntax with ugly keywords like __gc or __value was predecessor of C++/CLI and is now deprecated. The syntax of C++/CLI is totally different and much more pleasant.

Why Use C++/CLI?的更多相关文章

  1. .NET Core系列 : 1、.NET Core 环境搭建和命令行CLI入门

    2016年6月27日.NET Core & ASP.NET Core 1.0在Redhat峰会上正式发布,社区里涌现了很多文章,我也计划写个系列文章,原因是.NET Core的入门门槛相当高, ...

  2. 跨越语言的障碍:C++/CLI 调用 C#

    首先我想投诉一下博客园首页右边栏的广告..最近总是出现很恐怖的整容脸的广告.真的是吓坏了.=.=大家有同感吗? 博客园前一阵子掀起了语言的广泛讨论,事实上语言的争执在整个程序员圈子也没有停止过.以我个 ...

  3. Ubuntu 安装 CLI 并运行 ASP.NET Core 1.0

    Ubuntu 下载地址:http://www.ubuntu.org.cn/download/desktop 注:目前 CLI 的安装命令只支持 Ubuntu 14.04,暂不支持 Ubuntu 14. ...

  4. 『.NET Core CLI工具文档』(十四)dotnet-install 脚本参考

    说明:本文是个人翻译文章,由于个人水平有限,有不对的地方请大家帮忙更正. 原文:dotnet-install scripts reference 翻译:dotnet-install 脚本参考 名称 d ...

  5. 『.NET Core CLI工具文档』(九)dotnet-run

    说明:本文是个人翻译文章,由于个人水平有限,有不对的地方请大家帮忙更正. 原文:dotnet-run 翻译:dotnet-run 名称 dotnet-run -- 没有任何明确的编译或启动命令运行&q ...

  6. 『.NET Core CLI工具文档』(八)dotnet-restore

    说明:本文是个人翻译文章,由于个人水平有限,有不对的地方请大家帮忙更正. 原文:dotnet-restore 翻译:dotnet-restore 名称 dotnet-restore - 还原一个项目的 ...

  7. 『.NET Core CLI工具文档』(七)dotnet-new

    说明:本文是个人翻译文章,由于个人水平有限,有不对的地方请大家帮忙更正. 原文:dotnet-new 翻译:dotnet-new 名称 dotnet-new -- 创建一个新的 .NET Core 项 ...

  8. 『.NET Core CLI工具文档』(六)dotnet 命令

    说明:本文是个人翻译文章,由于个人水平有限,有不对的地方请大家帮忙更正. 原文:dotnet command 翻译:dotnet 命令 名称 dotnet -- 运行命令行命令的一般驱动程序 概要 d ...

  9. 『.NET Core CLI工具文档』(二).NET Core 工具遥测(应用信息收集)

    说明:本文是个人翻译文章,由于个人水平有限,有不对的地方请大家帮忙更正. 原文:.NET Core Tools Telemetry 翻译:.NET Core 工具遥测(应用信息收集) .NET Cor ...

  10. 『.NET Core CLI工具文档』(一).NET Core 命令行工具(CLI)

    说明:本文是个人翻译文章,由于个人水平有限,有不对的地方请大家帮忙更正. 原文:.NET Core Command Line Tools 翻译:.NET Core命令行工具 什么是 .NET Core ...

随机推荐

  1. UVA - 1205 Color a Tree

    大意就是给你一颗树,每个点有一个权值w[i],求一个排列使得 所有的父亲都在儿子前面 并且排列的权值最小. 排列的权值在这里定义为 Σ i * w[p[i]]   ,其中p[i] 是排列第i个位置的元 ...

  2. 【redis】存入redis的值,如果为null是否默认不被存入

    存入redis的值,如果为null是否默认不被存入

  3. lua 的一些常用概念

    1 a={} //定义了一个table   a a[10000]=1 //这里的table中只有一个元素,10000,而不是有10000个元素 2 x=math.pi //定义了x等于π print( ...

  4. 在C#中使用C++编写的类——用托管C++进行封装[转]

    现在在Windows下的应用程序开发,VS.Net占据了绝大多数的份额.因此很多以前搞VC++开发的人都转向用更强大的VS.Net.在这种情况 下,有很多开发人员就面临了如何在C#中使用C++开发好的 ...

  5. C#数据之DataTable

    C#创建DataTable的几种方式 第一种方式:直接添加数据对象 DataTable table = new DataTable(); table.Columns.Add("strName ...

  6. 基于maven+dubbo+spring+zookeeper的简单项目搭建

    maven下搭建dubbo小demo,供初学者学习,有不正确地方还请见谅. 先推荐一篇创建maven项目的文章,个人认为比较完整详细清楚: http://www.cnblogs.com/leiOOle ...

  7. ext tree展开时的一些技巧

    加入子节点的时候.我们须要展开父节点.并选中刚加入好的节点. 这时候会有一个问题. 我用的ext-js-4.2起码有一种问题. 节点内部会混乱.要么多加一个. 要么层级会发生故障. 随后我发现一个窍门 ...

  8. js:string转int

    http://blog.csdn.net/leidengyan/article/details/5503594 <script>     var   str='1250' ;   aler ...

  9. 百度Echart3

    由于项目需要在首页搞一个订单数量的走势图,经过多方查找,体验,感觉ECharts不错,封装的很细,我们只需要看自己需要那种类型的图表,搞定好自己的json数据就OK.至于说如何体现出来,官网的教程很详 ...

  10. VueJS字符串反转:String.reverse()

    HTML <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <titl ...