❔ calculator

Hey everyone, I'm new to C# and I'm trying to fix this calculator that I found online, but I can't seem to find out what's wrong with it. It's probably obvious, hope someone can help 😄 I've left a URL here for anyone generous enough to take a look. Thanks (: https://onecompiler.com/csharp/3zhajvckg
7 Replies
Thinker
Thinker16mo ago
The issue is that you appear to be using WPF namespaces in this online IDE thing which probably doesn't support that If you wanna get started properly then you should download Visual Studio Community 2022 if you can This code is specifically made for WPF, not to just run in the console
Michael R Trammell
Michael R TrammellOP16mo ago
Yeah 100% I was just using that as a way to send the code. I'm using it in Visual Studio and it's running, however, something to do with the calculation is producing an error - errorDisplay.Text = "There's an error in the expression.";
Denis
Denis16mo ago
Use this to send code $code
MODiX
MODiX16mo ago
To post C# code type the following: ```cs // code here ``` Get an example by typing $codegif in chat If your code is too long, post it to: https://paste.mod.gg/
Denis
Denis16mo ago
And to figure out what is going on, you should use debugging $debug
MODiX
MODiX16mo ago
Tutorial: Debug C# code - Visual Studio (Windows)
Learn features of the Visual Studio debugger and how to start the debugger, step through code, and inspect data in a C# application.
Accord
Accord16mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server