What’s the best way of accessing field in the enclosing class from the nested class?
Unlike Java, a nested class isn’t a special “inner class” so you’d need to pass a reference. Raymond Chen has an example describing the differences here : C# nested classes are like C++ nested classes, not Java inner classes. Here is an example where the constructor of the nested class is passed the instance of … Read more