Microsoft .NET Framework, ASP.NET, Visual C# (CSharp, C Sharp, C-Sharp) Developer Training, Visual Studio
| Term
| try/catch block
|
| Definition
| Exception handling mechanism in managed code. A try block comprises program statements that may throw exceptions when executed. An associated catch block comprises statements for handling exceptions thrown within the try block. Each try block may have multiple catch blocks for catching specific exceptions—e.g., null pointer, arithmetic overflow, etc. catch and throw are C# keywords.
|
| See also
| catch block, Exception, Exception handling, finally block
|
| You may edit this definition to improve or extend it.
|