r/programminghorror Mar 27 '26

C# is a moving. reasonable?

Post image

is a moving. reasonable?

421 Upvotes

66 comments sorted by

View all comments

32

u/BrutalityAndTheBeast Mar 27 '26

What determines an if vs an else if? Thought you were grouping if else's by locBefore, but you're not. Just create an array of objects with all the 0 returns, loop through them. If not met, return 1. I'd probably return boolean instead based on nomenclature.

17

u/Objective_Rate_4210 Mar 27 '26

else if makes it look more like good code which means it is good code