using System; public class Test { public static void Main() { string City = "NEW YORK CITY"; string[] lstWord = City.ToLower().Split(' ');; string Capatilize_City = ""; foreach (string s in lstWord) { string z = s.Substring(0, 1).ToUpper() + s.Substring(1, s.Length - 1); Capatilize_City += " " + z; } Capatilize_City = Capatilize_City.Trim(); Console.WriteLine(Capatilize_City); } }