Round Number
Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
5 posts
Page 1 of 1
Hello,
Does anyone know how to round a number Vb gave me to a whole? Example:
3.53566611111
to
3
I need help for my temperature converter BETA in the showroom section.
Please help me so I can rule the world :twisted: lol.
~GoodGuy17
Does anyone know how to round a number Vb gave me to a whole? Example:
3.53566611111
to
3
I need help for my temperature converter BETA in the showroom section.
Please help me so I can rule the world :twisted: lol.
~GoodGuy17

Hello,
You can use:
You can use:
Code: Select all
That should round it to the closest number cooll;Decimal.Round("3.53566611111")
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
Can I just put that code in a button after the part where it puts the number in the textbox?
Hello,
Not sure what you mean GoodGuy17, you just use it like:
Not sure what you mean GoodGuy17, you just use it like:
Code: Select all
Textbox1.Text = Decimal.Round("1.33")
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
Hmm you can't specify the number of characters you want to round?
Lets assume I want to round this number:
1,33333333...
but with 3 characters, it should round to this:
1,333
Lets assume I want to round this number:
1,33333333...
but with 3 characters, it should round to this:
1,333
5 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023