Skip to content

Commit

Permalink
Fix positive infinity in TypeModel.
Browse files Browse the repository at this point in the history
  • Loading branch information
pi-vo committed Oct 22, 2024
1 parent 9e2b96d commit ba63a48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion XmlSchemaClassGenerator/TypeModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit ba63a48

Please sign in to comment.