Lee OH
Lee OH
CC#
Created by Lee OH on 12/13/2023 in #help
Is there a way for a while loop to consistently check if the condition is met?
Example: int x = 2; bool condition = true; while(condition){ //code if (x == 2){ condition = false; } // other code } //outside of while loop My question is: is there a way to make the while loop consistently check if the condition is being met? I'm new to C# and struggling on this.
7 replies