Parth48
asked on
what are the ways to catch exceptions in C#.net windows application ??
i want to know that what are the types of exceptions ??
and what are the ways to catch exceptions in C#.net windows application ??
in my applications exceptions generate when i click on exe file (packaging file),
but i don't know how to catch that runtime exception ??
and what are the ways to catch exceptions in C#.net windows application ??
in my applications exceptions generate when i click on exe file (packaging file),
but i don't know how to catch that runtime exception ??
This should help you out...I know it did me. Talks about how to handle Unhandled Exceptions. You don't necessarily have to take screenshots and such...
http://msdn.microsoft.com/en-us/vbasic/cc411437
http://msdn.microsoft.com/en-us/vbasic/cc411437
You need to use a try catch finally statement:
try
{
//your code here
}
catch(Exception ex)
{
//your exception handing here
//ex.Message is your error
}
finally
{
//any code here to clean up anything that may need to be cleaned up
}
try
{
//your code here
}
catch(Exception ex)
{
//your exception handing here
//ex.Message is your error
}
finally
{
//any code here to clean up anything that may need to be cleaned up
}
Sorry, I couldn't find the same video for C#...so here it a converter if you need it.
http://www.developerfusion.com/tools/convert/vb-to-csharp/
http://www.developerfusion.com/tools/convert/vb-to-csharp/
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
please refer the attached snapshot ....
and tell me what can i do ??
23-02-2011-5-56-55-PM.jpg