Hi all
I'm using .Net Framework 1.1
I have build several C# classes with XSDObjectGen. In the XML Schema i
defined that the elements myint and mydate can be nillable. The definition
like this cause an exception when i try to serialize the classes.
[XmlElement(ElementName="myint",IsNullable=true,For m=XmlSchemaForm.Qualified,DataType="int",Namespace =Declarations.SchemaVersion)]
public int myint;
[XmlElement(ElementName="mydate",IsNullable=true,Fo rm=XmlSchemaForm.Qualified,DataType="date",Namespa ce=Declarations.SchemaVersion)]
public DateTime mydate;
I get the message: "IsNullable can't be true for System.Int32 ..
and the message: "IsNullable can't be true for System.DateTime ..
How can i write the definition if i need an XML like this:
<?xml version="1.0"?>
<rootelement>
<mydate xsi:nil="true"/>
<myint xsi:nil="true"/>
</rootelement>
Is there a workaround ?
Any help will be very appreciated.
Regards
Paolo Taverna