Code
The following code snippet is print contents of array horizontally using C#
using System;
public class Program
{
public static void Main()
{
string[] array = new string[4];
array[0] = "Welcome";
array[1] = "to";
array[2] = "C#";
array[3] = "Corner";
foreach (var data in array)
{
Console.Write(data + " ");
}
}
}OutputWelcome to C# Corner
Demo : https://dotnetfiddle.net/nieFq9#
