Comment on Real quick question about the "break"

<- View Parent
m_r_butts@kbin.social ⁨11⁩ ⁨months⁩ ago

I came up with a contrived example for the sake of illustration, and deliberately chose to use LINQ to build the enumerable because of how valuable it can be in filtering and ordering data. Where and TakeWhile alone can replace a whole lot of continues and breaks.

Your code does the same job as my first example, and it's simpler, and maybe that's more appropriate for the class.

source
Sort:hotnewtop