The buttons parameter is incorrect for the following method: XDocument.UI.Confirm(prompt,buttons). The parameter must be ...

The buttons parameter is incorrect for the following method: XDocument.UI.Confirm(prompt,buttons). The parameter must be one of the following values: 1 (displays the OK and Cancel buttons), 3 (displays the Yes, No, and Cancel buttons), or 4 (displays the Yes and No buttons).