fork download
  1. Imports System
  2.  
  3. Public Class Test
  4. Public Shared Sub Main()
  5. Dim theNumber As Integer
  6. Dim theWord As String
  7. theWord = "Bird"
  8. theNumber = 9
  9. Console.WriteLine(theWord & " is the word")
  10. Console.WriteLine("And the number is " & theNumber)
  11. Console.ReadKey()
  12. theWord = "Cat"
  13. Console.WriteLine("Enter a number>")
  14. theNumber = Int(Console.ReadLine())
  15. Console.WriteLine("Now " & theWord & " is the word and the number is " & theNumber)
  16. Console.ReadKey()
  17. End Sub
  18. End Class
Runtime error #stdin #stdout #stderr 0.04s 27568KB
stdin
Standard input is empty
stdout
Bird is the word
And the number is 9
Enter a number>
stderr
Unhandled Exception:
System.ArgumentNullException: Value can not be null.
Parameter name: Number
  at Microsoft.VisualBasic.Conversion.Int (System.Object Number) [0x00000] in <filename unknown>:0 
  at Test.Main () [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: System.ArgumentNullException: Value can not be null.
Parameter name: Number
  at Microsoft.VisualBasic.Conversion.Int (System.Object Number) [0x00000] in <filename unknown>:0 
  at Test.Main () [0x00000] in <filename unknown>:0