Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Reflection;
- namespace MyProject
- {
- class MyTrigger
- {
- object obj;
- string method;
- public MyTrigger(object obj, string method)
- {
- this.obj = obj;
- this.method = method;
- }
- public void Activate()
- {
- MethodInfo methodInfo = this.obj.GetType().GetMethod(this.method);
- methodInfo.Invoke(this.obj, null);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement