Using catch without arguments
问题 What is the difference between: catch { MessageBox.Show("Error."); } and: catch (Exception ex) { MessageBox.Show("Error."); //we never use ex, so is it better to use catch without arguments? } 回答1: As of .NET 2, if you don't tweak the configuration? Nothing. Before then, or with some config tweak I can't remember precisely, there was the possibility of an exception being thrown from unmanaged code which didn't get converted into an Exception -compatible object. Note that there's another