var m = new Gtk.MessageDialog(this,
DialogFlags.Modal,
MessageType.Warning,
ButtonsType.Cancel,
"Hello {}"
);
throws a format exception: Input string was not in a correct format.
Judging by the stack trace, it seems that this library is calling .NET's string formatter. But I did not want to format anything; I did not pass any argument. I think, most of the time, when programmers use a message box, they just need to show a constant string message quickly, rather than formatting a string. Wouldn't it be more efficient if the library skips string formatting, if there is no argument?
The following code
throws a format exception: Input string was not in a correct format.
Judging by the stack trace, it seems that this library is calling .NET's string formatter. But I did not want to format anything; I did not pass any argument. I think, most of the time, when programmers use a message box, they just need to show a constant string message quickly, rather than formatting a string. Wouldn't it be more efficient if the library skips string formatting, if there is no argument?