xxxxxxxxxx
string[] test = new string[2];
test[0] = "Hello ";
test[1] = "World!";
string.Join("", test);
xxxxxxxxxx
using System;
class Program
{
static void Main()
{
// Sample array
int[] numbers = { 1, 2, 3, 4, 5 };
// Convert array to string using Join method
string result = string.Join(",", numbers);
// Display the converted string
Console.WriteLine(result);
}
}
xxxxxxxxxx
int[] numbers = { 1, 2, 3, 4, 5 };
string result = string.Join(", ", numbers);
Console.WriteLine(result); // Output: 1, 2, 3, 4, 5
xxxxxxxxxx
// Sample array
string[] array = { "Hello", "World", "!" };
// Convert array to a string with a space delimiter
string result = string.Join(" ", array);
// Output the result
Console.WriteLine(result);