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 |
What is the .net framework?
What are the advantages of asp.net mvc?
List out few different return types of a controller action method?
What is CLR? How it will work?
What is NonActionAttribute ?
How can you return string result from Action in ASP.Net MVC?
Define the core components of an ASP.NET MVC application?
how to face first interview in .NET?
What are the components required to create a route in ASP.Net MVC?
What are ajax helpers in asp.net mvc?
Can we change web.config settings from iis?
Is .net framework going away?