C
C#12mo ago
shuffle

unable to call main method

Hi my program stops one line before the main method causing it to not run any help would be appreciated
No description
39 Replies
Angius
Angius12mo ago
Program cannot stope before Main() because Main() is the entry point of the program It's quite literally the very first thing that gets executed
shuffle
shuffleOP12mo ago
Why does nothing happen then
shuffle
shuffleOP12mo ago
No description
Angius
Angius12mo ago
It seems you're in the debugger
dhoni7
dhoni712mo ago
you should step over using the debugger
Angius
Angius12mo ago
Did you intend to run the debugger?
shuffle
shuffleOP12mo ago
I wanted to run the program
Angius
Angius12mo ago
Well, you ran the debugger
shuffle
shuffleOP12mo ago
Can I run the program without compiling?
Angius
Angius12mo ago
And probably placed a breakpoint or some such, which is why the code paused execution No C# is a compiled language It needs to be compiled
shuffle
shuffleOP12mo ago
The thing is it would always work int he compiler Till today
Angius
Angius12mo ago
What compiler?
shuffle
shuffleOP12mo ago
Debugger* Is it because I’m trying to perform file handling?
Angius
Angius12mo ago
Unlikely
shuffle
shuffleOP12mo ago
Oh my I found the breakpoint I see thank you Didn’t know that was a thing
Angius
Angius12mo ago
$debug
MODiX
MODiX12mo 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.
Angius
Angius12mo ago
Here you can read more about the debugger Breakpoints and all But if you just want to run your code, you don't need to run it through the debugger
shuffle
shuffleOP12mo ago
What’s the better way to donut Do it Compile it into an end?
Angius
Angius12mo ago
Just... run it
shuffle
shuffleOP12mo ago
Exe
Angius
Angius12mo ago
No, run the code Green arrow in the top toolbar
shuffle
shuffleOP12mo ago
Ohhhh Thank you
Angius
Angius12mo ago
Or F5 shortcut Assuming you're using VS 2022
shuffle
shuffleOP12mo ago
F5 opens debugger for me
Angius
Angius12mo ago
Ah, Ctrl+F5 then
shuffle
shuffleOP12mo ago
Alright Also I just learnt about file handling This is my code
shuffle
shuffleOP12mo ago
No description
shuffle
shuffleOP12mo ago
No description
shuffle
shuffleOP12mo ago
But I get the error could not find part of the path
Angius
Angius12mo ago
Protip: you can screenshot your screen
shuffle
shuffleOP12mo ago
Im at college I can’t screenshot Since I don’t hve discord on the pc
Angius
Angius12mo ago
You can open it in the browser Regardless, take a good look at the path
shuffle
shuffleOP12mo ago
I’ve got double slashes But it was automatically added like that Apart from that I don’t see what else the issue could be
Angius
Angius12mo ago
Path in your code
No description
Angius
Angius12mo ago
Path on your disk
No description
shuffle
shuffleOP12mo ago
Ohhhh
Angius
Angius12mo ago
Do you see the difference?
shuffle
shuffleOP12mo ago
Yes Double text based Thank you haha Sometimes a second pair of eyes if very nice
Want results from more Discord servers?
Add your server