Home »
        VB.Net »
        VB.Net Programs
    
    VB.Net program to demonstrate the LCase() function
    
    
    
    
	    
		    By Nidhi Last Updated : November 11, 2024
	    
    
    
    LCase() function in VB.Net
    The LCase() function is used to convert the specified string into lowercase.
    Syntax
LCase(Str)
    Parameter(s)
    
        - Str: Specified string to be converted into lowercase.
 
    
    Return Value
    The LCase() function will return the lowercase string.
    VB.Net code to demonstrate the example of LCase() function
    The source code to demonstrate the LCase() function is given below. The given program is compiled and executed successfully.
'VB.Net program to demonstrate the LCase() function.
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
Output:
Lowercase string: i love india
Press any key to continue . . .
    Explanation:
    In the above program, we created a module Module1 that contains a Main() method. In the Main() method, we created two variables str and LCaseStr, here variable str is initialized with " I Love India " and variable LCaseStr is initialized with a blank string.
LCaseStr = LCase(str)
    In the above code, we used the LCase() function that will return the lowercase string. Then we printed the string on the console screen.
    VB.Net Basic Programs »
    
    
    
    
   
    
  
    Advertisement
    
    
    
  
  
    Advertisement