public static void Dispatch(Delegate function, params object[] parameter)
 {
     idata idata = new idata();
     idata.del = function;
     idata.parameters = parameter;
     lock (lockobj)
     {                
         list.AddLast(idata);
     }
 }
        public static void Dispatch(Delegate function, params object[] parameter)
        {
            idata idata = new idata();

            idata.del        = function;
            idata.parameters = parameter;
            lock (lockobj)
            {
                list.AddLast(idata);
            }
        }