How to do Uppercase and Lowercase in Visual Basic .NET

How to do Uppercase and Lowercase in Visual Basic .NET

How to do Uppercase and Lowercase in Visual Basic .NET.

In this tutorial, you will learn how to do uppercase and lowercase to your strings in VB.Net.

First, create your own project and add the labels from the toolbox. (See sample image below).

How to do Uppercase and Lowercase in Visual Basic .NET

Next, we are going to make the Label1 to uppercase and the Label2 to lowercase. Follow this line of code and paste it to your Form1 Load.

[vbnet]

Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Label1.Text = “itsourcecode.com”.ToUpper
Label2.Text = “itsourcecode.com”.ToLower
End Sub
End Class

[/vbnet]

Now, reload your project and see the results. Here’s mine:

How to do Uppercase and Lowercase in Visual Basic .NET

You would notice that our Label1 text is being modified into capital letters because of the string property .ToUpper.

Also, our Label2 text is being modified into small letters because of the string property .ToLower.

Take note of this string properties that can make your texts to uppercase and lowercase in VB.Net.

  1. string.ToUpper – lets your texts loaded as capital letters.
  2. string.ToLower – lets your texts loaded as small letters.

You can use these properties as you like as long as it is a string data type.

Congratulations! You have learned how to do Uppercase and Lowercase in VB.Net.

For questions or any other concerns or thesis/capstone creation with documentation, you can contact me through the following:

E-Mail: [email protected]

Facebook: facebook.com/kirk.lavapiez

Contact No.: +639771069640

Ian Hero L. Lavapiez

BSIT Graduate, soon to be MIT.

System Analyst and Developer

Related topic(s) that you may like:

 

 

Leave a Comment