Consider the following (C#) code. The lambda being passed to ConvolutedRand() is said to be "closed over" the variable named format. What term would you use to describe how the variable random is used within MyMethod()?
void MyMethod
{
int random;
string format = "The number {0} inside the lambda scope";
ConvolutedRand(x =>
{
Console.WriteLine(format, x);
random = x;
});
Console.WriteLine("The number is {0} outside the lambda scope", random);
}
void ConvolutedRand(Action<int> action)
{
int random = new Random.Next();
action(random);
}