In C# the Type class instances have a lot of properties. Two of them are IsPublic and IsVisible:
As far as I know all public members can be accessed outside of the assembly and all others cannot. Two exceptions I can think of are the [InternalsVisibleTo:] assembly attribute and protected modifier for members.
But anyway what is the difference between these two properties?
The links you posted explain this:
IsPublic returns
true if the Type is declared public and is not a nested type; otherwise, false.
IsVisible returns
true if the current Type is a public type or a public nested type such that all the enclosing types are public; otherwise, false.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With