Can I customise the serialization process



Can I customise the serialization process..

Answer / kirti

Yes. XmlSerializer supports a range of attributes that can be used to configure serialization for a particular class. For example, a field or property can be marked with the [XmlIgnore] attribute to exclude it from serialization. Another example is the [XmlElement]

attribute, which can be used to specify the XML element name to be used for a particular property or field.

Serialization via SoapFormatter/BinaryFormatter can also be controlled to some extent by attributes. For example, the [NonSerialized] attribute is the equivalent of XmlSerializer's [XmlIgnore] attribute. Ultimate control of the serialization process can be acheived by implementing the the ISerializable interface on the class whose instances are to be serialized.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Dot Net Framework Interview Questions

What is the meaning of unobtrusive javascript? Explain us by any practical example.

1 Answers  


When was the first version of .NET released

1 Answers  


What are Non Action methods in ASP.Net MVC?

1 Answers  


I want ask from plz smaple example code for Biztalkk server

1 Answers  


Can you declare an override method to be static if the original method is non-static

1 Answers  


Does windows 10 need .net framework?

1 Answers  


what is VSS? Where we are using?

3 Answers   TCS,


Explain .net Framework?

1 Answers  


what do you mean by table-per-hierarchy?

1 Answers   Microsoft,


Will there be a .net compact framework 3.0 release with release of .net framework 3.0?

1 Answers  


Is the lack of deterministic destruction in .NET a problem

1 Answers  


Explain bundle.config in mvc4?

1 Answers  


Categories