VCCodeElements::Item Method (Object^)
Visual Studio 2015
Returns the specified code element of the parent object.
Assembly: Microsoft.VisualStudio.VCCodeModel (in Microsoft.VisualStudio.VCCodeModel.dll)
Parameters
- index
-
Type:
System::Object^
An object representing the location of an item in the collection.
Implements
CodeElements::Item(Object^)If the specified code element was not found, the method returns null.
See How to: Compile Example Code for Visual C++ Code Model Extensibility for information on how to compile and run this sample.
' Macro code. ' Displays the name of all the top level elements. Sub FindItem() Dim vcCM As VCCodeModel Dim vcCodeElements As VCCodeElements vcCM = DTE.Solution.Item(1).CodeModel vcCodeElements = vcCM.CodeElements Dim i As Integer For i = 1 To vcCodeElements.Count MsgBox(vcCodeElements.Item(i)) Next End Sub
Show: