共用方式為


VsShellUtilities.SaveFileIfDirty Method (IServiceProvider, String)

Saves the specified file if it is dirty.

Namespace:  Microsoft.VisualStudio.Shell
Assemblies:   Microsoft.VisualStudio.Shell.9.0 (in Microsoft.VisualStudio.Shell.9.0.dll)
  Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)
  Microsoft.VisualStudio.Shell (in Microsoft.VisualStudio.Shell.dll)

Syntax

'宣告
Public Shared Sub SaveFileIfDirty ( _
    site As IServiceProvider, _
    fullPath As String _
)
'用途
Dim site As IServiceProvider
Dim fullPath As String

VsShellUtilities.SaveFileIfDirty(site, fullPath)
public static void SaveFileIfDirty(
    IServiceProvider site,
    string fullPath
)
public:
static void SaveFileIfDirty(
    IServiceProvider^ site, 
    String^ fullPath
)
static member SaveFileIfDirty : 
        site:IServiceProvider * 
        fullPath:string -> unit 
public static function SaveFileIfDirty(
    site : IServiceProvider, 
    fullPath : String
)

Parameters

.NET Framework Security

See Also

Reference

VsShellUtilities Class

VsShellUtilities Members

SaveFileIfDirty Overload

Microsoft.VisualStudio.Shell Namespace