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
How we can handle the exception at controller level in ASP.Net MVC?
How can I tell what .net framework is installed?
What is the difference between viewbag and viewdata in asp.net mvc?
Can I add asp.net mvc testcases in visual studio express?
What is a razor file?
What is viewbag?
What are Action Methods in ASP.NET MVC?
What are sections?
What is controllercontext?
what is code first approach?
what is entity framework advantage?
How to Redirect Tracing to a File
What is the use of action filters in an mvc application?
What is the difference between renderaction and renderpartial?
Why is the .net framework 3.0 a major version number of the .net framework if it uses the .net framework 2.0 runtime and compiler?