What I want to do is display a messagebox(which is working) and take the MessageBox.Show(textBox1.Text, textBox2.Text) code and put it into a richtextbox when the button is clicked. I am getting an error though, Cannot implicitly convert type 'void' to 'string' Any idea how I can do this?
private void button1_Click(object sender, EventArgs e) { yo(); richTextBox1.Text = yo(); } void yo() { MessageBox.Show(textBox1.Text, textBox2.Text); }