D
Dave Veeneman
Is there a way to expose an internal class as a public property of its
parent object? Let's say I have a Customer object with Public accessibility.
It has an Addresses collection property that it populated with Address
objects. This property has Public accessibility, as well.
To keep the assembly interface clean, I want to hide the objects on which
the property is based (The Address and Addresses objects) from users outside
the assembly. Declaring them as Internal would do the trick, but the
compiler throws an "Inconsistent Accessibility" exception, since the
property is Public, and the objects on which it is based are Internal.
Is there any way around this issue? Is there some other way to expose the
objects only through the property based on them?
Thanks.
parent object? Let's say I have a Customer object with Public accessibility.
It has an Addresses collection property that it populated with Address
objects. This property has Public accessibility, as well.
To keep the assembly interface clean, I want to hide the objects on which
the property is based (The Address and Addresses objects) from users outside
the assembly. Declaring them as Internal would do the trick, but the
compiler throws an "Inconsistent Accessibility" exception, since the
property is Public, and the objects on which it is based are Internal.
Is there any way around this issue? Is there some other way to expose the
objects only through the property based on them?
Thanks.