Take a look at the documentation - https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/statements/iteration-statements
What cause the error?

Dear All,
I get an error "CS0029 Cannot implicitly convert type 'int' to 'bool'". What causes the error? How to fix it?
Error
Definitions of Functions
Developer technologies C#
1 additional answer
Sort by: Most helpful
-
AgaveJoe 30,126 Reputation points
2022-03-23T13:36:19.797+00:00 The "condition" variable in your code is an int not a condition. A condition pattern looks like the following; i < condition;.
for(int i=0; i < condition; i++)
This information is openly published in the reference documentation provided by RLWA32-6355. It's a bit of a mystery why you are unable to understand the examples in the reference documentation as the docs clearly illustrates each section of the for...loop. The impression is you did not read entire document. Can you explain what you do not understand?