filmov
tv
.NET/C# - Foreach Looping Construct

Показать описание
Conditional looping is a fundamental concept in all language, whether they be 'classic' programming languages or scripting languages.
If you come from a C++ background, you're probably intimately familiar with the traditional "for" construct. It works well, but it can seem somewhat unintuitive for someone unfamiliar with the language, or new to conditional constructs in general. Compared with the "foreach" construct. This looping mechanism brings conditional statements, with a little bit of work under the hood, into the OOP world. In this video, I will show you the concept behind foreach, and how to bring that functionality to your custom collections classes.