Home > Code > String Operations > String.Split using C#

String.Split using C#

by Thamil   on Nov 14, 2010   Category: String Operations   |  Views: 4445    |  Points: 25   |  Gold 


class Program
{
static void Main(string[] args)
{
string strTestString = "Sample-C#.Net-string-handling-code";
char[] chrSep = new char[] { '-' };
foreach (string strRes in strTestString.Split(chrSep))
Console.WriteLine(strRes);
Console.ReadKey();

}
}





Post Code  |  Code Snippet Home

Recent Posts

User Responses


No response found, be the first to review this code snippet.

Submit feedback about this code snippet

Please sign in to post feedback

Latest Posts