Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的代码从 xml 文件反序列化时出现问题。我的实体类中的属性返回一个布尔值,它可以接受“Y”或“N”和 True/False。除了它之外,其他属性作为字符串可以顺利读取。将我的代码包含在 Try-Catch 块中后,我能够找出返回错误的代码行。
似乎,将此错误命名为安全异常有点令人困惑。我对 xml 文件所做的是将值从 True 更改为 1,将 False 更改为 0。