×

VB.Net Programs

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

By Nidhi Last Updated : November 14, 2024

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.