FieldInfo.GetFieldFromHandle gets a FieldInfo for the field represented by the specified handle.
Imports System
Imports System.Reflection
Imports Microsoft.VisualBasic
Public Class FieldInfo_GetFieldFromHandle
Public x As String
Public y As Char
Public a As Single
Public b As Integer
Public Shared Sub Main()
Dim myType As Type = GetType(FieldInfo_GetFieldFromHandle)
Dim myFieldInfoArray As FieldInfo() = myType.GetFields()
Dim myRuntimeFieldHandle As RuntimeFieldHandle
Dim i As Integer
For i = 0 To myFieldInfoArray.Length - 1
myRuntimeFieldHandle = myFieldInfoArray(i).FieldHandle
Dim myFieldInfo As FieldInfo = FieldInfo.GetFieldFromHandle(myRuntimeFieldHandle)
Console.WriteLine("{0}", myFieldInfo)
Next i
End Sub
End Class
Related examples in the same category