FileNode.RenameFileNode Method

Renames the file and updates it in the hierarchy.

Namespace:  Microsoft.VisualStudio.Package
Assembly:  MPF.Project.NonShipping (in MPF.Project.NonShipping.dll)

Syntax

'宣言
Protected Overridable Function RenameFileNode ( _
    oldFileName As String, _
    newFileName As String, _
    newParentId As UInteger _
) As FileNode
'使用
Dim oldFileName As String
Dim newFileName As String
Dim newParentId As UInteger
Dim returnValue As FileNode

returnValue = Me.RenameFileNode(oldFileName, _
    newFileName, newParentId)
protected virtual FileNode RenameFileNode(
    string oldFileName,
    string newFileName,
    uint newParentId
)
protected:
virtual FileNode^ RenameFileNode(
    String^ oldFileName, 
    String^ newFileName, 
    unsigned int newParentId
)
protected function RenameFileNode(
    oldFileName : String, 
    newFileName : String, 
    newParentId : uint
) : FileNode

Parameters

Return Value

Type: Microsoft.VisualStudio.Package.FileNode

The newly-created [FileNode].

Remarks

The original FileNode is dropped and a new one is created. However, the underlying MSBuild item will be the same, so file properties saved in the project file will not be lost.

Permissions

See Also

Reference

FileNode Class

FileNode Members

Microsoft.VisualStudio.Package Namespace