VCFile.ItemName Eigenschaft

Definition

Ruft den Namen des aktuellen Elements in der Auflistung ab.

public:
 property System::String ^ ItemName { System::String ^ get(); };
public:
 property Platform::String ^ ItemName { Platform::String ^ get(); };
[System.Runtime.InteropServices.DispId(678)]
public string ItemName { [System.Runtime.InteropServices.DispId(678)] get; }
[<System.Runtime.InteropServices.DispId(678)>]
[<get: System.Runtime.InteropServices.DispId(678)>]
member this.ItemName : string
Public ReadOnly Property ItemName As String

Eigenschaftswert

String

Der Name des aktuellen Elements in der Auflistung.

Implementiert

Attribute

Beispiele

Im folgenden Beispiel wird die- ItemName Eigenschaft in der integrierten Entwicklungsumgebung (Integrated Development Environment, IDE) verwendet:

' 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  

Hinweise

Weitere Informationen zum Kompilieren und Ausführen dieses Beispiels finden Sie unter Gewusst wie: Kompilieren von Beispiel Code für die Erweiterbarkeit von Projekt Modellen .

Gilt für