Question

If my string is like

String result="netbeans,eclipse,maven";

I need an output as r1=netbeans r2=eclipse r3=maven like that how can I print this?

Was it helpful?

Solution

Did you try

    List<string>values = result.Split(",".ToCharArray(),StringSplitOptions.None).ToList();
    foreach(string str in values){
      Console.WriteLine(str);
}

More Info: http://msdn.microsoft.com/de-de/library/tabh47cf(v=vs.110).aspx

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top