By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,883 Members | 2,037 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,883 IT Pros & Developers. It's quick & easy.

vb.net bug with VS2003

P: n/a
We discovered that when you declare a function and variable with the same
name adding New key word to the variable, vb.net hangs when you try to build
the project :

imports System.Data
imports System.Data.SqlClient

Public Class TestBug

Public Function DoSomething(ByVal dummy As Integer) As IDataAdapter

Dim DoSomething As New SqlDataAdapter
End Function

End Class

You will need to restart VS in order to recover, but VS will not identify
the cause of this error.
Nov 21 '05 #1
Share this Question
Share on Google+
9 Replies


P: n/a
Mirza,

This one is real weird with this code the IDE becomes completly
unpredictable.

Cor
Nov 21 '05 #2

P: n/a
Interesting, I just tried the same thing - and noticed the same
behavior - although It only occured when I declared the objects of the
same type. I did not attempt to Build the offending project, but my
intellisence and some other aspects of the Devenv stopped functioning.

It is understandable that you cannot attempt to do what the attempt is
stating, because DoSomething is already a local variable to the
function - and doesnt make programmatic sense to declare a new object
of that type. You would instead say DoSomething = new SqlDataAdapter.
It is a bit disconcerting, however, that Microsoft overlooked this
error during there testing cycles.

Oh wait - aren't we their testing cycle?

Kevin M. Schreiner
VP Software Architecture
Business Intelligence Force, Inc.

Nov 21 '05 #3

P: n/a
"Mirza" <Mi***@discussions.microsoft.com> schrieb:
We discovered that when you declare a function and variable with the same
name adding New key word to the variable, vb.net hangs when you try to
build
the project :

imports System.Data
imports System.Data.SqlClient

Public Class TestBug

Public Function DoSomething(ByVal dummy As Integer) As IDataAdapter

Dim DoSomething As New SqlDataAdapter
End Function

End Class


VS.NET 2002:

"
---------------------------
Microsoft Visual Basic
---------------------------
Der Visual Basic .NET-Compiler wird mit folgendem Fehler beendet:
Systemfehler &Hc0000005& (Interner Visual Basic-Compilerfehler)
Speichern Sie Ihre Arbeit und starten Sie Visual Studio .NET erneut.
---------------------------
OK
---------------------------
"

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #4

P: n/a
Herfried,

Do you believe a lot of visitors in this newsgroup understand what you mean.

:-)

Cor
Nov 21 '05 #5

P: n/a
Cor,

"Cor Ligthert" <no************@planet.nl> schrieb:
Do you believe a lot of visitors in this newsgroup understand what you
mean.


I currently don't have VS 2003 at hand, but does it show a similar error
message?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #6

P: n/a
Herfried,

I did not try it that far, the IDE became completly weird.

Do you want me to do that, you know it is friday, and you do not believe it,
tonight I have drunk cheap Austrian wine (Veltiner), however I found it very
good.

When you want me to try it, I do it tomorrow.

Cor
Nov 21 '05 #7

P: n/a
Cor,

"Cor Ligthert" <no************@planet.nl> schrieb:
I did not try it that far, the IDE became completly weird.
;-)

I currently only have access to VS 2002. In this version the text I posted
previously is shown in a messagebox and then the IDE behaves weird.
Do you want me to do that, you know it is friday, and you do not believe
it, tonight I have drunk cheap Austrian wine (Veltiner), however I found
it very good.
:-)
When you want me to try it, I do it tomorrow.


It's not so important, but I am curious about the reaction of VS 2003.

"Don't drink and code!"

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #8

P: n/a
VS 2003 has the exact same issue, that was the version I tested
(previous post)

Nov 21 '05 #9

P: n/a
"kevin" <ke*************@gmail.com> schrieb:
VS 2003 has the exact same issue, that was the version I tested
(previous post)


I currently don't have the current version of VS 2005 at hand. I'll check
if the problem still exists there in a few days.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.