This code is on a asp.net page using VB
I am trying to round of a fraction to the next highest whole number or integer. I found the following code on Experts, but I keep getting an error:
BC30519: Overload resolution failed because no accessible 'InStr' can be called without a narrowing conversion
the doucumentation says:To correct this error Specify Option Strict Off. how do I do this?
Is there better code?
example: intshipunit will equal 1.15 in this test, I need it to change to 2
dim intshipunit as decimal = strtotalweight / 20
Dim x As single
Dim y() As String
Dim z As single
x = intshipunit
If InStr(1, x, ".") Then
y() = Split(x, ".")
z = x - y(0)
x = x + (1 - z)