As recommended in my earlier question, the best way to store customer data would be in a list of class instances (I think thats what it's called :p). I've created the list var customers = new List<Customer>();
in a startup method, and right after, when I load any values from a text file into the program, I'm doing this:
static void loadData() //Load data from Database
{
customers.Add(new Customer
{
ID = "001",
Name = "Nathan",
}
}
I know I'm not doing it correctly though, and I can't quite figure out the correct way. Right now I'm not extracting from the file, I'm just trying to add something to the list. Obviously I'm missing a closing parenthesis, but I'm not quite sure where it would go.
If someone could help me add one thing to this list, I should be able to figure out the rest on my own.
Thanks! :)