ESPONJA 08
CÓDIGO BÓTON 1 VOCALES:
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;
namespace
WindowsFormsApp1
{
public
partial
class
Form1
: Form
{
public
Form1()
{
InitializeComponent();
}
private
void
abrirToolStripMenuItem_Click(object
sender, EventArgs e)
{
if
(openFileDialog1.ShowDialog() == DialogResult.OK)
richTextBox1.LoadFile(openFileDialog1.FileName,RichTextBoxStreamType.PlainText);
}
private
void
button1_Click(object
sender, EventArgs e)
{
int
Fin = richTextBox1.Lines.Length;
string[]
Vector = new
string[Fin];
for
(int
a = 0; a < Fin; a++)
{
string
Cad = richTextBox1.Lines[a];
Cad.ToLower();
string
Vocales = "";
foreach
(char
c in
Cad)
{
if
(c == 'a'
|| c == 'e'
|| c == 'i'
|| c == 'o'
|| c == 'o')
{
Vocales
+= c;
}
}
listBox1.Items.Add(Vocales);
}
}
}
}

Las clases en linea me gustan porque estoy desde mi casa trabajando cómodamente
ResponderBorrarno me gustan las clases porque a veces me equivoco
ResponderBorrar