>>Does the property have a public accessor. Docs:
>>"A property is considered public to reflection if it has at least one accessor that is public." For clarity if should read:
>>"A property is only considered public to reflection if it has at least one accessor that is public."
>>For the following class GetProperties() would only return PropertyA, GetMembers() would return PropertyA and PropertyB:
Public Class SomeClass
>> Public PropertyB As String
>> Dim _propertyA As String
>> Public Property PropertyA As String
>> Get
>> Return _propertyA
>> End Get
>> Set(ByVal value As String)
>> _propertyA = value
>> End Set
>> End Property
>>End Class
>
>Thanks, that is what I started to suspect last night.
>
>Would there be a way to verify for PropertyB, in your example, and get its value if it exists?
Looks like you've got it - but just to throw in some Linq :-} :
Dim mi As System.Reflection.MemberInfo = (From xx In oLabel.GetType().GetMembers() _
Where xx.Name = "PropertyB" Select xx).FirstOrDefault()
If Not mi Is Nothing Then
End If