CodeModelEventsClass.ElementDeleted Event

Definition

Raised when a CodeElement is deleted.

This API supports the product infrastructure and is not intended to be used directly from your code.

public:
 virtual event EnvDTE80::_dispCodeModelEvents_ElementDeletedEventHandler ^ ElementDeleted;
public:
 virtual event EnvDTE80::_dispCodeModelEvents_ElementDeletedEventHandler ^ ElementDeleted;
public virtual event EnvDTE80._dispCodeModelEvents_ElementDeletedEventHandler ElementDeleted;
member this.ElementDeleted : EnvDTE80._dispCodeModelEvents_ElementDeletedEventHandler 
Public Overridable Custom Event ElementDeleted As _dispCodeModelEvents_ElementDeletedEventHandler Implements ElementDeleted

Event Type

Implements

Examples

Dim WithEvents oCodeModelEvents As EnvDTE80.CodeModelEvents  
Private Sub OnCodeElementDeleted(ByVal Parent As Object, ByVal _  
  Element As EnvDTE.CodeElement) Handles _  
  oCodeModelEvents.ElementDeleted  
    MsgBox(Element.Name + "(Kind=" + Str(Element.Kind) + ") was _  
      removed.")  
End Sub  

Remarks

Note

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.

Applies to