I know this is a noob question however in a c# application what does the following do
{...}
at the end of catch statement.
notrosh
Printable View
I know this is a noob question however in a c# application what does the following do
{...}
at the end of catch statement.
notrosh
The following coded will catch all exceptions and then do nothing, you should always do something when catching an exception, but there are always special cases.
Code:try
{
// Try something
}catch
{
// Catch all exceptions and do nothing...
}
you can also do a
try
{
}
catch (Exception ex)
{
MessageBox.Show("your error message goes here" + Environment.NewLine + ex.Message);
Console.WriteLine(ex.ToString());
}