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 redirect tracing to a file

1 Answers  


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

0 Answers  


VIEWS WITH SYNTAX AND EXAMPLE IN SQL

1 Answers  


Can we create .DLL file without using the namespace?

4 Answers  


who handles these error while writing the source code???.

2 Answers  






What is MVVM design pattern?

0 Answers  


What is objectcontext? : Entity framework

0 Answers  


What is namespace used for loading assemblies at run time and name the methods?

2 Answers  


What is CLR and how it generates native code ?

1 Answers   Digital GlobalSoft, Vital Soft,


Explain tempdata in mvc?

0 Answers  


What is serialization ?

7 Answers   IBM, Karrox, MMTS,


What is gacutil.exe. Where do we store assemblies ?

5 Answers   Accenture, BirlaSoft,


Categories