I would like for the input from textbox1.text to be displayed in the place holder {0}
so that if textbox1.text = “Randy” I would like a messagebox to popup and say Firstname,Randy
MessageBox.Show("First Name,{0}", textBox1.Text);
What happens currently is a messagebox pops up and says First Name,{0}
There’s no overload that does formatted output for the
MessageBoxclass. UseString.Format()to get your formatted string.To show a message box with a caption, use the
MessageBox.Show(string, string)overload. First argument is the message while the second is the caption.