Tutorial by Examples

Dim input as String = Console.ReadLine() Console.ReadLine() will read the console input from the user, up until the next newline is detected (usually upon pressing the Enter or Return key). Code execution is paused in the current thread until a newline is provided. Afterwards, the next line of co...
Dim x As Int32 = 128 Console.WriteLine(x) ' Variable ' Console.WriteLine(3) ' Integer ' Console.WriteLine(3.14159) ' Floating-point number ' Console.WriteLine("Hello, world") ' String ' Console.WriteLine(myObject) ' Outputs the value from calling myObject.ToString() The Console.Wri...
Dim x As Int32 = 128 Console.Write(x) ' Variable ' Console.Write(3) ' Integer ' Console.Write(3.14159) ' Floating-point number ' Console.Write("Hello, world") ' String ' The Console.Write() method is identical to the Console.WriteLine() method except that it prints the given argumen...
Dim inputCode As Integer = Console.Read() Console.Read() awaits input from the user and, upon receipt, returns an integer value corresponding with the character code of the entered character. If the input stream is ended in some way before input can be obtained, -1 is returned instead.
Dim inputChar As ConsoleKeyInfo = Console.ReadKey() Console.ReadKey() awaits input from the user and, upon receipt, returns an object of class ConsoleKeyInfo, which holds information relevant to the character which the user provided as input. For detail regarding the information provided, visit t...
Module MainPrompt Public Const PromptSymbol As String = "TLA > " Public Const ApplicationTitle As String = GetType(Project.BaseClass).Assembly.FullName REM Or you can use a custom string REM Public Const ApplicationTitle As String = "Short name of the application" Sub M...

Page 1 of 1