diff --git a/XmlSchemaClassGenerator.Tests/XmlTests.cs b/XmlSchemaClassGenerator.Tests/XmlTests.cs
index 02d7e156..2cd9afa9 100644
--- a/XmlSchemaClassGenerator.Tests/XmlTests.cs
+++ b/XmlSchemaClassGenerator.Tests/XmlTests.cs
@@ -567,8 +567,6 @@ namespace Test
using System.Xml.Serialization;
- ///
- ///
[System.CodeDom.Compiler.GeneratedCodeAttribute(""Tests"", ""1.0.0.1"")]
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(""group-name"", Namespace="""")]
@@ -583,8 +581,6 @@ public partial class Group_Name
[System.Xml.Serialization.XmlTextAttribute()]
public string Value { get; set; }
- ///
- ///
[System.Xml.Serialization.XmlAttributeAttribute(""justify"", Form=System.Xml.Schema.XmlSchemaForm.Unqualified)]
public SimpleType Justify { get; set; }
@@ -596,16 +592,12 @@ public partial class Group_Name
public bool JustifySpecified { get; set; }
}
- ///
- ///
[System.CodeDom.Compiler.GeneratedCodeAttribute(""Tests"", ""1.0.0.1"")]
[System.SerializableAttribute()]
[System.Xml.Serialization.XmlTypeAttribute(""simpleType"", Namespace="""")]
public enum SimpleType
{
- ///
- ///
[System.Xml.Serialization.XmlEnumAttribute(""foo"")]
Foo,
}
diff --git a/XmlSchemaClassGenerator/TypeModel.cs b/XmlSchemaClassGenerator/TypeModel.cs
index 47514f3f..08370166 100644
--- a/XmlSchemaClassGenerator/TypeModel.cs
+++ b/XmlSchemaClassGenerator/TypeModel.cs
@@ -67,9 +67,9 @@ public class DocumentationModel
public string Text { get; set; }
public static bool DisableComments { get; set; }
- public static IEnumerable GetComments(IEnumerable docs)
+ public static IEnumerable GetComments(IList docs)
{
- if (DisableComments)
+ if (DisableComments || docs.Count == 0)
yield break;
yield return new CodeCommentStatement("", true);