question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Math.Round opens the browser print dialog

See original GitHub issue

Describe the bug

Put the following code in the http:/try.dot.net page:

using System;
public class Example
{
    public static void Main()
    {
        var x = Math.Round(11.1, MidpointRounding.AwayFromZero);
    }
}

Instead of printing the output, the “run” button opens the browser’s print dialog.

Did this error occur while using dotnet try or online?

  • dotnet-try
  • online

What kind of error was it?

  • User Interface (UI): For example the output never displayed
  • Service Error: For example “The service is temporarily unavailable. We are working on it”
  • Other:

Screenshots

Please complete the following:

  • OS
    • Windows 10
    • macOS
    • Linux (Please specify distro)
    • iOS
    • Android
  • Browser
    • Chrome
    • Edge
    • Safari

Both Edge and Chrome exhibit this behavior on both Windows 10 and MacOS.

/cc @jonsequitur @rchande

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:801
  • Comments:80 (5 by maintainers)

github_iconTop GitHub Comments

152reactions
ghostcommented, Jun 20, 2019

I tried this on IE5.5 in a MacOS 9 VM and an Apple Laserwriter II spontaneously materialized on the floor

114reactions
dbeylkhanovcommented, Jun 19, 2019

+1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Math.Round opens the browser print dialog | Hacker News
The issue is that print call. They expect it to call their own print function. But that's not in scope so it falls...
Read more >
Math.Round opens the browser print dialog : r/programmingcirclejerk
This what happens when language let programmers DRY themselves out too much, they confuse print-to-log with print-to-paper. Go doesn't have generics for ...
Read more >
Scott Hanselman on Twitter: "Good bug? Or greatest bug?!? “Math ...
Math.Round opens the browser print dialog · Issue #290 · dotnet/try ... page: using System; public class Example { public static void Main()...
Read more >
Probably the most interesting bug... - Synergy-IT Pakistan | Facebook
Math.Round opens the browser print dialog · Issue #290 · dotnet/try. Describe the bug Put the following code in the http:/try.dot.net page: using...
Read more >
show the window print dialog using JavaScript in Google ...
afaik this is the only way to tell the browser to show the print dialog. Unfortunately Google Chrome decides to show its own...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found