How to check if a character is a vowel or consonant in vb.net

Check if a character is a vowel or not in vb.net

If you don’t know how to write a program that will check the entered character is vowel or not then this post is only for you because here I have given an easy solution for your program. If you are interested in visual basic programming then you must know how to check if a character is a vowel or consonant in vb.net. If you read this program properly then you do not need to see any other example of this program because here I have properly explained and given brief information for the vb.net program to check if a character is a vowel or consonant.

Before start to the program, you must know about the vowel and consonants. So, let’s know the basic introduction about vowels and consonants. In English alphabets there are total 26 characters in that ‘a, e, I, o and u’ are the vowels and except these five characters all are consonants. In this program we are going to check the character is vowel or not. If they will not vowel then the message will display as like this character is not a vowel. If you want to know more about vowels and consonants then you can read on Wikipedia.

How-to-check-if-a-character-is-a-vowel-or-consonant-in-vb-dot-net

I hope you know proper knowledge about the vowel and consonants of the English alphabet. So now we are going to see the steps for creating the vb.net program that will check character is vowel or not. If you have no basic idea about this program then don’t worry about that because I have given easy steps for checking if a character is a vowel or consonant in vb.net. I always give easy steps for every program. If you want to see the previous program then you can check here. How to display addition of two matrix in visual basic 6.0.

Steps for creating a vb.net program to check whether a character is vowel or not

  1. Open Microsoft visual studio.
  2. Create a new project.
  3. Draw one textbox to input the values.
  4. Draw two buttons one button for check character is vowel or not and another one is clear the textbox.
  5. After that write the code on the check button
  6. Then run the program.

Source code for the program of check if a character is a vowel or consonant in vb.net

Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Dim c As Char

        c = txtchar.Text

        If Char.IsUpper(c) Then

            MsgBox("Upper case")

        ElseIf Char.IsLower(c) Then

            MsgBox("Lower case")

        End If

 

        Select Case c

            Case "A"

                MsgBox("Vowel")

 

            Case "E"

                MsgBox("Vowel")

 

            Case "I"

                MsgBox("Vowel")

 

            Case "O"

                MsgBox("Vowel")

 

            Case "U"

                MsgBox("Vowel")

 

            Case "a"

                MsgBox("Vowel")

 

            Case "e"

                MsgBox("Vowel")

 

            Case "i"

                MsgBox("Vowel")

            Case "o"

                MsgBox("Vowel")

            Case "u"

                MsgBox("Vowel")

 

            Case Else

                MsgBox(" Not Vowel")

        End Select

    End Sub

End Class

 

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

TextBox1.Text=""

End Sub

vb-dot-net-program-to-check-whether-character-is-vowel-or-not

Why do we need the create a program that is of checks if a character is a vowel or consonant in vb.net?

Here this program has no more benefits but the main purpose of this program is to increase logical skills. By using this program you can develop a desktop application that will help with logical skills. Suppose you want to develop the project for nursery school then in that application you can develop a little game for kids by using the logic of this program.

This program will use for practical exams, if you are finding the visual basic practical programs pdf then don’t waste your time searching anywhere because here at allvbprograms we have given all types of visual basic programs with codes and output that will help to solve your practical exam problems. If you want to see some example of the visual basic program then you can see this previous program How to write a program to convert numbers into words in visual basic 6.0 If you practice these programs properly then you can easily solve these types’ questions in any exams because these are the one type of visual basic simple programs.

I know what is you are thinking, if you are an advanced programmer then maybe this program is useless for you. But this program is very useful for beginners, if you are a beginner then join us now because we are always trying to provide the best visual basic coding for beginners. Here you can get easily examples of visual basic programs. If you want to visual basic programs PDF then you can comment to me or contact me through the contact form.

how-to-check-whether-word-starts-with-vowel-or-not-in-vb-dot-net

I hope you now know why we need to create a program that is of checks if a character is a vowel or consonant in visual basic and why we need to practice examples of visual basic programs. If you want the project file of this program then tell me I will give you the project file of this program that will help you to know how to check if a character is a vowel or consonant in vb.net.

check-the-entered-character-is-vowel-or-not-using-switch-statement-in-vb-.net

How to work this program

If you saw the source code of this program properly then you noticed that the working flow of this program is very easy. You just need to enter a character in the textbox and click on the Display button. I think there doesn’t need to be brief information for this program because this is not so hard program.

The additional part is added in this program is that when you are entering the character in the textbox then the output will also show the character is uppercase or lower case. But that uppercase or lowercase does not matter in this program. Here I have only focused on How to check if a character is a vowel or consonant in vb.net

I hope you understood properly how to check if a character is a vowel or consonant? If you have any type of query then you can comment to me I will try to solve your problems. If you have any type’s difficulty to solve this program then I will provide video tutorials for this program. By using that solution you can easily Write a Vb.net program to accept a character from the keyboard and check whether it is vowel or not.

Check-if-a-character-is-a-vowel-or-consonant-in-visual-basic

Post a Comment

0 Comments