FusedQyou
FusedQyou
CC#
Created by ElectricTortoise on 3/25/2025 in #help
scope of a for loop
If you want you can change it to instead be errors if you want.
171 replies
CC#
Created by ElectricTortoise on 3/25/2025 in #help
scope of a for loop
My project explicitly marks warnings and/or suggestions as errors to improve the code written
171 replies
CC#
Created by ElectricTortoise on 3/25/2025 in #help
scope of a for loop
Again ignore the errors, this is just the analyzer complaining the method and variable are not actually used
171 replies
CC#
Created by ElectricTortoise on 3/25/2025 in #help
scope of a for loop
No description
171 replies
CC#
Created by ElectricTortoise on 3/25/2025 in #help
scope of a for loop
No description
171 replies
CC#
Created by ElectricTortoise on 3/25/2025 in #help
scope of a for loop
I guess "disposed" is not the right word here but you get what I mean
171 replies
CC#
Created by ElectricTortoise on 3/25/2025 in #help
scope of a for loop
void Main()
{
int foo = 0;

{
int bar = 0;

// Legal, defined in parent scope
foo = 5;
}

// Not legal, defined in disposed scope
bar = 5;
}
void Main()
{
int foo = 0;

{
int bar = 0;

// Legal, defined in parent scope
foo = 5;
}

// Not legal, defined in disposed scope
bar = 5;
}
171 replies
CC#
Created by ElectricTortoise on 3/25/2025 in #help
scope of a for loop
Yes
171 replies
CC#
Created by ElectricTortoise on 3/25/2025 in #help
scope of a for loop
Finally, scope is anything in {} brackets. You should understand that scope is not a strict thing and {} is valid anywhere in the code, not just if-statements or things like that. You can nest {} infinitely and it would technically make a new scope each time. It's just most commonly used in for-loops/if-statements/while-statements because they are tied to execute a single line otherwise and this way you execute a whole scope. I personally use scopes if I have common names for variables and I define them multiple times, but they vary per context. It's nice being able to wrap them in {} so the scope gets rid of the name so I can just redefine them later.
171 replies
CC#
Created by ElectricTortoise on 3/25/2025 in #help
scope of a for loop
This is wrong, no such thing as a "normal" loop and what they wrote is very valid
171 replies
CC#
Created by ElectricTortoise on 3/25/2025 in #help
scope of a for loop
This is fine, a for loop is not required to define a variable to loop, but it does require the semicolons to be defined. As jimmacle mentioned this makes for(;;) valid but it would be the same as an infinite while loop. Depends on use case
171 replies
CC#
Created by ElectricTortoise on 3/25/2025 in #help
scope of a for loop
tl;dr
171 replies
CC#
Created by Faker on 3/24/2025 in #help
✅ Problem updating rider
Otherwise, unless you have data you need, I'd say just trash the whole Rider folder
36 replies
CC#
Created by Faker on 3/24/2025 in #help
✅ Problem updating rider
It expects files but finds something else because the update ended halfway
36 replies
CC#
Created by Faker on 3/24/2025 in #help
✅ Problem updating rider
I'd say proceed
36 replies
CC#
Created by SidoBytes on 3/23/2025 in #help
c# wpf style
You don't seem to have HorizontalAlignment="Stretch" on the second button?
9 replies
CC#
Created by VoidPointer on 3/21/2025 in #help
Project Subfolder Remains Hidden in Rider
No description
5 replies
CC#
Created by VoidPointer on 3/21/2025 in #help
Project Subfolder Remains Hidden in Rider
Check your .csproj if you exclude the folder in there
5 replies
CC#
Created by Me on 3/19/2025 in #help
2D Movement
Well your editor is configured now so that will help you a ton here
44 replies
CC#
Created by Me on 3/19/2025 in #help
2D Movement
Nice
44 replies