I do not know if I explained correctly in the title and I ask that you correct me.
I am doing a simple system of a bank in C # by object orientation following the apostille of caelum (Link of the handout) and also making some changes based on my knowledge. I would like to make a reference system, below the example of creating an account in the bank:
private void buttonCadatro_Click(object sender, EventArgs e)
{
Conta c1 = new Conta();
c1.numero = 1;
c1.Saldo = 100;
}
And below the variable declarations of class conta.cs
public int numero;
public Double Saldo;
And question is this, I would like to do that every time it in the button register a new account is created, for example: c2 with number = 2, c3 with number = 3
I'd also like to make account 1 transfer $ 10 to account 2 without using both the c1 and c2 , only the use of . number
I hope you have understood, and as I said before, correct my mistakes.