I was playing around the local functions and could not figure out how to call the host function if it contains the local function with the same name.
class Program
{
static void Main(string[] args)
{
new Test().Foo();
Console.Read();
}
}
class Test
{
public void Foo()
{
Console.WriteLine("Host function");
void Foo()
{
Console.WriteLine("Local function");
}
Foo(); // This calls the local function
Foo(); // I would like to call the host Foo() recursively here
}
}