Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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);

}

}

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Pro Database Migration To Azure Data Modernization For The Enterprise

Authors: Kevin Kline, Denis McDowell, Dustin Dorsey, Matt Gordon

1st Edition

1484282299, 978-1484282298

More Books

Students also viewed these Databases questions

Question

What is the difference between Needs and GAP Analyses?

Answered: 1 week ago

Question

What are ERP suites? Are HCMSs part of ERPs?

Answered: 1 week ago