Returns true if the filter can be moved to the specified ___location.
Namespace: Microsoft.VisualStudio.VCProjectEngine
Assembly: Microsoft.VisualStudio.VCProjectEngine (in Microsoft.VisualStudio.VCProjectEngine.dll)
Syntax
声明
Function CanMove ( _
Parent As Object _
) As Boolean
用法
Dim instance As VCFilter
Dim Parent As Object
Dim returnValue As Boolean
returnValue = instance.CanMove(Parent)
bool CanMove(
Object Parent
)
bool CanMove(
[InAttribute] Object^ Parent
)
function CanMove(
Parent : Object
) : boolean
Parameters
Parent
Type: System.ObjectRequired. The folder or project into which you want to move the filter.
Return Value
Type: System.Boolean
true if the filter can be moved to the specified ___location; otherwise, false.
Remarks
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 CanMove in the integrated development environment (IDE):
' Macro code.
' add reference to Microsoft.VisualStudio.VCProjectEngine
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine
Public Module Module1
Sub Test()
Dim mycollection As IVCCollection
Dim filter, filter2 As VCFilter
Dim prj As VCProject
Dim ret As Boolean
prj = DTE.Solution.Projects.Item(1).Object
mycollection = prj.Filters
'mycollection.Count has count of files
filter = mycollection.Item(1)
filter2 = mycollection.Item(2)
ret = filter.CanMove(filter2)
MsgBox(ret)
End Sub
End Module
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.