Home >>VB.Net Built-in Functions >VB.Net program to demonstrate the LCase() function

VB.Net program to demonstrate the LCase() function

Write a VB.Net program to demonstrate the LCase() function

To convert the specified string to lowercase, the LCase() function is used.

Syntax :


Parameters :

  • Str: String specified to be converted to lowercase.

Return Value :

  • The function LCase() returns the lowercase string.

Program :

The source code for demonstrating the function LCase() is given below. The program given is compiled and successfully executed.

Module Module1
    Sub Main()
        Dim str As String = "I LOVE INDIA"
        Dim LCaseStr As String
        LCaseStr = LCase(str)
        Console.WriteLine("Lowercase string: {0}", LCaseStr)
    End Sub
End Module
Lowercase string: i love india


We created a Module1 module in the program above that contains the Main() method. Two variables str and LCaseStr were created in the Main() method, where variable str is initialized with 'I Love India' and variable LCaseStr is initialized with a blank string.

LCaseStr = LCase(str)

We used the LCase() function in the code above, which will return the lowercase string. Then, on the console screen, we printed the string.