c sharp while statement

Code Example - c sharp while statement

                
                        public bool cando = true;

while (cando) // will run if cando stays true
{
    //code
    break; //here we break the while loop. it will not run anymore(we do this bc there is no really different option to break the cando bool)
}