IntPtr的VS UIntPtr [英] IntPtr vs UIntPtr

查看:146
本文介绍了IntPtr的VS UIntPtr的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这应该是简单的:我看到到处都是人用的IntPtr ,没有任何理由,我应该使用 UIntPtr 而不是?

This should be simple: I see everywhere people use IntPtr, is there any reason I should use UIntPtr instead?

推荐答案

似乎并不像会有一个很好的理由。从文档:

Doesn't seem like there would be a good reason to. From the docs:

备注

...

本的IntPtr类型符合CLS,   而UIntPtr类型不是。 只有   所述的IntPtr类型用于在公共   语言运行库。该UIntPtr类型   提供的大多维持   与IntPtr的建筑对称   类型。

The IntPtr type is CLS-compliant, while the UIntPtr type is not. Only the IntPtr type is used in the common language runtime. The UIntPtr type is provided mostly to maintain architectural symmetry with the IntPtr type.

这篇关于IntPtr的VS UIntPtr的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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