diff --git a/XmlSchemaClassGenerator.Tests/xsd/simple/ng.xsd b/XmlSchemaClassGenerator.Tests/xsd/simple/ng.xsd new file mode 100644 index 00000000..e011e3f5 --- /dev/null +++ b/XmlSchemaClassGenerator.Tests/xsd/simple/ng.xsd @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + diff --git a/XmlSchemaClassGenerator/TypeModel.cs b/XmlSchemaClassGenerator/TypeModel.cs index cfbae63d..92a7fbf5 100644 --- a/XmlSchemaClassGenerator/TypeModel.cs +++ b/XmlSchemaClassGenerator/TypeModel.cs @@ -664,7 +664,7 @@ public void AddInterfaceMembersTo(CodeTypeDeclaration typeDeclaration) var isPrivateSetter = IsPrivateSetter; var typeReference = TypeReference; - if (isNullableValueType && Configuration.GenerateNullables) + if ((isNullableValueType || IsNillableValueType) && Configuration.GenerateNullables) typeReference = NullableTypeRef(typeReference); member = new CodeMemberProperty