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