如何在单声道帮助下将无符号char数组从c ++转换为字节数组c#?我尝试下一步,但是当我检查c#数组时,有不同的值不像我的。
byte b[] = {0x01,0x02};
MonoArray* new_byte_array = mono_array_new(Mono::currentDomain, mono_get_byte_class(), 2);
mono_array_setref(new_byte_array, 0,mono_value_box(Mono::currentDomain, mono_get_byte_class(),&b[0]));
mono_array_setref(new_byte_array, 1,mono_value_box(Mono::currentDomain, mono_get_byte_class(),&b[1]));