Method BindToField
BindToField(BindingFlags, FieldInfo[], Object, CultureInfo)
Selects a field from the given set of fields, based on the specified criteria.
Declaration
public override FieldInfo BindToField(BindingFlags bindingFlags, FieldInfo[] match, object value, CultureInfo culture)
Parameters
Type | Name | Description |
---|---|---|
BindingFlags | bindingFlags | |
FieldInfo[] | match | The set of fields that are candidates for matching. For example, when a Binder object is used by InvokeMember, this parameter specifies the set of fields that reflection has determined to be possible matches, typically because they have the correct member name. The default implementation provided by DefaultBinder changes the order of this array. |
Object | value | The field value used to locate a matching field. |
CultureInfo | culture | An instance of CultureInfo that is used to control the coercion of data types, in binder implementations that coerce types. If |
Returns
Type | Description |
---|---|
FieldInfo | The matching field. |
Exceptions
Type | Condition |
---|---|
AmbiguousMatchException | For the default binder, |
MissingFieldException | For the default binder, |
NullReferenceException | For the default binder, |