C
C#2mo ago
Shovel

whys the code undetected?

No description
12 Replies
Shovel
Shovel2mo ago
its greyed out too
Jimmacle
Jimmacle2mo ago
show the whole method
Shovel
Shovel2mo ago
full code:
No description
Jimmacle
Jimmacle2mo ago
i see half of an unconditional return yeah return leaves the method, nothing you write after it will ever run
Shovel
Shovel2mo ago
so i just delete it
Jimmacle
Jimmacle2mo ago
idk, do you want it to return there or not?
Shovel
Shovel2mo ago
idk either i just want the code to work
Jimmacle
Jimmacle2mo ago
you'll have to decide how you want your program to function either you want it to return there and you should delete the code below it, or you don't want it to return and you should delete the return
Shovel
Shovel2mo ago
worked
Shovel
Shovel2mo ago
No description
Jimmacle
Jimmacle2mo ago
i mean, it got rid of the warning you changed the structure of the code so as long as that's how you want it to work it's fine i would fix the indentation so it's less confusing to read
Somgör from Human Resources
return will end the function instantly from that line on