0
I don’t know if I explained it correctly in the title and I ask you to correct me.
I am making a simple system of a C# bank by object orientation following the booklet of kaolin (Link to the booklet) and also making some changes based on my knowledge. I would like to make a reference registration system, below the example of creating a bank account:
private void buttonCadatro_Click(object sender, EventArgs e)
{
Conta c1 = new Conta();
c1.numero = 1;
c1.Saldo = 100;
}
And below the class variable statements Cs account.
public int numero;
public Double Saldo;
And the thing is, I’d like to do that every time he register button a new account is created, for example: C2 with number = 2, C3 with number = 3. That is if I speak of the account with the . number = 3, he already understands that is the reference C3;
I would also like to have account 1 transfer $ 10 to account 2 without using the C1 and C2, only of the use of .number
I hope you understand, and as I said before, correct my mistakes.
which database was used?
– Brewerton Santos
For now I am not using database, just I am training even. When close the program will be erased memory.
– Luiz Nascimento
Suggested property name Balance for _balance when private and Balance when access modifier, example: public double Balance{ get; set}
– Samuel Renan Gonçalves Vaz
in case of the name, you need to create a way to view the data and then a read, then add a function in creating the name that would be C + Count(+1)
– Brewerton Santos