FieldInfo.GetFieldFromHandle Method (RuntimeFieldHandle)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets a FieldInfo for the field represented by the specified handle.

Namespace:   System.Reflection
Assembly:  mscorlib (in mscorlib.dll)

static member GetFieldFromHandle : 
        handle:RuntimeFieldHandle -> FieldInfo

Parameters

handle
Type: System.RuntimeFieldHandle

A RuntimeFieldHandle structure that contains the handle to the internal metadata representation of a field.

Return Value

Type: System.Reflection.FieldInfo

A FieldInfo object representing the field specified by handle.

Exception Condition
ArgumentException

handle is invalid.

Handles are valid only in the application domain in which they were obtained.

The following code example uses the Type.GetFields method to get FieldInfo objects for the fields of a type, gets a RuntimeFieldHandle structure for each field, and then retrieves the FieldInfo objects from the handles using this overload of the GetFieldFromHandle method.

No code example is currently available or this language may not be supported.

ReflectionPermission

when invoked late-bound through mechanisms such as Type.InvokeMember. Associated enumeration: ReflectionPermissionFlag.MemberAccess.

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top
Show: