**** Merged from MCS ****
[mono-project.git] / mcs / btests / ConditionalConstants.vb
blobf5107c214712b240f5e5dbc6786a4a8918082830
1 REM LineNo: 23
2 REM ExpectedError: BC30249
3 REM ErrorMessage: '=' expected.
5 Imports System
6 Module ConditionalConstants
7 Sub Main()
8 Dim value As Integer
9 #Const A=True
10 #If A
11 value=10
12 #End If
14 #Const B=False
15 #If B
16 value=20
17 #End If
18 If value<>10 Then
19 Throw New Exception("Conditional Constant: Failed")
20 End If
22 'Testing the default value assigned to a conditional constant
23 #Const C
24 #If C
25 Console.WriteLine("Default value is True")
26 #Else
27 Console.WriteLine("Default value is Nothing")
28 #End If
29 End Sub
30 End Module