// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; namespace E { class MainClass { public static void Main(string[] args) { string s1 = "aaa bbb ccc"; string[] parts = s1.Split(" ".ToCharArray()); string s2 = ""; for(int i = 0; i < parts.Length; i++) { if(i > 0) { s2 += " "; } s2 += parts[i].Substring(0, 1).ToUpper(); s2 += parts[i].Substring(1).ToLower(); } Console.WriteLine(s2); } } }