Marshal 类不包含ReadBool方法。如果我的 c++ 结构包含bool字段,那么我应该如何阅读它?我试过这样做:(bool) Marshal.ReadInt32(intPointer, offset)但不允许将 int32 转换为 bool。
Marshal 类不包含ReadBool方法。如果我的 c++ 结构包含bool字段,那么我应该如何阅读它?我试过这样做:(bool) Marshal.ReadInt32(intPointer, offset)但不允许将 int32 转换为 bool。