Google News
logo
C# - Interview Questions
Write the Syntax for catching an exception in C#?
To catch an Exception we make use of try-catch blocks. The catch block has a parameter of the system.Exception type.
 
Example :
try
{
GetAllData();
}
catch(Exception ex){
}
Advertisement