How to get the value of a property through reflection

krispaks

Member
Joined
Jan 22, 2007
Messages
17
Programming Experience
1-3
How can i get the value(actual value) of a certain property using reflection?
 
example:
VB.NET:
Dim t As Type = Me.GetType
Dim pi As Reflection.PropertyInfo = t.GetProperty("Text", Reflection.BindingFlags.Instance Or Reflection.BindingFlags.Public)
Dim text As String = pi.GetValue(Me, Nothing)
 
Back
Top