From ba63a4895f2f65b3be1a738f85151beff1631522 Mon Sep 17 00:00:00 2001 From: "pirmin.vollert" Date: Tue, 22 Oct 2024 18:05:51 +0200 Subject: [PATCH] Fix positive infinity in TypeModel. --- XmlSchemaClassGenerator/TypeModel.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }