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

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