Поделиться через


ItemOperations.PromptToSave Property

Gets all unsaved files and allows the user to save one or more of them.

Namespace:  EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

Syntax

'Declaration
ReadOnly Property PromptToSave As vsPromptResult
vsPromptResult PromptToSave { get; }
property vsPromptResult PromptToSave {
    vsPromptResult get ();
}
abstract PromptToSave : vsPromptResult
function get PromptToSave () : vsPromptResult

Property Value

Type: EnvDTE.vsPromptResult
A vsPromptResult value describing the user's action after displaying a dialog box.

Remarks

PromptToSave allows the user to save open documents similar to when the IDE is closed. Calling PromptToSave, however, does not mean that all documents are automatically saved. Rather, it gives the user the opportunity to save some or all open documents.

Examples

Sub PromptToSaveExample()
   Dim myVal As EnvDTE.vsPromptResult
   myVal = DTE.ItemOperations().PromptToSave()
   MsgBox(myVal.ToString)
End Sub

.NET Framework Security

See Also

Reference

ItemOperations Interface

EnvDTE Namespace