在C#中指针? [英] Pointers in C#?

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

问题描述

在一个C#的维护项目,我碰到下面的变量声明:

In one C# maintenance project I came across following variable declaration:

Int32* iProgressAddress;

难道指针声明在C#?

Is it pointer declaration in C#?

我认为没有在C#中没有指针的概念,这是什么说法呢?

I thought that there is no pointer concept in C#, what does that statement mean?

推荐答案

C#不支持指针,但它仅限于指向那些非托管类型的基本数据类型,如整型,浮点型,枚举和其他指针类型(加原语的其余部分)。

C# does support pointers, but it's limited to pointing to primitive data types that are unmanaged types, such as ints, floats, enums, and other pointer types (plus the rest of the primitives).

修改:和值类型

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

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