I'm converting a piece of c++ code to C#. There's one part I'm having a
problem with.
There is a class A which can be created only by calling a class factory
method on object B. Things won't work correctly if the application
creates an A in any other way.
The idiom for this in C++ is to declare the A constructor private, then
declare B a friend. Thus only object B has access to the A constructor.
What is the equivalent of this in C#?
I see that VB.NET has a Friend access modifier, but it doesn't seem to
do the same thing as it does in c#.
Thanks,
++PLS