.net – the difference between Call Stack and Stack Trace

callstacknetstack-tracevisual studio

What is the difference between the terms "Call Stack" and "Stack Trace" ?

Best Answer

A call stack is typically "the current stack of operations" - i.e. while it's running.

A stack trace is typically a copy of the call stack which is logged at some sort of failure, e.g. an exception.

In other words, while you're debugging you will look at the current call stack - but when you look at logs, you'll get a stack trace. At least, that's my interpretation of the terms :)