string[] names = new string[] { "TI Harris", "Ludacris", "Trina", "Gucci Mane", 
"Trinidad James", "Young Jeezy" };

...what you just read was single dimensional array initialization for string rather than int

Example demonstration below:

using System
namespace vals_life
{
class Weekend
{
static void Main (string[]args)
{
int[]arr = new int [];
for (int x = 0; x < 10; x++)
{
Console.WriteLine ("Enter array element: {0} ", x + 1;
arr [x] = Int32Parse(Console.Readline());

}

foreach (int i in arr)
{

Console.WriteLine(i);
}
Console.Readline();
}
}
}

 


Advertisements