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);
}
}
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started