Try:
myLabel.Text = myTextBox.Text + ".00";
But i wanted to do that with .ToDecimal() method... can you help me??
That sound like homework! :laugh:
So, no code...but it isn't difficult at all.
The first thing you need to do is convert the string value in your text box to a decimal value. Tht's easy: Use the
decimal.Parse[
^] or
decimal.TryParse[
^] methods.
Then, you need to convert the decimal value back to a string. Again, easy - just use the
decimal.ToString[
^] method with an appropriate format string:
"0,0.00"
will do it - it specified that thousands should be separated by commas, and there should always be two decimal places.
This shouldn't take you more than five minutes! :laugh: