Initializing an array!

I have never run into this problem before and I am frustrated. What am I missing? I am trying to initialize an array of five social security numbers. It does fine until the fifth one, then throws an error saying something about the indexer out of bounds.

SSN has to be a string, Also would like help in formatting it as xxx-xx-xxxx. The line I commented out gave me other errors. Thank you.

Thank you! I had tried that before, but something else must have not been right. Now it works for me. Now I need to get the data for each member of the array to display at the end. I have this wrong, it just displays the same data 5 times. How can I get the information for all five to store and print. Thank you.

// Implement a for-loop that will prompt the user to enter the Social Security Number and gross income.
for (x = 0; x < taxArray.Length; x++)
{
taxArray[x] = new Taxpayer();
Console.Write("Please enter the Social Security Number for taxpayer {0}: ", x);
SSN = Convert.ToString(Console.ReadLine());
//SSN = String.Format("{0:000-00-0000}");
Console.Write("Please enter the gross income for taxpayer {0}: ", x);
income = Convert.ToInt32(Console.ReadLine());
Taxpayer.GetRates();
}
// Implement a for-loop that will display each object as formatted taxpayer SSN, income and calculated tax.
for (int i = 0; i < 5; i++)
{
Console.WriteLine("Taxpayer # {0} SSN: {1}, Income is {2:c}, Tax is {3:c}", i, SSN, income, tax);
}

I have a 2d matrix with dimension (3, n) called A, I want to calculate the normalization and cross product of two arrays (b,z) (see the code please) for each column (for the first column, then the second one and so on).
the function that I created to find the ...

Write a C program that should create a 10 element array of random integers (0 to 9). The program should total all of the numbers in the odd positions of the array and compare them with the total of the numbers in the even positions of the array and indicate ...