ItemOperations.AddExistingItem(String) ItemOperations.AddExistingItem(String) ItemOperations.AddExistingItem(String) ItemOperations.AddExistingItem(String) ItemOperations.AddExistingItem(String) ItemOperations.AddExistingItem(String) Method

Definition

Adds an existing item to the current project.

public:
 EnvDTE::ProjectItem ^ AddExistingItem(System::String ^ FileName);
public:
 EnvDTE::ProjectItem ^ AddExistingItem(Platform::String ^ FileName);
EnvDTE::ProjectItem AddExistingItem(std::wstring const & FileName);
[System.Runtime.InteropServices.DispId(6)]
public EnvDTE.ProjectItem AddExistingItem (string FileName);
abstract member AddExistingItem : string -> EnvDTE.ProjectItem
Public Function AddExistingItem (FileName As String) As ProjectItem

Parameters

FileName
String String String String String String

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

Returns

Examples

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

Applies to