Mega Code Archive

 
Categories / VB.Net / Reflection
 

Type IsVisible Property tells whether the Type can be accessed by code outside the assembly

Imports System Friend Class InternalOnly     Public Class Nested     End Class End Class Public Class Example     Public Class Nested     End Class     Public Shared Sub Main()         With GetType(InternalOnly.Nested)             Console.WriteLine("Is the " & .FullName _                 & " class visible outside the assembly? " & .IsVisible)         End With         With GetType(Example.Nested)             Console.WriteLine("Is the " & .FullName _                 & " class visible outside the assembly? " & .IsVisible)         End With     End Sub End Class