Imports System
Imports System.Reflection
Imports Microsoft.VisualBasic
Public Class Mypropertyb
Private myCaption As String = "B Default caption"
Public ReadOnly Property Caption() As String
Get
Return myCaption
End Get
End Property
End Class
Class Mypropertyinfo
Public Shared Function Main() As Integer
Dim Mypropertyb As New Mypropertyb()
Console.Write(Mypropertyb.Caption)
Console.Write(Mypropertyb.Caption)
Dim MyTypeb As Type = Type.GetType("Mypropertyb")
Dim Mypropertyinfob As PropertyInfo = MyTypeb.GetProperty("Caption")
Return 0
End Function
End Class