2
Answers

For the following class, what methods would be included i

Noe Torres

Noe Torres

11y
1.4k
1

public class CallStack
 {
  public void Test()
  {
   try
   {
    this.A();
   }
   catch( Exception e )
   {
    Console.WriteLine( e.StackTrace );
   }
  }

  protected void A()
  {
   this.B();
  }

  protected void B()
  {
   try
   {
    this.C();
   }
   catch( Exception /*e*/ )
   {
    throw;
   }
  }
 
  protected void C()
  {
   this.D();
  }

  protected void D()
  {
   try
   {
    this.E();
   }
   catch( Exception e )
   {
    throw e;
   }
  }

  protected void E()
  {
   this.Throw();
  }

  protected void Throw()
  {
   throw new Exception( "An Exception occurred" );
  }
 }

Answers (2)