Creates a delegate of the specified type that represents the specified static method of the specified class, with the specified case-sensitivity and the specified behavior on failure to bind.
- type
- The Type of delegate to create.
- target
- The Type representing the class that implements method.
- method
- The name of the static 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 static method of the specified class.
This method creates delegates for static 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.