Logo 
Search:

.net framework Interview FAQs

Submit Interview FAQ
Home » Interview FAQs » .net frameworkRSS Feeds
.Net Framework
Comments: 0

Can I customise the serialization process?

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 t...
Posted By:Eileen Carr      Posted On: Dec 16

.Net Framework
Comments: 0

Why is XmlSerializer so slow?

There is a once-per-process-per-type overhead with XmlSerializer. So the first time you serialize or deserialize an object of a given type in an application, there is a significant delay. This normally doesn't matter, but it may mean, for example, th...
Posted By:Phoebe Brown      Posted On: Jan 04

.Net Framework
Comments: 0

Why do I get errors when I try to serialize a Hashtable?

XmlSerializer will refuse to serialize instances of any class that implements IDictionary, e.g. Hashtable. SoapFormatter and BinaryFormatter do not have this restriction.
Posted By:Latoya Murray      Posted On: Dec 03

.Net Framework
Comments: 0

XmlSerializer is throwing a generic "There was an error reflecting MyClass" error. How do I fin

Look at the InnerException property of the exception that is thrown to get a more specific error message.
Posted By:Shobhana R.      Posted On: Dec 11

.Net Framework
Comments: 0

Why am I getting an InvalidOperationException when I serialize an ArrayList?

XmlSerializer needs to know in advance what type of objects it will find in an ArrayList. To specify the type, use the XmlArrayItem attibute like this:

public class Person
{
public string Name;
public int Age;
}

...
Posted By:Carl Woods      Posted On: Dec 13

.Net Framework
Comments: 0

What are attributes?

There are at least two types of .NET attribute. The first type I will refer to as a metadata attribute - it allows some data to be attached to a class or method. This data becomes part of the metadata for the class, and (like other class metadata) ca...
Posted By:Adal Fischer      Posted On: Nov 23

  1  2  3  4  5  6  7  8  9  10  11