Hi,
UncleJoe wrote:
What is the syntax to declare a nested class that
can only be instantiated by the outer class, yet
visible to the other classes?
You can put the two classes in a separate assembly and declare the Inner
class constructor "internal". If you are creating some kind of a reusable
library already, this could be exactly what you want.
You can also declare a public interface and have your Inner class declared
within the Outer class as private, but implementing the public interface.
With this combination, you can only instantiate objects of the Inner class
within the Outer class, but still expose the objects through the outer class
(as being type of the interface).
The result is more or less what you want, in either case.
--
Chris Priede