vault backup: 2023-10-05 09:39:49
This commit is contained in:
parent
9c5c141231
commit
2a55e44449
@ -78,4 +78,29 @@ while ([condition])
|
||||
// Repeat stuff
|
||||
[iterator]
|
||||
}
|
||||
```
|
||||
```
|
||||
|
||||
**We can also doo like the while loop**
|
||||
```cs
|
||||
for ( ; [condition] ; )
|
||||
{
|
||||
// repeat stuff
|
||||
}
|
||||
```
|
||||
|
||||
## Foreach loop
|
||||
```cs
|
||||
string test = "ABCD";
|
||||
foreach (char c in test)
|
||||
{
|
||||
Console.WriteLine(c);
|
||||
}
|
||||
```
|
||||
|
||||
## Jump statements
|
||||
Jump statements is something that can change the behaviour of a loop inside itself.
|
||||
It's possible to change the behaviour of the loops using the following keyworkds:
|
||||
- ``break``
|
||||
- ``continue``
|
||||
- ``return``
|
||||
-
|
Loading…
x
Reference in New Issue
Block a user