Restricting read/write access of class properties to certain classes in .NET
.net, c#
Solution
There is no `friend` access in C#. You have `public`/`protected`/`internal` (including `[InternalsVisibleTo]`), but nothing more granular (i.e. at the inter-type level). So, no.
Problem
Is there a good way to allow only a certain class to have read/write access to properties in another class without having inheritance structure between them during design mode in .NET? So if a class has public properties, only a certain class has visibility to these properties? If not possible during design mode, then during run time. I know of a hokey way using flags in set and get statements but I think there are better ways.