✅ A bit of a beginner qustion, working with data types and variables. I can't seem to get it working
I was expecting 10 to be outputted because of llgebra but unfortuanely I only see this black screen and the flicker. I have no red squaggles underneath anything. Anyone have ideas?? 😦
33 Replies
Weird, it should work just fine
I can send a screenshot if needed
Thanks for replying also
You're using Visual Studio 2022?
Running the code with the green arrow, F5?
Works fine here
Any other files in the project?
No, it’s just this
Huh
I used Console App (.NET Framework)
Maybe that’s why?
just for giggles, f9 on the
Console.WriteLine(y);
(to insert a breakpoint)
and f5 to start debuggingYou should not be using .NET Framework nowadays, but it should still run
Were it not a .NET Framework project, I would've told you to try running it from the CLI
Any relevance?
What’s that? Sorry
that is odd behavior
You've just stopped at a breakpoint
One thing I notice is that “args” is white and underlined. Could be something as to why it’s broken?
Click on the red circle to remove it, and/or press "Continue" at the top / F5 to continue
was referring to the odd gray square
gotcha
Now you've selected part of the text of the console, which for annoying reasons pauses all execution
Click somewhere in the console and press Enter
GOT IT
tHANK YOU so much
Thanks guys
You can run modern .NET projects with a
dotnet run
command from the console, without even needing Visual Studio
It would let us tell if it's a VS problem, or code problem, by elmiminating VS from the equationHow would I do that? Thanks for the suggestion!
We,, you would start by making a non-Framework project
$newproject
When creating a new project, prefer using .NET over .NET Framework, unless you have a very specific reason to be using .NET Framework.
.NET Framework is now legacy code and only get security fix updates, it no longer gets new features and is not recommended.
https://cdn.discordapp.com/attachments/569261465463160900/899381236617855016/unknown.png
Or making it with the CLI,
dotnet new console
for example
Shift-RMB in any folder would let you open a Powershell window in he location of the project
Or you could open Powershell, CMD, or any other shell and navigate to that project with cd
command
Then dotnet run
to run itThanks a ton!
Alright I’m gonna get sleep
Good night guys
$close
If you have no further questions, please use /close to mark the forum thread as answered