Export (0) Print
Expand All

VCCodeDelegate Interface 

An object representing a delegate code element (declared with the __delegate keyword).

Namespace: Microsoft.VisualStudio.VCCodeModel
Assembly: Microsoft.VisualStudio.VCCodeModel (in microsoft.visualstudio.vccodemodel.dll)

[GuidAttribute("17730D5A-271F-11D7-8BF6-00B0D03DAA06")] 
public interface VCCodeDelegate
/** @attribute GuidAttribute("17730D5A-271F-11D7-8BF6-00B0D03DAA06") */ 
public interface VCCodeDelegate
GuidAttribute("17730D5A-271F-11D7-8BF6-00B0D03DAA06") 
public interface VCCodeDelegate

The VCCodeDelegate object represents a delegate code element in a source file, allowing modification or access to information about that specific code element.

NoteNote

A large part of the functionality of this object is provided by the Visual Studio CodeDelegate object. For more information, see CodeDelegate object.

See Samples for Code Model Extensibility for information on how to compile and run this sample.

This example retrieves all delegates of the parent object and displays each of their names.

Sub GetAllDelegates()
    Dim vcCM As VCCodeModel
    Dim vcDelegate As VCCodeDelegate
    vcCM = DTE.Solution.Item(1).CodeModel
    For Each vcDelegate in vcCM.Delegates
        MsgBox(vcDelegate.DisplayName)
    Next
End Sub
Show:
© 2015 Microsoft