|
-
Mar 20th, 2007, 03:06 PM
#1
Thread Starter
Lively Member
[RESOLVED] Easy Question
I know this is a noob question however in a c# application what does the following do
{...}
at the end of catch statement.
notrosh
-
Mar 20th, 2007, 04:23 PM
#2
Fanatic Member
Re: Easy Question
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...
}
-
Mar 21st, 2007, 07:44 PM
#3
Fanatic Member
Re: Easy Question
you can also do a
try
{
}
catch (Exception ex)
{
MessageBox.Show("your error message goes here" + Environment.NewLine + ex.Message);
Console.WriteLine(ex.ToString());
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|