Expand|Select|Wrap|Line Numbers
- private void error(string msg, string title = "Error!")
- {
- MessageBox.Show(msg, title, MessageBoxButtons.OK, MessageBoxIcon.Error);
- }
http://msdn.microsoft.com/en-us/library/294000kk(VS.90).aspx
But I can't figure out what it's telling me to do. Basically I just want the string title to have a default value of Error! if the value doesn't get passed to the method, so I could call it like this:
error("Some error message");
And that would generate a messagebox with the default title of "Error!" and "Some error message" as the contents. Alternatively, I could call it like this:
error("Some error message", "Some title");
And I would get the same messagebox but the title would now be "Some title".
Is there a way I can do this?