VB Code:
Public Class Test
Private _Name As String
Public ID As Integer = 0
Public ReadOnly Property Name() As String
Get
Return _Name
End Get
End Property
Public Sub Test()
Dim bf As Reflection.BindingFlags = Reflection.BindingFlags.Public
Dim fi As Reflection.FieldInfo
For Each fi In Me.GetType.GetFields(bf)
MsgBox(fi.Name, , "Worked WITH flags")
Next
For Each fi In Me.GetType.GetFields
MsgBox(fi.Name, , "Worked withOUT flags")
Next
End Sub
End Class
'the test in a form on a button click or whatever
Dim t As New Test
t.Test()