diff --git a/XmlSchemaClassGenerator/TypeModel.cs b/XmlSchemaClassGenerator/TypeModel.cs index 8cb1d7e..1ce2ecb 100644 --- a/XmlSchemaClassGenerator/TypeModel.cs +++ b/XmlSchemaClassGenerator/TypeModel.cs @@ -1331,7 +1331,7 @@ public override CodeExpression GetDefaultValueFor(string defaultString, bool att else if (type == typeof(double) && !string.IsNullOrWhiteSpace(defaultString)) { if (defaultString.Equals("inf", StringComparison.OrdinalIgnoreCase)) - return new CodePrimitiveExpression(double.NegativeInfinity); + return new CodePrimitiveExpression(double.PositiveInfinity); else if (defaultString.Equals("-inf", StringComparison.OrdinalIgnoreCase)) return new CodePrimitiveExpression(double.NegativeInfinity); }