csharp for

Code Example - csharp for

                
                        for (int i = 0; i < 5; i++) 
{
  Console.WriteLine(i);
}
                    
                
 

csharp for statement

                        
                                for (int i = 0; i < 5; i++) 
{
  Loop
}
                            
                        
 

for statement syntax C sharp

                        
                                //this loop will repeat 4 times
for(int i=0; i<4; i++)
{
 //do something 
}
                            
                        
 

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#