Question: What is the C# coding needed to take the words that I have opened up and are now shown in my ListBox and display how

What is the C# coding needed to take the words that I have opened up and are now shown in my ListBox and display how many vowels and consonants are in each word?

Below is the coding that I have so far and now I am stuck (I cannot figure out how to read what is in my ListBox and decide how many consonants and how many vowels are in the words)

* C # Windows Form

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

using System.Windows.Forms;

using System.IO;

namespace quest4

{

public partial class Form1 : Form

{

public Form1()

{

InitializeComponent();

}

private void button1_Click(object sender, EventArgs e)

{

string fileName;

OpenFileDialog openFileDialog = new OpenFileDialog();

openFileDialog.ShowDialog();

string filePath = openFileDialog.FileName;

StreamReader inputFile = new StreamReader(filePath);

listBox1.Items.Clear();

while (!inputFile.EndOfStream)

{

fileName = inputFile.ReadLine();

listBox1.Items.Add(fileName);

}

}

What is the C# coding needed to take the words that I

Form1Designer.cs Form1.cs Form1.cs IDesignr Form1 Opened File Will Be Displayed Below in istBox1 The Number of Vawels Found in List Bcx 1 was The Number of Consonants Found in List Box 1 was: Press this button to open file: button1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!