ROUND Fundtion in VB .Net???

It appears that the familiar and useful ROUND function that existed in VB 6.0 does not exist in VB .Net. I want to round the result of an arithmetic expression to pne place after the decimal. Does someone know of a convenient way to do this sort of thing in VB .Net?

Thanks.

Comments

  • : It appears that the familiar and useful ROUND function that existed in VB 6.0 does not exist in VB .Net. I want to round the result of an arithmetic expression to pne place after the decimal. Does someone know of a convenient way to do this sort of thing in VB .Net?
    :
    : Thanks.
    :

    [code]
    Dim d As Double = 5.6
    d = Math.Round(d)
    [/code]

    Hope that helps. The Shared Math object has alot of useful math functions.
  • : : It appears that the familiar and useful ROUND function that existed in VB 6.0 does not exist in VB .Net. I want to round the result of an arithmetic expression to pne place after the decimal. Does someone know of a convenient way to do this sort of thing in VB .Net?
    : :
    : : Thanks.
    : :
    :
    : [code]
    : Dim d As Double = 5.6
    : d = Math.Round(d)
    : [/code]
    :
    : Hope that helps. The Shared Math object has alot of useful math functions.


    Thanks very much for your help. There is so much functionality in VB .Net ... I am having trouble getting my arms around it all. I don't understand why a search on "Round", "Rounding", etc. in the .Net help system did not turn up with the MATH object.

    Oh well, onward and upward ... thanks to your post.


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories