I have a class :
[Serializable]
public class Profile
{
[XmlAttribute]
private string[] permissions;
public string[] Permissions
{
get { return permissions; }
set { permissions = value; }
}
}
I want to serialize it in XML with XmlSerializer and I also have to be compliant with FxCop. The problem is that FxCop only wants to expose read-only collection for properties, but of course a ReadOnlyCollection is not serializable. I do not want to implement IXmlSerializable because it's too painful. Is there any other solution ?
Options: