public partial class MainWindow: Window
{
Random rnd = new Random();
public MainWindow()
{
InitializeComponent();
Foo(Bar() * Bar());
}
int Bar()
{
return rnd.Next(1, 100);
}
void Foo(int p)
{
Console.WriteLine(p.ToString());
}
}After you’ve stepped over line 7 (the call to
Foo) this is what you’ll see in the Autos window. We called Bar twice inside the calling to Foo and the results can be seen here.
