Noe Torres

Noe Torres

  • NA
  • 1
  • 1.7k

For the following class, what methods would be included i

May 14 2013 7:32 PM

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)