C# Xsd.exe生成错误的<;xs:list>;

C# Xsd.exe生成错误的<;xs:list>;,c#,code-generation,xsd.exe,C#,Code Generation,Xsd.exe,这是Xsd.exe生成内容的示例(也是Xsd2Code,但使用泛型列表) // [System.CodeDom.Compiler.GeneratedCodeAttribute(“xsd”,“4.0.30319.1”)] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute(“代码”)]

这是Xsd.exe生成内容的示例(也是Xsd2Code,但使用泛型列表)

//
[System.CodeDom.Compiler.GeneratedCodeAttribute(“xsd”,“4.0.30319.1”)]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute(“代码”)]
[System.Xml.Serialization.XmlTypeAttribute(Namespace=“xxxxxxxxxxxxxxxxxx”)]
[System.Xml.Serialization.XmlRootAttribute(Namespace=“xxxxxxxxxxxxxxxxxx”,IsNullable=false)]
公共部分类项数量
{
/// 
[System.Xml.Serialization.XmlAttributeAttribute()]
公共字符串单位;
/// 
[System.Xml.Serialization.XmlAnyAttributeAttribute()]
public System.Xml.xmldattribute[]AnyAttr;
/// 

[System.Xml.Serialization.XmlTextAttribute()]/我已经编辑了xsd.exe生成的代码并将

[System.Xml.Serialization.XmlArrayItemAttribute("Double",typeof(double), IsNullable = false)]
而不是

[System.Xml.Serialization.XmlTextAttribute()]
据我判断……它确实表现得更好

0.10.20.80.505

但是我应该确保在测试标记中包含的所有列表对我的模式仍然有效…

您尝试过了吗?没有,我只是在页面上尝试过…阻止我尝试的是,我坚持使用.net 3.5,而Linq2Xsd v2.0适用于.net 4.0…但是今天下午我将尝试以前的版本Linq2Xsd v1.0,它可以这是一个值得尝试的想法,当然。谢谢。
[System.Xml.Serialization.XmlTextAttribute()]
<Test><Double>0.1</Double><Double>0.2</Double><Double>0.8</Double><Double>0.505</Double></Test>