Next generation's garbage RSS 2.0
# Friday, November 13, 2009
There appears to be a bug in how Visual Studio does "Add Service Reference" proxy generation for VB.NET projects.

I ran into this issue when trying to add a service reference to Bing Maps and I believe it is not limited to that. I think it stems from it misunderstanding that enum instance variables cannot be tested for equality using .Equals in VB... not sure why.

I think the solution is to simply replace the offending line:
If Me.enumfield.Equals(value) <> true Then
with
If Not Object.Equals(Me.enumfield ,Value) Then

BTW: DO NOT compare boolean results to True or False as they have done!

Use
If boolean_results Then
or
If Not boolean_results Then

Friday, November 13, 2009 4:41:25 PM (US Mountain Standard Time, UTC-07:00)  #    Comments [0] -
.NET Internals | Bing Maps | Visual Studio
Archive
<November 2009>
SunMonTueWedThuFriSat
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345
All Content © 2010, Hafthor Stefansson - Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way. - Sign In