Imports System
Imports System.Reflection
Imports Microsoft.VisualBasic
Public Class Mypropertya
Private myCaption As String = "A Default caption"
Public Property Caption() As String
Get
Return myCaption
End Get
Set(ByVal Value As String)
If myCaption <> value Then
myCaption = value
End If
End Set
End Property
End Class
Class Mypropertyinfo
Public Shared Function Main() As Integer
Dim Mypropertya As New Mypropertya()
Dim MyTypea As Type = Type.GetType("Mypropertya")
Dim Mypropertyinfoa As PropertyInfo = MyTypea.GetProperty("Caption")
Console.Write(Mypropertyinfoa.CanRead)
Return 0
End Function
End Class