92.
Choose the correct statement which makes exception handling work in C#.NET?

93.
Choose the statement which is incorrect?

95.
What is the use of try & catch?

98.
What will be the output of the following C# code?
class number
{
    int length = 50;
    public int number1
    {
        get
        {
            return length;
        }
        set
        {
            length = value;
        }
    }
}
class Program
{
    public static void Main(string[] args)
    {
        number p = new number();
        p.number1 = p.number1 + 40;
        int k = p.number1 * 3 / 9;
        Console.WriteLine(k);
        Console.ReadLine();
    }
}

99.
What will be the output of the following C# code snippet?
class Program
{
    public static void Main(string[] args)
    {
        try
        {
            int a = args.Length;
            int b = 10 / a;
            Console.WriteLine(a);
            try
            {
                if (a == 1)
                a = a / a - a;
                if (a == 2)
                {
                    int[] c = { 1 };
                    c[8] = 9;
                }
            }
            catch (IndexOutOfRangeException e)
            {
                Console.WriteLine("TypeA");
            }
        }
        catch (ArithmeticException e)
        {
            Console.WriteLine("TypeB");
        }
        Console.ReadLine();
    }
}

Read More Section(Exception Handling in C Sharp)

Each Section contains maximum 100 MCQs question on Exception Handling in C Sharp. To get more questions visit other sections.