Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

CodeModelEvents Interface 

Defines events supported by the CodeModel object. Refer to CodeModelEventsClass for this object's documentation.

Namespace: EnvDTE80
Assembly: EnvDTE80 (in envdte80.dll)

public interface CodeModelEvents : _CodeModelEvents, _dispCodeModelEvents_Event
/** @attribute GuidAttribute("66ADC510-0CA2-475D-A343-57192BCE38BF") */ 
public interface CodeModelEvents extends _CodeModelEvents, _dispCodeModelEvents_Event
public interface CodeModelEvents extends _CodeModelEvents, _dispCodeModelEvents_Event


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).

Dim WithEvents oCodeModelEvents As EnvDTE80.CodeModelEvents
Public Sub OnCodeElementAdded(ByVal NewElement As EnvDTE.CodeElement) _
  Handles oCodeModelEvents.ElementAdded
    MsgBox(NewElement.Name + "(Kind=" + Str(NewElement.Kind) + ") was _
End Sub
© 2015 Microsoft