Brijesh Jalan
What is Try-Catch in .net?
By Brijesh Jalan in ASP.NET on Jul 15 2010
  • Sriram D
    Jul, 2010 19

    A Try Catch in .Net or any programming language main purpose is to handle the exceptions in a structured manner.
    Try
    {
     // We write the code to be executed
    }
    Catch(Exception Ex)
    {
         // To Handle the error
    }
    Catch(Exception Ex)
    {
        // To Handle Multiple exceptions of different types
    }

    If any error got handled then the execution exists or checks the next exception in nested block or also Nested Error ExceptionHandling
    Exception is the base Class for ExceptionHandling .For custom Exception handling in the application we need to inherit from BaseClass i.e., Exception

    Examples : IndexOutOfRangeException
    InvalidCastException
    ArgumentOutOfRangeException
    NullReferenceException

    • 0
  • Veerareddy pallela
    Jul, 2010 19

    Static class contain only static members(like variables,methods) on it.

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS