1

I'm attempting to convert some existing C# code into a Portable Class Library project, profile 111. Here is the code I'm stuck on:

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

What is the equivalent of that in PCL land? I see that the XmlSerializer compiles fine. The XmlAnyAttributeAttribute exists, but the XmlAttribute type does not.

Brannon
  • 5,324
  • 4
  • 35
  • 83

1 Answers1

1

There does not appear to be an official equivalent.

According to the MSDN page, neither XmlAttribute nor XmlAnyAttributeAttribute have an entry for PCL so that would seem to imply they are not PCL-compatible, unlike XmlSerializer which is listed under Portable Class Library.

XmlSerializer

Portable Class Library Supported in: Portable Class Library Supported in: Windows Phone 8.1 Supported in: Windows Phone Silverlight 8.1 Supported in: Windows Phone Silverlight 8