FieldInfo.IsAssembly
Imports System
Imports System.Reflection
Public class Example
Public f_Public As Integer
Friend f_Friend As Integer
Protected f_Protected As Integer
Protected Friend f_Protected_Friend As Integer
Public Shared Sub Main()
For Each f As FieldInfo In GetType(Example).GetFields(BindingFlags.Instance Or BindingFlags.NonPublic Or BindingFlags.Public)
Console.WriteLine("{0,-21}{1,-9}{2,-9}{3,-9}{4,-9}{5,-9}", _
f.Name, _
f.IsPublic, _
f.IsAssembly, _
f.IsFamily, _
f.IsFamilyOrAssembly, _
f.IsFamilyAndAssembly _
)
Next
End Sub
End Class
Related examples in the same category