Why does the loop not work in C#

 

v20240901