I had an XML File that I needed to serialize. I used VS feature Paste Special->Convert XML to C# Classes feature and got the C# classes for that XML file.
The C# file for the XML has Multiple Classes as shown in the image below:
The generated C# of XML has the following structure
[System.Xml.Serialization.XmlTypeAttribute(AnonymousType = true, Namespace = "http://example.com/633")]
[System.Xml.Serialization.XmlRootAttribute(Namespace = "http://example.com/633", IsNullable = false) ]
public partial class FlightPlan
{
private FlightPlanM633Header m633HeaderField;
private FlightPlanM633SupplementaryHeader m633SupplementaryHeaderField;
------
-----
}
I want to add the [serializable]
attribute and go ahead with the serializing the whole XML. I am unable to add [serializable]
attribute.