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

Here, we are going to demonstrate the use of the 'vbCrLf' constant in VB.Net.
Submitted by Nidhi, on December 11, 2020 [Last updated : February 18, 2023]

VB.Net - vbCrLf Constant

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

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

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

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

Module Module1

    Sub Main()
        Console.WriteLine("Name   :" & vbCrLf & "Alex")
        Console.WriteLine("Age    :" & vbCrLf & "18")
        Console.WriteLine("Class  :" & vbCrLf & "12")
    End Sub

End Module

Output:

Name   :
Alex
Age    :
18
Class  :
12
Press any key to continue . . .

Explanation:

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

VB.Net Basic Programs »






Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.