-Imports System\r
-Imports System.Console\r
-Module AssignmentStatements1\r
- Sub main()\r
-\r
- Dim o As Boolean= True \r
- Try\r
- Dim a As Double = o\r
- Console.WriteLine(a.GetType().ToString() & " = " & a)\r
- Catch e As System.Exception\r
-\r
-WriteLine("Runtime Exception occured-->See Stack traces below.....")\r
-WriteLine ("Runtime exception-->" &e.GetType.Name)\r
-WriteLine(e)\r
-End Try\r
- End Sub\r
-End Module
\ No newline at end of file
+Module ImpConversionofBooltoDoubleB
+ Sub Main()
+ Dim b as Boolean = False
+ Dim a as Double = b
+ if a <> 0 then
+ Throw New System.Exception("Implicit Conversion of Bool(False) to Double has Failed. Expected 0, but got " & a)
+ End if
+ End Sub
+End Module