How to do Uppercase and Lowercase in Visual Basic .NET

0
56

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.

  1. Public Class Form1
  2. Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  3. Label1.Text = "itsourcecode.com".ToUpper
  4. Label2.Text = "itsourcecode.com".ToLower
  5. End Sub
  6. End Class

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:

 

 

Facebook Comments
(Visited 55 times, 1 visits today)

LEAVE A REPLY

Please enter your comment!
Please enter your name here