private void Compare_Click(object sender, EventArgs e) { WorkWithFiles file = new WorkWithFiles(); TextBox1.Text = file.CompareText(TextBox1.Text, TextBox2.Text); }