I have the following statement in C#:
if (func1() || func2())
{
...
I have placed a breakpoint on the if statement. After stepping through, I can see that the execution enters the then part of the if statement. How can I tell which function caused the if statement to be satisfied (or if both functions returned true)? Is it possible to see the return value from a function without first modifying the code and assigning the return value to an interim variable?
Update:
Per this question: Can I find out the return value before returning while debugging in Visual Studio?
The Autos window shows the return values from the two functions. In my case, func1
returned false, so func2
was called, which also returned false.