悬赏园豆:100
[已关闭问题]
这是我先定义的xsd中的一部分,这四个字段我都想让它门成为必选字段. <BR><xs:element name="TestString" type="xs:string" minOccurs="1" maxOccurs="1" /> <BR><xs:element name="TestInteger" type="xs:integer" maxOccurs="1" minOccurs="1" /> <BR><xs:element name="TestDate" type="xs:date" maxOccurs="1" minOccurs="1" /> <BR><xs:element name="TestBool" type="xs:boolean" maxOccurs="1" minOccurs="1" /> <BR>然后我用工具生成下面的C#类,采用是的XMLSerializer来序列化它 <BR> /// <remarks/> <BR> public string TestString { <BR> get { <BR> return this.testStringField; <BR> } <BR> set { <BR> this.testStringField = value; <BR> } <BR> } <BR> <BR> /// <remarks/> <BR> [System.Xml.Serialization.XmlElementAttribute(DataType="integer")] <BR> public string TestInteger { <BR> get { <BR> return this.testIntegerField; <BR> } <BR> set { <BR> this.testIntegerField = value; <BR> } <BR> } <BR> <BR> /// <remarks/
雾里清风
|
初学一级
|
园豆:
100
提问于:2008-04-03 17:55