Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void Main()
- {
- var m = typeof(Foo).GetMethod("Test123");
- var d = m.CreateDelegate(typeof(MessageHandlingDelegate));
- }
- public delegate bool MessageHandlingDelegate(Match match);
- // Define other methods and classes here
- public class Foo
- {
- public bool Test123(Match match)
- {
- return true;
- }
- }
- Exception: Cannot bind to the target method because its signature or security transparency is not compatible with that of the delegate type.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement