System.Reflection.BindingFlags.ExactBinding Field

Specifies that types of the supplied arguments must exactly match the types of the corresponding formal parameters. Reflection throws an exception if the caller supplies a non-null Binder object, since that implies that the caller is supplying BindToXXX implementations that will pick the appropriate method.

Value: ExactBinding

Syntax

BindingFlags ExactBinding

Remarks

Reflection models the accessibility rules of the common type system. For example, if the caller is in the same assembly, the caller does not need special permissions for internal members. Otherwise, the caller needs System.Security.Permissions.ReflectionPermission. This is consistent with lookup of members that are protected, private, and so on.

The general principle is that Binder.ChangeType(object, Type, System.Globalization.CultureInfo) should perform only widening coercions, which never lose data. An example of a widening coercion is coercing a value that is a 32-bit signed integer to a value that is a 64-bit signed integer. This is distinguished from a narrowing coercion, which may lose data. An example of a narrowing coercion is coercing a 64-bit signed integer to a 32-bit signed integer.

The default binder ignores this flag, while custom binders can implement the semantics of this flag.

Requirements

Namespace: System.Reflection
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0