前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >异常的中英文对照_圣经中英文对照

异常的中英文对照_圣经中英文对照

作者头像
全栈程序员站长
发布2022-09-20 09:54:18
1.6K0
发布2022-09-20 09:54:18
举报
文章被收录于专栏:全栈程序员必看

在触发异常的地方添加一下代码,就会出现英文的异常

代码语言:javascript
复制
 Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;
 Thread.CurrentThread.CurrentUICulture = CultureInfo.InvariantCulture;

1.

Could not load type ‘ZITaker.Struct.StClientData’ from assembly ‘ZITaker, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null’ because it contains an object field at offset 10 that is incorrectly aligned or overlapped by a non-object field.

未能从程序集“ZITaker, Version=3.0.0.0, Culture=neutral, PublicKeyToken=null”中加载类型“ZITaker.Struct.StClientData”,因为它在 10 偏移位置处包含一个对象字段,该字段已由一个非对象字段不正确地对齐或重叠。

使用这个导致的

[StructLayout(LayoutKind.Explicit)]

The precise position of each member of an object in unmanaged memory is explicitly controlled, subject to the setting of the System.Runtime.InteropServices.StructLayoutAttribute.Pack field. Each member must use the System.Runtime.InteropServices.FieldOffsetAttribute to indicate the position of that field within the type.

2.

Attempted to perform an unauthorized operation.

尝试执行未经授权的操作。

发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/168163.html原文链接:https://javaforall.cn

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档