用C ++指针和引用类型在C#中的区别 [英] Difference between pointer in C++ and reference type in C#

查看:153
本文介绍了用C ++指针和引用类型在C#中的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在C ++中指针指向到另外一个变量存储,并在C#一提的是内存地址一些如何一样。是什么在C#中这两个?

In C++ a pointer is a pointer to an address of memory where another variable is stored and in C# a reference is some how same. What is the difference between these two?

推荐答案

之间的区别引用类型将垃圾自动收集时,不再需要。

In C# the reference type will be automatically garbage collected when no longer needed.

这篇关于用C ++指针和引用类型在C#中的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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