I searched, but I don’t know if I use the correct wording for the search. I am writing a C # program for my class, but I am having problems with the message field.
I am trying to have a message box display a message and at the same time read a variable. I have no problem with this in console applications, but I can't figure it out for Windows.
So far I:
MessageBox.Show("You are right, it only took you {0} guesses!!!", "Results", MessageBoxButtons.OK);
Which works great. Howerver I'm trying to {0} be the result of the variable numGuesses. I'm sure it is simple, and I just forget about it in the book or something like that, or my syntax is incorrect somewhere.
source
share