Vb Net Lab Programs For Bca Students Fix Access
' Correct Way Dim result As Double = Val(TextBox1.Text) + Val(TextBox2.Text) Label1.Text = result.ToString() Use code with caution. Copied to clipboard 2. Login Form: Case Sensitivity
If rbAdd.Checked = True Then result = num1 + num2 ElseIf rbSub.Checked = True Then result = num1 - num2 ElseIf rbMul.Checked = True Then result = num1 * num2 ElseIf rbDiv.Checked = True Then If num2 = 0 Then MessageBox.Show("Cannot divide by zero") Exit Sub End If result = num1 / num2 Else MessageBox.Show("Please select an operation") Exit Sub End If vb net lab programs for bca students fix
End Module