Java Pseudo Code
public class Foo{
public void doStuff(){
System.out.println("Kill all humans...");
}
public class Bar{
public Bar(){
Foo.this.doStuff();
}
}
}
You can have a nested class access it's outer class instance through <Class Instance>.this
, to look properties or variable values or even invoke methods if you wanted WITHOUT having to pass a reference of the outer class instance to the inner class instance (I'm assuming that is the anonymous part?).
Does C# have something equivalent?