Hello all I am working on a project for my C# class and am a bit confused I am trying to add objects to an array and then print them to the console to see if they are there but this is not working for me I am completely lost can someone perhaps show me how to go about this code below.
using System;
class CreateTaxPayer
{
static void Main()
{
Taxpayer[] testArray = new Taxpayer[1];
for (int i = 0; i < testArray.Length; i++)
{
Console.Write("Enter the social security number for taxpayer" + (i + 1) + " ");
testArray[i].SSN = Convert.ToInt32(Console.ReadLine());
Console.WriteLine(testArray[i].SSN);
}
}
}
class Taxpayer
{
public int SSN { get; set; }
}