共用方式為


RunningDocumentTable.RenameDocument Method

Renames a document and optionally gives ownership of the document to the specified project.

Namespace:  Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.11.0 (in Microsoft.VisualStudio.Shell.11.0.dll)

Syntax

'宣告
Public Sub RenameDocument ( _
    oldName As String, _
    newName As String, _
    pIVsHierarchy As IVsHierarchy, _
    itemId As UInteger _
)
public void RenameDocument(
    string oldName,
    string newName,
    IVsHierarchy pIVsHierarchy,
    uint itemId
)

Parameters

  • oldName
    Type: System.String
    [in] The full path representing the original name.
  • newName
    Type: System.String
    [in] The full path representing the new name.

Remarks

This method renames the document. In addition, the owner of the document can be set or changed by specifying the IVsHierarchy object representing the project that is to take ownership.

.NET Framework Security

See Also

Reference

RunningDocumentTable Class

Microsoft.VisualStudio.Shell Namespace