Visual Basic Whats wrong with this code Find the errors in
Visual Basic \\\\\\ (What\'s wrong with this code?)
Find the error(s) in the following code ( the method should assign the value of 14 to the variable result). Assume that Option Strict is set to On.
\"
Sub Sum()
Dim numberWords As String = \"4\"
Dim number As Integer = 10
Dim result As Integer
result = numberWords + number
End Sub
\"
Solution
private sub Sum()
{
Dim numberWords As Integer=4;
Dim number As Integer=10;
Dim result As Integer;
result=numberWords+Integer;
end Sub;
}
