1
I have a User class with private attributes like Nome
, Endereco
and Telefone
. This class has a constructor method that takes parameters such as nome
, endereco
and telefone
.
I would like to use a constructor method to change the phone parameter. That is, to change the data (phone number) that the person entered in the textbox.
All this is in a Windows Forms Application in C#.
I would like to know how to change this data and taking into account that the proposed exercise that I received only accepts the use of object-oriented C# language (I’m starting to learn about and it’s to then learn about the whole SQL part and everything, now it’s just the basics without getting into ADO.NET or ASP.NET).
And if I want to put a Button to change all Textbox information at the same time (in this case, it will only change what the user selects with the cursor in the textbox to change what is written), how do I do? I have to call, for example, Alterarnome() and Alterarendereco() there on Form1.Cs? I don’t know if I understand what I’m asking for,
– user67662
@Beginner That’s another golden subject question, if this has already been answered you can accept what was most useful to you. Later you can vote on everything you find useful on the site. If you do not know how to accept see the [tour].
– Maniero