如题:
fixed (char* str = ((char*)src))
{
char* chPtr = str;
fixed (char* chRef = dest)
{
byte* numPtr = (byte*)(chPtr + srcIndex);
byte* numPtr2 = (byte*)(chRef + destIndex);
memcpyimpl(numPtr, numPtr2, num);
str = null;
}
}
fixed (char* str = ((char*)src))
{
char* chPtr = str;
fixed (char* chRef = dest)
{
byte* numPtr = (byte*)(chPtr + srcIndex);
byte* numPtr2 = (byte*)(chRef + destIndex);
memcpyimpl(numPtr, numPtr2, num);
str = null;
}
}
C#中的安全代码没有char*这玩意儿~~
比如:
string src;
char * des = src.data();