As said, use Math.Round method. 1st parameter in this method in the actual value you want to round, while 2nd parameter is the number of decimals.
If you will do as Luc001 showed, will do just fine or:
Dim dValue As Decimal = 0D
If Decimal.TryParse(textBox1.Text.Trim(), dValue) Then
textBox2.Text = Math.Round((dValue * _Units / _priceincur), 4)
MessageBox.Show("Value is not decimal, please repair it.")
Help! I want to create a java program that finds the highest even integer among the values entered by the user. Stop asking values when a value less than 1 have been entered. If no even integer is entered, display "No Even Integer"
Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them.
I don’t want at this stage work on a big separate project as I've already got plenty ...