Share via


GetField Method

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Returns the FieldInfo object that corresponds to the specified field and binding flag.

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

Syntax

'Declaration
Function GetField ( _
    name As String, _
    bindingAttr As BindingFlags _
) As FieldInfo
FieldInfo GetField(
    string name,
    BindingFlags bindingAttr
)
FieldInfo^ GetField(
    String^ name, 
    BindingFlags bindingAttr
)
abstract GetField : 
        name:string * 
        bindingAttr:BindingFlags -> FieldInfo 
function GetField(
    name : String, 
    bindingAttr : BindingFlags
) : FieldInfo

Parameters

Return Value

Type: System.Reflection. . :: . .FieldInfo
A FieldInfo object containing the field information for the named object that meets the search constraints specified in bindingAttr.

.NET Framework Security

See Also

Reference

IReflect Interface

System.Reflection Namespace