csharp for statement
Code Example - csharp for statement
for (int i = 0; i < 5; i++)
{
Loop
}
csharp for
for (int i = 0; i < 5; i++)
{
Console.WriteLine(i);
}
csharp for loop
for (int i = 0; i < 5; i++)
{
Console.WriteLine(i);
}
______________OUTPUT____________
0
1
2
3
4
csharp loop
for (int i = 0; i < 5; i++) {
// code goes here
}
// this loop repeats 5 times
loop in csharp
public class MyClass
{
void Start()
{
//Called when script inithilizes
}
void Update()
{
//called each fram
}
}
//note this is in C#