2005-01-31 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mcs / mbas / Test / tests / ExpConversionStringtoSingleB.vb
1 'Author:
2 '   V. Sudharsan (vsudharsan@novell.com)
3 '
4 ' (C) 2003 Ximian, Inc.
5
6 Module ExpConversionStringtoSingleA
7         Sub Main()
8                         Dim b1 as Boolean=False
9                         try
10                                 Dim a as Single
11                                 Dim b as String= "Program"
12                                 a = CSng(b)
13                                 Catch e as System.Exception
14                                         b1 = True                                       
15                         End Try
16                         if b1 = False then
17                                 Throw new System.Exception("Conversion of String to Single not working. Expected Error: System.FormatException: Input string was not in a correct format... but didnt get it") 
18                         End if
19         End Sub
20 End Module