Mock Test 1

  1. We have a class called LogException. The class implements a CaptureException method using the following code segment: public static void CaptureException(Exception ex). Pick one of the following syntaxes to make sure all exceptions in the class are captured and rethrow the original exception, including the stack:
    1. catch (Exception ex) { LogException.CaptureException(ex); throw; }

    2. catch (Exception ex) { LogException.CaptureException(ex); throw ex; }

    3. catch { LogException(new Exception()); }

    4. catch { var ex = new Exception(); throw ex; }

  2. You are creating a class named Store, which should have a Store Type member that meets the following requirements:
    • The member must be accessible publicly.
    • The member must only acquire ...

Get Programming in C#: Exam 70-483 (MCSD) Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.