C# 数组转Intptr

在c++里数据转指针是很容易的,可是在托管代码里,转起来就比较费劲了。转换方法以下: internal static IntPtr ArrayToIntptr(byte[] source) { if (source == null) return IntPtr.Zero; unsafe { fixed (byte* point = source) { IntPtr ptr = new IntPtr
相关文章
相关标签/搜索