Vote count:
0
I created a Windows Form Application that in a TextBox you can enter a number, and the program, I modify that number.
I created a loop if, about the program if it finds TextBox.text = null, do not run the calculations. But even if I leave the TextBox empty, I create an exception because misses no value. Should not skip the if loop?
private void button1_Click(object sender, EventArgs e)
{
string strMP3Folder = @"C:\Users\Stefano\Music\shake.mp3";
string strMP3OutputFilename = @"C:\Users\Stefano\Music\funziona2.mp3";
using (Mp3FileReader reader = new Mp3FileReader(strMP3Folder))
{
int count = 1;
Mp3Frame mp3Frame = reader.ReadNextFrame();
System.IO.FileStream _fs = new System.IO.FileStream(strMP3OutputFilename, System.IO.FileMode.Create, System.IO.FileAccess.Write);
double valoreIniziale = 0;
if (textBox2.Text != null)
{
valoreIniziale = Convert.ToDouble(textBox2.Text);
}
double valorefinale = 1000000;
if (textBox1.Text != null)
{ valorefinale = Convert.ToDouble(textBox1.Text); }
asked 1 min ago
How to jump a cycle If?
Aucun commentaire:
Enregistrer un commentaire