C# 數組轉Intptr

在c++裏數據轉指針是很容易的,可是在託管代碼裏,轉起來就比較費勁了。轉換方法以下: internal static IntPtr ArrayToIntptr(byte[] source) { if (source == null) return IntPtr.Zero; unsafe { fixed (byte* point = source) { IntPtr ptr = new IntPtr
相關文章
相關標籤/搜索