
Iteration statements -for, foreach, do, and while - C# reference
Jan 20, 2026 · C# iteration statements (for, foreach, do, and while) repeatedly execute a block of code. You use those statements to …
about_Foreach - PowerShell | Microsoft Learn
Jan 19, 2026 · The foreach statement is a language construct for iterating over a set of values in a collection. The simplest and most …
Iterate through collections - C# | Microsoft Learn
Apr 11, 2023 · Learn how to use an iterator to step through collections like lists and arrays. Iterators are consumed from client code …
about_Foreach-Parallel - PowerShell | Microsoft Learn
Mar 24, 2025 · The Parallel parameter of the foreach keyword runs the commands in a foreach script block once for each item in a …
Store and Iterate Through Sequences of Data using Arrays and the ...
In this module, you will: Create and initialize a new array. Set and get values in arrays. Iterate through each element of an array …
Iterators - C# | Microsoft Learn
Nov 10, 2021 · The foreach statement isn't magic, though. It relies on two generic interfaces defined in the .NET core library to …
Array.ForEach<T> (T [], Action<T>) Method (System) | Microsoft Learn
Performs the specified action on each element of the specified array.
ForEach-Object (Microsoft.PowerShell.Core) - PowerShell
The ForEach-Object cmdlet performs an operation on each item in a collection of input objects. The input objects can be piped to the …
Make a Visual C# class usable in a foreach statement
May 7, 2022 · Describes how to make a Visual C# class usable in a foreach statement. Also describes a code sample to explain the …
List<T>.ForEach(Action<T>) Method (System.Collections.Generic)
Performs the specified action on each element of the List<T>.
Parallel.ForEach Method (System.Threading.Tasks)
Executes a foreach (For Each in Visual Basic) operation in which iterations may run in parallel.