console writeline c# to arrays code example
Example 1: C# print array
string[] myArray = {"Dogs", "Cats", "Birds"};
foreach (string item in myArray)
{
Console.WriteLine(item);
}
Example 2: print array in c#
Console.WriteLine(string.Join("\n", myArrayOfObjects));