Partager via


ItemOperations.PromptToSave Property

Definition

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

public:
 property EnvDTE::vsPromptResult PromptToSave { EnvDTE::vsPromptResult get(); };
public:
 property EnvDTE::vsPromptResult PromptToSave { EnvDTE::vsPromptResult get(); };
[System.Runtime.InteropServices.DispId(9)]
public EnvDTE.vsPromptResult PromptToSave { [System.Runtime.InteropServices.DispId(9)] get; }
[<System.Runtime.InteropServices.DispId(9)>]
[<get: System.Runtime.InteropServices.DispId(9)>]
member this.PromptToSave : EnvDTE.vsPromptResult
Public ReadOnly Property PromptToSave As vsPromptResult

Property Value

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

Attributes

Examples

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

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.

Applies to