Creates a delegate of the specified type that represents the specified instance method to invoke on the specified class instance, with the specified case-sensitivity and the specified behavior on failure to bind.
- type
- The Type of delegate to create.
- target
- The class instance on which method is invoked.
- method
- The name of the instance method that the delegate is to represent.
- ignoreCase
- A Boolean indicating whether to ignore the case when comparing the name of the method.
- throwOnBindFailure
- true to throw an exception if method cannot be bound; otherwise, false.
A delegate of the specified type that represents the specified instance method to invoke on the specified class instance.
This method creates delegates for instance methods only. An instance method is a method that is associated with an instance of a class; a static method is a method that is associated with the class itself.
Starting with the net_v20sp1_long, this method can be used to access non-public methods if the caller has been granted System.Security.Permissions.ReflectionPermission with the System.Security.Permissions.ReflectionPermissionFlag.RestrictedMemberAccess flag and if the grant set of the non-public methods is restricted to the caller’s grant set, or a subset thereof. (See Security Considerations for Reflection.)
To use this functionality, your application should target the net_v35_long or later.