Hey, So I'm working on a pretty basic program to help me get accustomed to classes, private variables and arrays.
I need to hold the data for 5 individuals such as name address email etc. These are held in my PersonClass and are private strings.
I access these strings using
public void setName(string Name)
{
this.name = Name;
}
I now need to store these private strings in an array. I'm thinking it has to be a 2d array (Fields then each persons data) and I'm wondering how to enter the data into the arrays.
I'm using this code to read the input and place into the string
Console.WriteLine("Please Enter First Name.");
string input = Console.ReadLine();
Person.setFName(input);