Compartir a través de


VCFilter.ItemName Property

Definition

Gets the name of the current item in the collection.

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

Property Value

A string representing the name of the item.

Implements

Attributes

Examples

The following example uses ItemName property in the integrated development environment (IDE):

' Macro code.  
' 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  

Remarks

See How to: Compile Example Code for Project Model Extensibility for information about how to compile and run this example.

Applies to