all groups > visual studio .net ide > march 2004 >
You're in the

visual studio .net ide

group:

Bug in EnvDTE when traversing overloaded VB.NET properties?


Bug in EnvDTE when traversing overloaded VB.NET properties? Jens Christian Mikkelsen
3/28/2004 12:26:45 PM
visual studio .net ide: It appears that if you have an overloaded property in VB.NET (2003), e.g.

Default Public Overloads ReadOnly Property Item(ByVal sName As String) As
Object
Get
End Get
End Property
Default Public Overloads ReadOnly Property Item(ByVal iIndex As Integer) As
Object
Get
End Get
End Property

and you try to iterate over the members of the containing class using
EnvDTE, you will get TWO identical occurrences of the first property in the
Members collection of the CodeClass object.

This problem was also described by Carlos J. Quintero in the following post
on 2003-02-06:

http://groups.google.com/groups?selm=uI%24wjzczCHA.2916%40TK2MSFTNGP09

It appears that there is no way of getting the CodeProperty object for the
second property.

Has anyone found a solution and/or work-around to this problem?

Regards,
Jens Christian Mikkelsen

http://www.jcmikkelsen.dk

Re: Bug in EnvDTE when traversing overloaded VB.NET properties? Carlos J. Quintero
3/30/2004 7:24:15 PM
Hi,

It is a known bug which has been fixed in Whidbey (the future VS.NET 2005).

Meantime you need to devise a workaround for your own, at minimum you can
detect it 2 code elements are the same ovarloaded property and respond with
a workaround properly.

--

Carlos J. Quintero (Visual Developer - .NET MVP)

FAQs, Knowledge Base, Files, Docs, Articles, Utilities, etc. for .NET
addins:
http://groups.yahoo.com/group/vsnetaddin/ (free join)



"Jens Christian Mikkelsen" <jensm@jcmikkelsenNoSpamPlease.dk> escribió en el
mensaje news:OPBSt8KFEHA.3180@TK2MSFTNGP12.phx.gbl...
[quoted text, click to view]

Re: Bug in EnvDTE when traversing overloaded VB.NET properties? Jens Mikkelsen
4/1/2004 10:17:30 PM
Hi Carlos,

"Carlos J. Quintero" <carlosq@NOSPAMsogecable.com> skrev i en meddelelse
news:uu44UvnFEHA.1228@TK2MSFTNGP11.phx.gbl...
[quoted text, click to view]
2005).

This is good news, although we have to wait at least a year for this.

[quoted text, click to view]

Yeah, that it is properly the best strategy for now in VS.NET 2002 and 2003.

Thanks for your reply,
Jens Christian Mikkelsen

http://www.jcmikkelsen.dk


AddThis Social Bookmark Button