Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Number.cs #6

Merged
merged 2 commits into from
Dec 21, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions source/System/Number.cs
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,10 @@ public static String Format(Object value, bool isInteger, String format, NumberF

if (isInteger)
{
// Special case : type is integer, value = 0 and format string = "N0"
// No processing needed, simply return "0" (native code returns empty string for this special case)
if (isInteger && result == String.Empty && format == "N0") return "0";

return PostProcessInteger(value, result, formatCh, precision, info);
}
return PostProcessFloat(result, formatCh, info);
Expand Down