string[] words = s.Split(','); foreach (string word in words) { listbox.Items.Add(word); }
List<String> items = new List<String>(); String name = "Mohan,kumar,raja"; String[] words = name.Split(','); foreach (String word in words) { items.Add(word); } listBox1.DataSource = items;
string sample= "Mohan,kumar,raja"; string[] splitted=sample.Split(','); string first=splitted[0];//this will be Mohan string second=splitted[1];//this will be kumar string third=splitted[2];//this will be raja
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)