Export (0) Print
Expand All

CodeElements Interface

A collection of objects representing code constructs in a source file.

Namespace: EnvDTE
Assembly: EnvDTE (in envdte.dll)

[GuidAttribute("0CFBC2B5-0D4E-11D3-8997-00C04F688DDE")] 
public interface CodeElements : IEnumerable
/** @attribute GuidAttribute("0CFBC2B5-0D4E-11D3-8997-00C04F688DDE") */ 
public interface CodeElements extends IEnumerable
GuidAttribute("0CFBC2B5-0D4E-11D3-8997-00C04F688DDE") 
public interface CodeElements extends IEnumerable

CodeElements contains all elements in source files, members of classes, and so forth. It is automatically updated if an item is added to or removed from an open document or through the code model.

You can navigate through code elements using ProjectItem.FileCodeModel.CodeElements.

NoteNote

The values of code model elements such as classes, structs, functions, attributes, delegates, and so forth can be non-deterministic after making certain kinds of edits, meaning that their values cannot be relied upon to always remain the same. For more information, see the section Code Model Element Values Can Change in Discovering Code with the Code Model (Visual Basic).

Community Additions

ADD
Show:
© 2014 Microsoft