Merge pull request #1988 from poetienshul/patch-1

visualbasic Commenting spacing inconsistency
This commit is contained in:
Spurlow 2015-11-02 18:47:29 +08:00
commit e7a5688a30

View File

@ -9,13 +9,13 @@ filename: learnvisualbasic.vb
Module Module1 Module Module1
Sub Main() Sub Main()
' A Quick Overview of Visual Basic Console Applications before we dive 'A Quick Overview of Visual Basic Console Applications before we dive
' in to the deep end. 'in to the deep end.
' Apostrophe starts comments. 'Apostrophe starts comments.
' To Navigate this tutorial within the Visual Basic Complier, I've put 'To Navigate this tutorial within the Visual Basic Complier, I've put
' together a navigation system. 'together a navigation system.
' This navigation system is explained however as we go deeper into this 'This navigation system is explained however as we go deeper into this
' tutorial, you'll understand what it all means. 'tutorial, you'll understand what it all means.
Console.Title = ("Learn X in Y Minutes") Console.Title = ("Learn X in Y Minutes")
Console.WriteLine("NAVIGATION") 'Display Console.WriteLine("NAVIGATION") 'Display
Console.WriteLine("") Console.WriteLine("")
@ -32,9 +32,9 @@ Module Module1
Console.WriteLine("50. About") Console.WriteLine("50. About")
Console.WriteLine("Please Choose A Number From The Above List") Console.WriteLine("Please Choose A Number From The Above List")
Dim selection As String = Console.ReadLine Dim selection As String = Console.ReadLine
' The "Case" in the Select statement is optional. 'The "Case" in the Select statement is optional.
' For example, "Select selection" instead of "Select Case selection" 'For example, "Select selection" instead of "Select Case selection"
' will also work. 'will also work.
Select Case selection Select Case selection
Case "1" 'HelloWorld Output Case "1" 'HelloWorld Output
Console.Clear() 'Clears the application and opens the private sub Console.Clear() 'Clears the application and opens the private sub
@ -91,12 +91,12 @@ Module Module1
'Two 'Two
Private Sub HelloWorldInput() Private Sub HelloWorldInput()
Console.Title = "Hello World YourName | Learn X in Y Minutes" Console.Title = "Hello World YourName | Learn X in Y Minutes"
' Variables 'Variables
' Data entered by a user needs to be stored. 'Data entered by a user needs to be stored.
' Variables also start with a Dim and end with an As VariableType. 'Variables also start with a Dim and end with an As VariableType.
' In this tutorial, we want to know what your name, and make the program 'In this tutorial, we want to know what your name, and make the program
' respond to what is said. 'respond to what is said.
Dim username As String Dim username As String
'We use string as string is a text based variable. 'We use string as string is a text based variable.
Console.WriteLine("Hello, What is your name? ") 'Ask the user their name. Console.WriteLine("Hello, What is your name? ") 'Ask the user their name.