Professional Documents
Culture Documents
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ArraysLesson
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
}
}
label3.Text = niilber.ToString();
}
private void button1_Click(object sender, EventArgs e)
{
if(textBox1.Text.Trim()=="")
{
MessageBox.Show("haih gunjiin ner oruulna uu");
}
else
{
string[] gunjuud = new string[6]
{"Ariel","Bell","Cinderella","SnowWhite","Jasmin","Elsa"};
bool gunjoldloo = false;
foreach(string gunj in gunjuud)
{
if(gunj==textBox1.Text.Trim())
{
gunjoldloo = true;
MessageBox.Show(gunj);
break;//tasalduulah command
}
}
if(gunjoldloo==false)
{
MessageBox.Show("NO RESULT");
}
}
}