using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace StringBuilderTest { class Program { static void Main(string[] args) { string s1 = "one,two,three library,INC."; const char Space = ' '; const char Comma = ','; char[] delimiters = new char[] { Space, Comma }; StringBuilder output = new StringBuilder(); int ctr = 1; foreach (string subString in s1.Split(delimiters)) { output.AppendFormat("{0}: {1} ",ctr++,subString); } Console.WriteLine(output); Console.ReadLine(); } } }