C
C#6mo 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
Angius6mo 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
shuffle6mo ago
Why does nothing happen then
shuffle
shuffle6mo ago
No description
Angius
Angius6mo ago
It seems you're in the debugger
dhoni7
dhoni76mo ago
you should step over using the debugger
Angius
Angius6mo ago
Did you intend to run the debugger?
shuffle
shuffle6mo ago
I wanted to run the program
Angius
Angius6mo ago
Well, you ran the debugger
shuffle
shuffle6mo ago
Can I run the program without compiling?
Angius
Angius6mo 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
shuffle6mo ago
The thing is it would always work int he compiler Till today
Angius
Angius6mo ago
What compiler?
shuffle
shuffle6mo ago
Debugger* Is it because I’m trying to perform file handling?
Angius
Angius6mo ago
Unlikely
shuffle
shuffle6mo ago
Oh my I found the breakpoint I see thank you Didn’t know that was a thing
Angius
Angius6mo ago
$debug
MODiX
MODiX6mo 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
Angius6mo 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
shuffle6mo ago
What’s the better way to donut Do it Compile it into an end?
Angius
Angius6mo ago
Just... run it
shuffle
shuffle6mo ago
Exe
Angius
Angius6mo ago
No, run the code Green arrow in the top toolbar
shuffle
shuffle6mo ago
Ohhhh Thank you
Angius
Angius6mo ago
Or F5 shortcut Assuming you're using VS 2022
shuffle
shuffle6mo ago
F5 opens debugger for me
Angius
Angius6mo ago
Ah, Ctrl+F5 then
shuffle
shuffle6mo ago
Alright Also I just learnt about file handling This is my code
shuffle
shuffle6mo ago
No description
shuffle
shuffle6mo ago
No description
shuffle
shuffle6mo ago
But I get the error could not find part of the path
Angius
Angius6mo ago
Protip: you can screenshot your screen
shuffle
shuffle6mo ago
Im at college I can’t screenshot Since I don’t hve discord on the pc
Angius
Angius6mo ago
You can open it in the browser Regardless, take a good look at the path
shuffle
shuffle6mo 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
Angius6mo ago
Path in your code
No description
Angius
Angius6mo ago
Path on your disk
No description
shuffle
shuffle6mo ago
Ohhhh
Angius
Angius6mo ago
Do you see the difference?
shuffle
shuffle6mo 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
More Posts
network upload and download speed using System.Net.NetworkInformation package in .net corethe below is my code i've tried using System.Net.NetworkInformation libraray. ` using System.Net.Ne✅ Cancel stream readI'm running a Task that constantly reads some data off a (named pipe) stream when it's present. ```j✅ Azure Webjobs CSV files do not get updated and reset to original stateHello, I created a Telegram bot that is also reading and writing some CSV files in folders inside thWhen debugging the data is not updated after running the script.When I run a task, I get a debug on code value of "1". When I run the script update database value =Multi-Project templates without a root folderI have a multi-project template and I want those multiple projects to not be created in a root folde✅ Graphics.h library in Visual Studio for C++Hey there 👋 I was trying to link graphics.h library and SFML in visual studio but after following aMediatR IPipelineBehavior for reacting to large set of requests (+ Result return type)I have a system where I'm trying to migrate our existing closed IPipelineBehaviors to an open generiheart beat in console programI have a code that implements multi-threaded socket communication with c++, and I want to add an addSend message from one app to anotherWhat's the easiest method for sharing data between applications? MessageQueue looked promising, but ✅ Im kinda new to c# and I don't know how to use the new function...I'm trying to make an object with a new() function but I keep getting "Member modifier 'new' must pr