In .:
[mono.git] / mcs / mbas / Test / tests / conversions / ExpConversionStringtoSingleA.vb
1 'Author:
2 '   V. Sudharsan (vsudharsan@novell.com)
3 '
4 ' (C) 2005 Novell, Inc.
5
6 Imports System.Threading
7 Imports System.Globalization
8
9 Module ExpConversionStringtoSingleA
10         Sub Main()
11                         Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US")
12
13                         Dim a as Single
14                         Dim b as String= "123.5"
15                         a = CSng(b)
16                         if a <> 123.5
17                                 Throw new System.Exception("Conversion of String to Single not working. Expected 123.5 but got " &a) 
18                         End if          
19         End Sub
20 End Module