I have a .net 4 class which it's decorated with a ReadOnly attribute. I'm trying to serialize this class in .NET Compact 3.5 project, but I'm getting an error: "There was an error reflecting type IpSettings" As far as I know .NET CF doesn't include any custom attributes, but I don't need to serialize this attribute. Is there any way to skip the attribute serialization ? Thanks, Alex
public class IpSettings
{
[ReadOnly(true)]
public string IP { get; set; }
public string Mask { get; set; }
public string Gateway { get; set; }
public string DNS1 { get; set; }
public string DNS2 { get; set; }
}
var serializer = new System.Xml.Serialization.XmlSerializer(typeof(IpSettings));