Home >>VB.Net Programs >VB.Net program to demonstrate the use of the 'vbCrLf' constant

VB.Net program to demonstrate the use of the 'vbCrLf' constant

What is the use of the 'vbCrLf' constant in VB.Net

Here using the 'vbCrLf' constant on the console screen, we print a new line.

Below is the source code to demonstrate the use of the 'vbCrLf' constant. The program given is compiled and successfully executed.

Example


Module Module1
    Sub Main()
        Console.WriteLine("User_Name   :" & vbCrLf & "Rexx")
        Console.WriteLine("User_Age    :" & vbCrLf & "25")
        Console.WriteLine("User_Class  :" & vbCrLf & "12")
    End Sub
End Module
	
Output:
User_Name :
Rexx
User_Age :
25
User_Class :
12
Press any key to continue . . .

Explanation:

We created a Module1 module in the above program that contains the function Main(). The student detail was printed in the Main() function, here we used the "vbCrLf" constant to print newline on the screen of the console.


No Sidebar ads