You’re trying to declare one method inside another. That’s not valid in C#. You could use an anonymous function, but it would be relatively painful. Just move the Print100
method (and ideally rename it at the same time) outside Main
, and call it from Main
.
2
solved Recursion Code Error in c#? [closed]