Eric Sjöström Jennerstrand

Litium E-commerce, C#, .NET MAUI, Javascript, React, Azure, Git. .NET, Node and more!
C Sharp

Foreach loop in C# – Simple use

Foreach loop in C# – SimpleForeach is in my opinion the best way to iterate a List of objects in C# and it’s super logical. On the left side of the declaration you have what is inside the List. And on the right side you have the List. Like this: As you see above, we
C Sharp

For loop in C# – Simple how to use

For loop in C# – Simple how to useFor is in my opinion one of best way to iterate a List/Array of objects in C#. When you need to keep track on what row in the iteration you are on. There are 3 parts of the For loop declaration, the “counter”, the break expression, and
C Sharp

Reverse FOR loop in C# – A quick look

The reverse FOR loop in C# are useful if you need to iterate a List or array backwards. Without first having to reversing it, which can be time and memory consuming. Therefore, by using a reversed FOR loop you can traverse a list, array or string backwards in a simple way. So if you take