diff --git a/XmlSchemaClassGenerator/TypeModel.cs b/XmlSchemaClassGenerator/TypeModel.cs index d2e9526..de2d2cc 100644 --- a/XmlSchemaClassGenerator/TypeModel.cs +++ b/XmlSchemaClassGenerator/TypeModel.cs @@ -1351,7 +1351,7 @@ public IEnumerable GetRestrictionAttributes() { var rangeAttribute = new CodeAttributeDeclaration( CodeUtilities.CreateTypeReference(Attributes.Range, Configuration), - new(new CodeTypeOfExpression(minInclusive.Type)), + new(new CodeTypeOfExpression(GetReferenceFor(Namespace))), new(new CodePrimitiveExpression(minInclusive.Value)), new(new CodePrimitiveExpression(maxInclusive.Value)));