Live Chat Icon For mobile
Live Chat Icon

How to read the comma separated values from a string

Platform: ASP.NET| Category: Miscellaneous


Dim myString As String = 'A, B, C, D'
Dim delimStr As String = ' ,'
Dim delimiter As Char() = delimStr.ToCharArray()
Dim s As String
For Each s In myString.Split(delimiter)
	Response.Write((s.ToString() + '<br>'))


string myString = 'A, B, C, D';
string delimStr = ' ,';
char[] delimiter = delimStr.ToCharArray();
foreach (string s in myString.Split(delimiter))
	Response.Write (s.ToString ()+ '<br>');    

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.