.NET Rocks! cover image

Functional C# with Simon Painter

.NET Rocks!

00:00

Is It a While Loop or a Go-to Approach?

A while loop says, this is when you should stop. What I tend to do is write an extension method. All of these things we've just gone through with sort of wild constructs and recursive constructs are all speaking to the same issue. You need to know how many times to do something and what the cost of continuing to iterate is. And then inside the extension method, yeah, it's totally a hidden while loop. But at least there's only one. Who knows? Maybe I'll replace it one day.

Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app