0
What is wrong with this code ?
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SoloLearn { class Program { static void Main(string[] args) { string spaced = "ab c d e fgh i j kl mn opqr stuvwxyz"; char[] unspaced = spaced.ToCharArray(); string empty = null; foreach (char s in unspaced) if (char.IsLetter(s)) { empty += s; } } Console.Write(empty); } }
1 Odpowiedź
+ 1
Console.Write(empty) ; is out of main method.
Write inside main, put before brace, after write.