Method Show
Show(string)
Displays a message box with the specified message.
public static void Show(string message)
Parameters
message
stringThe text to display in the message box.
Show(string, string)
Displays a message box with the specified message and caption.
public static void Show(string message, string caption)
Parameters
message
stringThe text to display in the message box.
caption
stringThe text to display in the title bar of the message box.
Show(IWin32Window, string, string)
Displays a message box with the specified message and caption.
public static void Show(IWin32Window owner, string message, string caption)
Parameters
owner
IWin32WindowAn implementation of IWin32Window that will own the message box dialog.
message
stringThe text to display in the message box.
caption
stringThe text to display in the title bar of the message box.
Show(string, string, MessageBoxButtons, Action<DialogResult>?)
Displays a message box with the specified message, caption and buttons.
public static void Show(string message, string caption, MessageBoxButtons buttons, Action<DialogResult>? onClose = null)
Parameters
message
stringThe text to display in the message box.
caption
stringThe text to display in the title bar of the message box.
buttons
MessageBoxButtonsOne of the MessageBoxButtons values that specifies which buttons to display in the message box.
onClose
Action<DialogResult>The action which is called when dialog is closed.
Show(string, string, MessageBoxButtons, MessageBoxIcon, Action<DialogResult>?)
Displays a message box with the specified message, caption, buttons and icon.
public static void Show(string message, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, Action<DialogResult>? onClose)
Parameters
message
stringThe text to display in the message box.
caption
stringThe text to display in the title bar of the message box.
buttons
MessageBoxButtonsOne of the MessageBoxButtons values that specifies which buttons to display in the message box.
icon
MessageBoxIconOne of the MessageBoxIcon values that specifies which icon to display in the message box.
onClose
Action<DialogResult>The action which is called when dialog is closed.
Show(IWin32Window, string, string, MessageBoxButtons, MessageBoxIcon, Action<DialogResult>?)
Displays a message box with the specified message, caption, buttons and icon.
public static void Show(IWin32Window owner, string message, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, Action<DialogResult>? onClose)
Parameters
owner
IWin32WindowAn implementation of IWin32Window that will own the message box dialog.
message
stringThe text to display in the message box.
caption
stringThe text to display in the title bar of the message box.
buttons
MessageBoxButtonsOne of the MessageBoxButtons values that specifies which buttons to display in the message box.
icon
MessageBoxIconOne of the MessageBoxIcon values that specifies which icon to display in the message box.
onClose
Action<DialogResult>The action which is called when dialog is closed.
Show(string, string, MessageBoxButtons, MessageBoxIcon)
Displays a message box with the specified message, caption, buttons, and icon.
public static DialogResult Show(string message, string caption, MessageBoxButtons buttons, MessageBoxIcon icon)
Parameters
message
stringThe message text to display.
caption
stringThe caption text for the message box.
buttons
MessageBoxButtonsThe buttons to display in the message box.
icon
MessageBoxIconThe icon to display in the message box.
Returns
- DialogResult
A DialogResult indicating the result of the user's action.
Show(IWin32Window, string, string, MessageBoxButtons, MessageBoxIcon)
Displays a message box with the specified owner, message, caption, buttons, and icon.
public static DialogResult Show(IWin32Window owner, string message, string caption, MessageBoxButtons buttons, MessageBoxIcon icon)
Parameters
owner
IWin32WindowThe window that owns the message box.
message
stringThe message text to display.
caption
stringThe caption text for the message box.
buttons
MessageBoxButtonsThe buttons to display in the message box.
icon
MessageBoxIconThe icon to display in the message box.
Returns
- DialogResult
A DialogResult indicating the result of the user's action.
Show(string, Action<DialogResult>?)
public static void Show(string message, Action<DialogResult>? onClose = null)
Parameters
message
stringonClose
Action<DialogResult>
Show(string, string, Action<DialogResult>?)
public static void Show(string message, string caption, Action<DialogResult>? onClose = null)
Parameters
message
stringcaption
stringonClose
Action<DialogResult>
Show(Window, string, string, Action<DialogResult>?)
public static void Show(Window owner, string message, string caption, Action<DialogResult>? onClose = null)
Parameters
owner
Windowmessage
stringcaption
stringonClose
Action<DialogResult>
Show(string, string, MessageBoxButtons, Action<DialogResult>?)
public static void Show(string message, string caption, MessageBoxButtons buttons, Action<DialogResult>? onClose = null)
Parameters
message
stringcaption
stringbuttons
MessageBoxButtonsonClose
Action<DialogResult>
Show(string, string, MessageBoxButtons, MessageBoxIcon, Action<DialogResult>?)
public static void Show(string message, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, Action<DialogResult>? onClose = null)
Parameters
message
stringcaption
stringbuttons
MessageBoxButtonsicon
MessageBoxIcononClose
Action<DialogResult>
Show(Window, string, string, MessageBoxButtons, MessageBoxIcon, Action<DialogResult>?)
public static void Show(Window owner, string message, string caption, MessageBoxButtons buttons, MessageBoxIcon icon, Action<DialogResult>? onClose = null)
Parameters
owner
Windowmessage
stringcaption
stringbuttons
MessageBoxButtonsicon
MessageBoxIcononClose
Action<DialogResult>