FieldInfo.FieldType Property gets the type of this field object.
Imports System
Imports System.Reflection
Public Class Myfield
Private SomeField As String = "private field"
End Class
Public Class Myfieldinfo
Public Shared Function Main() As Integer
Dim Myfield As New Myfield()
Dim MyType As Type = GetType(Myfield)
Dim Myfieldinfo As FieldInfo = MyType.GetField("SomeField",BindingFlags.Instance Or BindingFlags.NonPublic)
Console.WriteLine("{0}.{1} - {2};", MyType.FullName,Myfieldinfo.Name, Myfieldinfo.GetValue(Myfield))
Console.WriteLine("FieldType = {0}", Myfieldinfo.FieldType)
Return 0
End Function
End Class
Related examples in the same category