显示包含指定的标题并提示用户响应的消息框 (是/否) 指定消息。
命名空间: Microsoft.VisualStudio.Shell
程序集: Microsoft.VisualStudio.Shell.11.0(在 Microsoft.VisualStudio.Shell.11.0.dll 中)
语法
声明
Public Shared Function PromptYesNo ( _
message As String, _
title As String, _
icon As OLEMSGICON, _
uiShell As IVsUIShell _
) As Boolean
public static bool PromptYesNo(
string message,
string title,
OLEMSGICON icon,
IVsUIShell uiShell
)
参数
- message
类型:System.String
用户必须响应的消息。
- title
类型:System.String
消息框的标题。
- icon
类型:Microsoft.VisualStudio.Shell.Interop.OLEMSGICON
定义了消息的 OLEMSGICON 。
- uiShell
类型:Microsoft.VisualStudio.Shell.Interop.IVsUIShell
的显示消息框的 shell IVsUIShell 接口。
返回值
类型:System.Boolean
如果该操作成功,则为 true;否则为 false。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。