'Non-UI application (console / server application)
#Region Project Attributes
#CommandLineArgs:
#MergeLibraries: True
#End Region
Sub Process_Globals
Private reader As TextReader
End Sub
Sub AppStart (Args() As String)
InitReader
Dim MyList As List = Array(24, 53, 76)
Log("Enter a number to check if it is a lucky number")
Dim Num As Int = ReadLine
If MyList.IndexOf(Num) > -1 Then
Log("You entered a lucky number")
Else
Log("Sorry, try again later")
End If
End Sub
Sub InitReader
Dim sys As JavaObject
sys.InitializeStatic("java.lang.System")
reader.Initialize(sys.GetField("in"))
End Sub
Sub ReadLine As String
Return reader.ReadLine
End Sub