Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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
231,269 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.