Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

C# C# Basics (Retired) Perfect Exceptions

Alex Lee
Alex Lee
408 Points

Can someone help me out with the MC questions

I have no idea what the quiz is about..my concept is bad, someone please help me to explain..?..please you are very much appreciated

In which order were the methods called?

Unhandled Exception: System.IndexOutOfRangeException: Index has to be between upper and lower bound of the array. at System.Array.GetValue (Int32 index) [0x00000] in :0 at Oscorp.WebSpinner.Stop () [0x00000] in :0 at Treehouse.Program.Main () [0x00000] in :0

Which method called Oscorp.WebSpinner.Stop()?

Unhandled Exception: System.IndexOutOfRangeException: Index has to be between upper and lower bound of the array. at System.Array.GetValue (Int32 index) [0x00000] in :0 at Oscorp.WebSpinner.Stop () [0x00000] in :0 at Treehouse.Program.Main () [0x00000] in :0

1 Answer

Steven Parker
Steven Parker
221,292 Points

A stack is like a stack of paper, the last thing you put on it is on top. So when looking at a stack trace, keep in mind that the order things are shown is the opposite of the order in which they occurred.

So for the question about which order things were called, just read the list from the bottom up.

And to determine which method called another, it will always be the one listed below the called one.