Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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 WindowsFormsApp2
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- public void textBox1_TextChanged(object sender, EventArgs e)
- {
- }
- public void button1_Click(object sender, EventArgs e)
- {
- string line;
- string file = "szotar.txt";
- StreamReader read = new StreamReader(file);
- textBox1.Text = read.ReadLine();
- line = read.ReadLine();
- while (line != null)
- {
- if (line == Text)
- {
- MessageBox.Show("A szó helyes!");
- break;
- }
- else
- {
- line = read.ReadLine();
- }
- }
- if (line == null)
- {
- MessageBox.Show("A szó helytelen!");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement