Forums - C# Corner

Forum guidelines
Maha

Maha

  • 0
  • 0
  • 199.7k

System.String[]

Feb 22 2012 11:17 PM
Console.WriteLine(names) without "[x]" next giving following result. Anybody knows explain please.

System.String[]

using System;
public class ReverseArray
{
public static void Main()
{
string[] names = { "Zach", "Wendy", "Rose", "Marcia" };
int x;

Array.Reverse(names);

for (x = 0; x < names.Length; ++x)
Console.WriteLine(names);

Console.WriteLine();

for (x = 0; x < names.Length; ++x)
Console.WriteLine(names[x]);

Console.ReadKey();
}
}
/*
System.String[]
System.String[]
System.String[]
System.String[]

Marcia
Rose
Wendy
Zach
*/


Answers (2)