|
-
June 8th, 2002, 08:51 AM
#1
VB6 code to vb .net ....
hi,
this is a code in vb6 to round off a number...
can someone give a code to round of the decimals in vb.net???
Pl. help.
Public Sub roundnumber(ByRef roundn, ByVal Decimals As Integer)
On Error Resume Next
Dim roundamount As Single, result
roundamount = 10 ^ Decimals
result = (CLng((roundn) * roundamount) / roundamount)
roundn = result
End Sub
Thanks in advance.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|