ItemOperations.AddExistingItem Method (String)

 

Adds an existing item to the current project.

Namespace:   EnvDTE
Assembly:  EnvDTE (in EnvDTE.dll)

ProjectItem AddExistingItem(
	string FileName
)

Parameters

FileName
Type: System.String

Required. The full path and file name of the item to be added.

Return Value

Type: EnvDTE.ProjectItem

A ProjectItem object.

Sub AddExistingItemExample()
   Dim ItemOp As ItemOperations
   ItemOp = DTE.ItemOperations
   ' Add a log file to the project.
   ItemOp.AddExistingItem("d:\windows\ocgen.log")
End Sub
Return to top
Show: