Can I customise the serialization process

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What are Action Methods in ASP.NET MVC?

661


What are the sub types of ActionResult?

670


How to update one of my table in database at 4pm every day how it is possible?

642


Describe the gac in the .net framework.

665


Can you explain the page life cycle of mvc?

665






sql related question (outer join, left, right etc) array vs hashtable CRL sqldatareader vs dataset what is WPF, WCF, compare to WinForms Webservices Asp.net MVC vs WebForms?

3054


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?

1894


what do you mean by table-per-type?

721


How we can handle the exception at controller level in ASP.Net MVC?

667


Explain tempdata in mvc?

653


What is meant by domain model?

631


what is datacontrols?

3250


What is managed extensibility framework?

647


What is Separation of Concerns in ASP.NET ASP.Net MVC?

681


What is poco proxy? : Entity framework

639