Ok so i DID NOT add hello world to my code but it still appears
my code for some ungodly reason has decided to not use my code and use a previous code when i run and i dontt tknow why pls help me
35 Replies
probably keep all your issues to 1 thread
it doesnt look like ur debugging so are you manually running the file?
ok like just edit the hread
if so you need to recompile
F5, IIRC
Or click the green arrow
That's how you should run it in VS
i use ctrl + f5 to do it
That seems fine, then
but it still isnttt the code i have tthere
Yes, that part is not fine
I'm wondering about those errors:
Can you try restarting VS and see if those errors, and your issue, persist?
i restarted it a sec ago the errors went away the issue still there
Huh
Sometimes, when VS cannot compile the current version for some reason, it will run the last version that did compile
show your program.cs
But the code looks like it should compile just fine
in ur last screenshot in the last thread it looks like the code does exactly that
Second screenshot
o
So, what version of .NET is this project using?
int Number++;
does that even compile
Ah, it probably does not
idk ive tried withtout intt and it worked and now itt dontt anymore
Yeah, that's not valid code
so its uses last compile
int
It's a redeclaration of the variable
so i need to puttt itt somewhere else or just remove it
remove the type specifier
Keep just one declaration, as you have it
int Number = 0;
But when you use it, don't specify the typehold on
Just do
Number++
ok so
ok
but idk if it was when i reset it but the code wentt to what was running
so idk what happened
i forgot to check code agian after restarting visual sttudio
ok itts fixed
probably repair your IDE as it would have told you the issue if it wasnt broken
Good point, it should be lit up in red on a variable redeclaration
doesn't visual studio prompt you to run last successfully compiled code
Because you have error and you activated run last compiled code feature