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
oldFileName
Type: System.StringOriginal file name.
newFileName
Type: System.StringNew file name.
newParentId
Type: System.UInt32ID of the new parent element.
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
- 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.