gpt4 book ai didi

c# - 你如何在 .NET Core 中执行 XmlIgnore?

转载 作者:数据小太阳 更新时间:2023-10-29 03:00:37 27 4
gpt4 key购买 nike

有什么方法可以防止属性在 .NET Core 中被 XML 序列化(我们之前通常会使用 [XmlIgnore] 属性来做到这一点)?

最佳答案

XmlIgnore 不在 .net 核心中(或者 .net 标准 1.6,这可能更重要)。

本页here在 Github 上声明 .net 标准 2.0 将包含 XmlIgnore(您可以通过查看 1.6 和 2.0 之间的原始差异进一步检查 here

关于c# - 你如何在 .NET Core 中执行 XmlIgnore?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42738566/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com