VCCodeEvent Interface
An object representing an event code element (declared with the __event keyword).
Namespace: Microsoft.VisualStudio.VCCodeModel
Assembly: Microsoft.VisualStudio.VCCodeModel (in Microsoft.VisualStudio.VCCodeModel.dll)
Syntax
'إقرار
<GuidAttribute("A3CED7F0-B8E6-4440-939A-6FF66BCD6801")> _
Public Interface VCCodeEvent
'الاستخدام
Dim instance As VCCodeEvent
[GuidAttribute("A3CED7F0-B8E6-4440-939A-6FF66BCD6801")]
public interface VCCodeEvent
[GuidAttribute(L"A3CED7F0-B8E6-4440-939A-6FF66BCD6801")]
public interface class VCCodeEvent
[<GuidAttribute("A3CED7F0-B8E6-4440-939A-6FF66BCD6801")>]
type VCCodeEvent = interface end
public interface VCCodeEvent
Remarks
The VCCodeEvent object represents an event code element in a source file, allowing modification or access to information about that specific code element.
See How to: Compile Example Code for Visual C++ Code Model Extensibility for information on how to compile and run this sample.
Examples
This example retrieves all events of the first class and displays their names in a message box.
Sub GetEvents()
Dim vcCM As VCCodeModel
Dim vcClass As VCCodeClass
Dim vcEvent as VCCodeEvent
vcCM = DTE.Solution.Item(1).CodeModel
vcClass = vcCM.Classes.Item(1)
For Each vcEvent in vcClass.Events
MsgBox(vcEvent.DisplayName)
Next
End Sub