Condividi tramite


Proprietà VCReference.ItemName

Ottiene il nome dell'elemento corrente nella raccolta.

Spazio dei nomi:  Microsoft.VisualStudio.VCProjectEngine
Assembly:  Microsoft.VisualStudio.VCProjectEngine (in Microsoft.VisualStudio.VCProjectEngine.dll)

Sintassi

'Dichiarazione
ReadOnly Property ItemName As String
string ItemName { get; }
property String^ ItemName {
    String^ get ();
}
abstract ItemName : string with get
function get ItemName () : String

Valore proprietà

Tipo: System.String
Nome dell'elemento corrente nella raccolta.

Esempi

Vedere Procedura: compilare codice di esempio per l'Extensibility del modello di progetto per informazioni su come compilare ed eseguire l'esempio.

Nell'esempio seguente viene utilizzata la proprietà di ItemName nell'ambiente di sviluppo:

' add reference to Microsoft.VisualStudio.VCProjectEngine
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine

Public Module Module1
    Sub Test()
        Dim mycollection As IVCCollection
        Dim file As VCFile
        Dim prj As VCProject
        prj = DTE.Solution.Projects.Item(1).Object
        mycollection = prj.Files
        'mycollection.Count has count of files
        file = mycollection.Item(1)
        ' file.ItemName has file name
    End Sub
End Module

Sicurezza di .NET Framework

Vedere anche

Riferimenti

VCReference Interfaccia

Spazio dei nomi Microsoft.VisualStudio.VCProjectEngine