using System;var str = "level";foreach (char c in str) { Console.WriteLine(c);}//Iterating with indexfor (var i = 0; i < str.Length; i++) { Console.WriteLine($"str[{i}] = {str[i]}");}