|
-
Aug 29th, 2005, 11:51 PM
#1
Thread Starter
Hyperactive Member
decimal problems
when i do a math formula in my code such as i*1 it works but when i use a decimal such as i*.1 the answer is wrong, any suggestions? here's my code:
Function result(ByVal i As Integer) As Integer
Dim x As Integer
x = i * 914.4
Return x
End Function
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
MessageBox.Show(result(Integer.Parse(TextBox1.Text)).ToString())
End Sub
End Class
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
|