这应该很简单:我到处都看到人们使用 IntPtr
,我有什么理由应该改用 UIntPtr
吗?
最佳答案
似乎没有充分的理由这样做。来自文档:
Remarks
...
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.
关于c# - IntPtr 与 UIntPtr,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1320296/