Convert array to string in C#
To convert array to string in C# you can use theArray.ConvertAll
method which takes array as first parameter. Example
using System;
public class Example
{
public static void Main()
{
string[] strings = new string[] {"1", "2", "3"};
int[] ints = Array.ConvertAll(strings, s => int.Parse(s));
Console.WriteLine(String.Join(",", ints));
}
}
Output
1,2,3