andrew4582

WinForm Extentions

Aug 15th, 2010
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.61 KB | None | 0 0
  1.     public static class FormExtentions {
  2.         public static void InvokeAction(this Form frm, Action action) {
  3.             frm.Invoke(action);
  4.         }
  5.         public static void InvokeAction<T>(this Form frm,Action<T> action,T arg) {
  6.             frm.Invoke(action,arg);
  7.         }
  8.         public static void InvokeAction<T1,T2>(this Form frm,Action<T1,T2> action,T1 arg1,T2 arg2) {
  9.             frm.Invoke(action,arg1,arg2);
  10.         }
  11.         public static void InvokeAction<T1,T2,T3>(this Form frm,Action<T1,T2,T3> action,T1 arg1,T2 arg2,T3 arg3) {
  12.             frm.Invoke(action,arg1,arg2,arg3);
  13.         }
  14.     }
Advertisement
Add Comment
Please, Sign In to add comment