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
When using razor views, do you have to take any special steps to protect your asp.net mvc application from cross site scripting (xss) attacks?
What type of filter does outputcacheattribute class represents?
What are the main components of .net framework?
Explain covariance and contra-variance in .net framework 4.0. Give an example for each.
what is deferred loading(lazy loading)?
mention in what all scenarios entity framework can be applicable?
What is difference between viewbag and viewdata and tempdata?
What is action methods in web api?
What is namespace of asp.net mvc?
What is object service? : Entity framework
What is the use .glimpse in mvc?
What is viewdata?
Describe the roles of clr in .net framework.?
What is orm entity framework?
What is Peek method in Tempdata in ASP.Net MVC?