char buf[] = "Native String";
int len = strlen(buf);
array< Byte >^ bb = gcnew array< Byte >(len + 2);
System::Runtime::InteropServices::Marshal::Copy((IntPtr)buf,bb, 0, len);//将char buf[]转换成byte[]
char buf[] = "Native String";
int len = strlen(buf);
array< Byte >^ bb = gcnew array< Byte >(len + 2);
System::Runtime::InteropServices::Marshal::Copy((IntPtr)buf,bb, 0, len);//将char buf[]转换成byte[]