这应该很简单:我看到人们使用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.