The XmlSerializer has to have an instantiated object during serialization.
For an interface, however, it would not know what type to instantiate.
Working around this limitation, you can use an abstract base class to
express the semantics of your interface. For example:
public abstract class IWizard
{
public abstract int x
{
get;
set;
}
}
[Serializable]
public class Geometry
{
private IWizard _wizard;
public IWizard Wizard
{
get { return _wizard ;}
set { _wizard = value;}
}
}
Luke
Microsoft Online Support
Get Secure!
www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)