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

Can I use razor code in javascript in asp.net mvc?

0 Answers  


What are Scaffold templates in ASP.Net MVC?

0 Answers  


What is the difference between model and entity?

0 Answers  


Can a view be shared across multiple controllers? If yes, how we can do that?

0 Answers  


The order of the filters that get executed, if the multiple filters are implemented?

0 Answers  






What is inline schema, how does it works

1 Answers  


i just want to write an exam regarding .net?plz give me information about taking a test?where to pay 4 d exam,exam centre?

0 Answers  


Can you explain model, controller and view in mvc?

0 Answers  


What is CLR? How it will work?

5 Answers  


Explain JSON Binding?

0 Answers  


What are the types of authentication in .net

1 Answers  


what are partial classes?

12 Answers   Digimaker, HP, N Tech, TCS,


Categories