Exemple #1
0
        /// <summary>
        /// Extends BeginInvoke so that when a state object is not needed, null does not need to be passed.
        /// <example>
        /// toolstripitemclickedeventhandler.BeginInvoke(sender, e, callback);
        /// </example>
        /// </summary>
        public static IAsyncResult BeginInvoke(this ToolStripItemClickedEventHandler toolstripitemclickedeventhandler, Object sender, ToolStripItemClickedEventArgs e, AsyncCallback callback)
        {
            if (toolstripitemclickedeventhandler == null)
            {
                throw new ArgumentNullException("toolstripitemclickedeventhandler");
            }

            return(toolstripitemclickedeventhandler.BeginInvoke(sender, e, callback, null));
        }