In C# the Type
class instances have a lot of properties. Two of them are IsPublic
and IsVisible
:
- Type.IsPublic - Gets a value indicating whether the Type is declared public.
- Type.IsVisible - Gets a value indicating whether the Type can be accessed by code outside the assembly.
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?
Aucun commentaire:
Enregistrer un commentaire