Code
public class RootSerialized
{
[XmlElement("Som eCollection")]
public SomeCollection SomeThings;
}
public class SomeCollection: BaseCollection ,ITypedList ,IBindingList
{
public SomeCollection( ) : base()
{
}
[XmlElement("Som ething")]
public Something this[int index]
{
get
{
return (Something )m_al[index];
}
}
}
During the serialization
XmlSerializer s = new XmlSerializer( typeof( RootSerialized ) );
this this structure return error:
System.InvalidO perationExcepti on: There was an error generating the XML
document. ---> System.InvalidC astException: Specified cast is not valid.
So what is the problem?
--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "
public class RootSerialized
{
[XmlElement("Som eCollection")]
public SomeCollection SomeThings;
}
public class SomeCollection: BaseCollection ,ITypedList ,IBindingList
{
public SomeCollection( ) : base()
{
}
[XmlElement("Som ething")]
public Something this[int index]
{
get
{
return (Something )m_al[index];
}
}
}
During the serialization
XmlSerializer s = new XmlSerializer( typeof( RootSerialized ) );
this this structure return error:
System.InvalidO perationExcepti on: There was an error generating the XML
document. ---> System.InvalidC astException: Specified cast is not valid.
So what is the problem?
--
Tamir Khason
You want dot.NET? Just ask:
"Please, www.dotnet.us "
Comment