VsShellUtilities.RenameDocument Method
Renames the specified document.
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
'Déclaration
Public Shared Sub RenameDocument ( _
site As IServiceProvider, _
oldName As String, _
newName As String _
)
'Utilisation
Dim site As IServiceProvider
Dim oldName As String
Dim newName As String
VsShellUtilities.RenameDocument(site, oldName, _
newName)
public static void RenameDocument(
IServiceProvider site,
string oldName,
string newName
)
public:
static void RenameDocument(
IServiceProvider^ site,
String^ oldName,
String^ newName
)
static member RenameDocument :
site:IServiceProvider *
oldName:string *
newName:string -> unit
public static function RenameDocument(
site : IServiceProvider,
oldName : String,
newName : String
)
Parameters
- site
Type: System.IServiceProvider
IServiceProvider.
- oldName
Type: System.String
The current absolute path of the document.
- newName
Type: System.String
The new absolute path of the document.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.