Insert the value of an attribute into a textbox

Asked

Viewed 256 times

3

I need to enter the value of the attribute SALDO class Conta in a TextBox.

In java resgato via method get and convert with parse.float and Seto as string in the field.

In C# as executed?

  • 1

    I noticed that you are new to the site and decided to give you some tips. 1. You can always leave comments in your publications. 2. Any question you ask may have an answer marked as correct (you mark the answer using the below the arrows to vote, on the left side of the answer). 3. You can now vote positively on any site post you find useful (question or answer). 4. Your publications can be formatted using markdown, there is a help box for this on the screen where you write the post. 5. You can [Edit] your posts to improve them.

1 answer

3


It’s a little simpler and more intuitive in C#.

Instead of using methods get and set just assign and retrieve the values of these properties (attributes). Who cares about get's and set's is the compiler.

seuTextBox.Text = conta.Saldo.ToString();

Browser other questions tagged

You are not signed in. Login or sign up in order to post.