Which is the caption part for the following Visual Basic command? MessageBox.Show(“Delete this record?”,”Payroll”,MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button2).

MessageBoxButtons.YesNo
MessageBoxIcon.Exclamation

The correct answer is A. “Delete this record?”

The caption is the text that appears in the title bar of the message box. The other options are the button type, icon, and default button.

  • MessageBoxButtons.YesNo: The message box will have two buttons, “Yes” and “No”.
  • MessageBoxIcon.Exclamation: The message box will have an exclamation point icon.
  • MessageBoxDefaultButton.Button2: The “No” button will be the default button.