Compartir a través de


ItemOperations.AddExistingItem (Método)

Agrega un elemento existente al proyecto actual.

Espacio de nombres:  EnvDTE
Ensamblado:  EnvDTE (en EnvDTE.dll)

Sintaxis

'Declaración
Function AddExistingItem ( _
    FileName As String _
) As ProjectItem
ProjectItem AddExistingItem(
    string FileName
)
ProjectItem^ AddExistingItem(
    [InAttribute] String^ FileName
)
abstract AddExistingItem : 
        FileName:string -> ProjectItem
function AddExistingItem(
    FileName : String
) : ProjectItem

Parámetros

  • FileName
    Tipo: String

    Obligatorio. La ruta de acceso completa y el nombre de archivo del elemento que se va a agregar.

Valor devuelto

Tipo: EnvDTE.ProjectItem
Un objeto ProjectItem.

Ejemplos

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

Seguridad de .NET Framework

Vea también

Referencia

ItemOperations Interfaz

EnvDTE (Espacio de nombres)