Logo
BUG: EnvDTE80.CodeEvent lacks a Parameters property for VB.NET 2005 events declared without a delegate

Author: Carlos J. Quintero (Microsoft MVP) Applies to: Microsoft Visual Studio 2005
Date: June 2007    

Introduction

VB.NET allows to declare events using a delegate (the approach used by C#) or to specify directly the event signature as follows:

Public Event MyEvent(ByVal p As Integer)

When using the file code model (ProjectItem.FileCodeModel) to retrieve the code elements, Visual Studio .NET 2003 used an EnvDTE.CodeFunction to represent that code element, which allowed to retrieve the parameters of the event signature. However, Visual Studio 2005 uses the new EnvDTE80.CodeEvent class to represent that event, and this class lacks a Parameters collection to retrieve the parameters of the event signature.

Cause

This seems to be a bug of Visual Studio 2005 that did not happen in Visual Studio .NET 2003.



Go to the 'Visual Studio Extensibility (VSX)' web site for more articles like this (Articles section)