indentation
whats the difference between these 2 lines of code? and why is both okay?
19 Replies
Why wouldn't they be and what does it have to do with indentation?
oh wait
bc in the course im following they use indentations
in while and if statements
So do you in your snippet above. The difference seems to be the "base" level of indendation
Yeah, and so do you
which is probably related to top level statements
Yeah
yea but i tried doing one without indentations and they work
C# isnt python
Whitespace in C# mostly doesn't matter
indentations dont "matter" for the compiler, but it matters a lot for reading
We have braces for that
And semicolons
oh
i think i see it now
Angius
REPL Result: Success
Console Output
Compile: 446.697ms | Execution: 45.851ms | React with ❌ to remove this embed.
ffs
but yea i understand now
thanks for the clarification
You can squeeze your entire source code into 1 long line and C# won't care
Its not an indent based language, and personally i like that a lot more cause python is horrible to read
:SCcheese: