Mohit Vijay

Mohit Vijay

  • NA
  • 67
  • 2.3k

Accessibility of a Class

Nov 23 2013 9:40 AM
Hello, I want to design a solution, but facing a problem because of limited knowledge of OOPs concept. My requirement is as follows

Assume I have 4 classes
Class A
Class B
Class C
Class D

I want object of class D can only be allowed to create, or class can only be accessible in Class C. Same Class C object and class itself can be allowed access and created in Class B. Class D should not have access to class B.
Same Class A should not have access to C, D. It only have access to B, and it can create object of B.


How we can implement with best possible architecture in C#.

With Best Regards.