Moves a file or folder into the top level of the project or a new folder.
Namespace:  Microsoft.VisualStudio.VCProjectEngine
Assembly:  Microsoft.VisualStudio.VCProjectEngine (in Microsoft.VisualStudio.VCProjectEngine.dll)
Syntax
声明
Sub Move ( _
    Parent As Object _
)
void Move(
    Object Parent
)
void Move(
    [InAttribute] Object^ Parent
)
abstract Move : 
        Parent:Object -> unit 
function Move(
    Parent : Object
)
Parameters
- Parent
 Type: System.Object
 Required. The project or folder into which you want to move the file or folder. This parent must be in the same project as the current file or folder being moved.
Remarks
The file or folder that will be moved is the object on which you are calling Move. The destination of the move is the parameter passed to Move. See How to: Compile Example Code for Project Model Extensibility for information about how to compile and run this example.
Examples
The following example uses Move in the integrated development environment (IDE):
' add reference to Microsoft.VisualStudio.VCProjectEngine
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine
Public Module Module1
    Sub Test()
        Dim prj As VCProject
        Dim MyCol As IVCCollection
        Dim file As VCFile
        Dim folder As VCFilter
        prj = DTE.Solution.Projects.Item(1).Object
        MyCol = prj.Filters
        folder = MyCol.Item("MyFolder")
        MyCol = prj.Files
        file = MyCol.Item("MyFile.txt")
        file.Move(folder)
    End Sub
End Module
.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.