【问题标题】:Equivalent of System.Xml.XmlAttribute in PCL land?PCL 领域中 System.Xml.XmlAttribute 的等价物?
【发布时间】:2015-02-21 05:22:30
【问题描述】:

我正在尝试将一些现有的 C# 代码转换为可移植类库项目,配置文件 111。这是我坚持的代码:

[System.Xml.Serialization.XmlAnyAttributeAttribute()]
public System.Xml.XmlAttribute[] OtherAttributes
{
    get
    {
        return this._otherAttributes;
    }
    set
    {
        this._otherAttributes = value;
    }
}

在 PCL 土地上相当于什么?我看到XmlSerializer 编译得很好。 XmlAnyAttributeAttribute 存在,但 XmlAttribute 类型不存在。

【问题讨论】:

    标签: c# portable-class-library xmlserializer xml-attribute


    【解决方案1】:

    似乎没有官方的等价物。

    根据 MSDN 页面,XmlAttributeXmlAnyAttributeAttribute 都没有 PCL 条目,因此这似乎暗示它们与 PCL 不兼容,不像 XmlSerializer 列出在 Portable Class Library 下。

    XmlSerializer

    可移植类库 支持:可移植类库 支持:Windows Phone 8.1 支持:Windows Phone Silverlight 8.1 支持:Windows Phone Silverlight 8

    【讨论】:

      猜你喜欢
      • 2014-04-29
      • 1970-01-01
      • 2019-11-03
      • 1970-01-01
      • 1970-01-01
      • 2020-10-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多