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

C# Intellisence different that VB?

P: n/a
I'm a VB.Net developer trying to learn C# but there are some strange
differences that none of the books or articles I have cover. For
instance....

SqlConnection connCP = new SqlConnection();

connCP.

When I type that last period in VB, Intellsense shows me all of the
properties, methods, etc of my new connCP object. But in C# is shows me
nothing. I even compiled after entering the first line.

Is C# Intellsense different that VB or is my code wrong?

Thanks,

Tina
May 11 '06 #1
Share this Question
Share on Google+
9 Replies


P: n/a
Add

using System.Data.SqlClient;

That will help

B

"Tina" <ti**********@nospammeexcite.com> wrote in message
news:%2***************@TK2MSFTNGP02.phx.gbl...
I'm a VB.Net developer trying to learn C# but there are some strange
differences that none of the books or articles I have cover. For
instance....

SqlConnection connCP = new SqlConnection();

connCP.

When I type that last period in VB, Intellsense shows me all of the
properties, methods, etc of my new connCP object. But in C# is shows me
nothing. I even compiled after entering the first line.

Is C# Intellsense different that VB or is my code wrong?

Thanks,

Tina

May 11 '06 #2

P: n/a
Yeah. Your issue probably stems from the fact the VB.NET and Visual
Studio automatically Imports common namespaces into the project. You
propable didn't realize it was doing this for you behind the scenes. On
the other hand, in C# you have manually add the imports.

May 11 '06 #3

P: n/a

"tdavisjr" <td******@gmail.com> wrote in message
news:11*********************@j33g2000cwa.googlegro ups.com...
Yeah. Your issue probably stems from the fact the VB.NET and Visual
Studio automatically Imports common namespaces into the project. You
propable didn't realize it was doing this for you behind the scenes. On
the other hand, in C# you have manually add the imports.


But he claims that it compiled the first line.
May 11 '06 #4

P: n/a

"Nick Hounsome" <Ne**@NickHounsome.Me.Uk> wrote in message
news:uV******************@text.news.blueyonder.co. uk...

"tdavisjr" <td******@gmail.com> wrote in message
news:11*********************@j33g2000cwa.googlegro ups.com...
Yeah. Your issue probably stems from the fact the VB.NET and Visual
Studio automatically Imports common namespaces into the project. You
propable didn't realize it was doing this for you behind the scenes. On
the other hand, in C# you have manually add the imports.


But he claims that it compiled the first line.


Indeed. I've seen it do this too, but normally when I have a bit of code
elsewhere that is in correct (i.e. I missed off a semicolon or something)
but then that wouldn't have compiled either...
May 11 '06 #5

P: n/a
I already have it there.

Could it be that C# intellisense is not as effective as with VB? Maybe
because of VB's background compiler?
T

"Dumbell" <sq**********@hotmail.com> wrote in message
news:uN**************@TK2MSFTNGP04.phx.gbl...
Add

using System.Data.SqlClient;

That will help

B

"Tina" <ti**********@nospammeexcite.com> wrote in message
news:%2***************@TK2MSFTNGP02.phx.gbl...
I'm a VB.Net developer trying to learn C# but there are some strange
differences that none of the books or articles I have cover. For
instance....

SqlConnection connCP = new SqlConnection();

connCP.

When I type that last period in VB, Intellsense shows me all of the
properties, methods, etc of my new connCP object. But in C# is shows me
nothing. I even compiled after entering the first line.

Is C# Intellsense different that VB or is my code wrong?

Thanks,

Tina


May 11 '06 #6

P: n/a
I have all of the necessary imports. It even fails to expose connCP methods
when I spell them all out explicitly.
T

"tdavisjr" <td******@gmail.com> wrote in message
news:11*********************@j33g2000cwa.googlegro ups.com...
Yeah. Your issue probably stems from the fact the VB.NET and Visual
Studio automatically Imports common namespaces into the project. You
propable didn't realize it was doing this for you behind the scenes. On
the other hand, in C# you have manually add the imports.

May 11 '06 #7

P: n/a
Tina,

I had tha same problem and as soon as I added "using System.Data.SqlClient"
it worked
I have no idea.
Restart your machine.....

SA
"Tina" <ti**********@nospammeexcite.com> wrote in message
news:OF**************@TK2MSFTNGP05.phx.gbl...
I already have it there.

Could it be that C# intellisense is not as effective as with VB? Maybe
because of VB's background compiler?
T

"Dumbell" <sq**********@hotmail.com> wrote in message
news:uN**************@TK2MSFTNGP04.phx.gbl...
Add

using System.Data.SqlClient;

That will help

B

"Tina" <ti**********@nospammeexcite.com> wrote in message
news:%2***************@TK2MSFTNGP02.phx.gbl...
I'm a VB.Net developer trying to learn C# but there are some strange
differences that none of the books or articles I have cover. For
instance....

SqlConnection connCP = new SqlConnection();

connCP.

When I type that last period in VB, Intellsense shows me all of the
properties, methods, etc of my new connCP object. But in C# is shows me
nothing. I even compiled after entering the first line.

Is C# Intellsense different that VB or is my code wrong?

Thanks,

Tina



May 11 '06 #8

P: n/a
On Thu, 11 May 2006 09:52:18 -0700, "Tina"
<ti**********@nospammeexcite.com> wrote:
I have all of the necessary imports. It even fails to expose connCP methods
when I spell them all out explicitly.
T

"tdavisjr" <td******@gmail.com> wrote in message
news:11*********************@j33g2000cwa.googlegr oups.com...
Yeah. Your issue probably stems from the fact the VB.NET and Visual
Studio automatically Imports common namespaces into the project. You
propable didn't realize it was doing this for you behind the scenes. On
the other hand, in C# you have manually add the imports.


Check your intellisense settings. Are they set to automaticaly show or
do you have to push a short cut first (ie ctrl+space).
May 12 '06 #9

P: n/a
The intellisense setting are the same for C# and VB in VS.net. Besides,
intellisense appears to work ok when entering framework objects.
T
"Chris Chilvers" <ke****@dynafus.com> wrote in message
news:rm********************************@4ax.com...
On Thu, 11 May 2006 09:52:18 -0700, "Tina"
<ti**********@nospammeexcite.com> wrote:
I have all of the necessary imports. It even fails to expose connCP
methods
when I spell them all out explicitly.
T

"tdavisjr" <td******@gmail.com> wrote in message
news:11*********************@j33g2000cwa.googleg roups.com...
Yeah. Your issue probably stems from the fact the VB.NET and Visual
Studio automatically Imports common namespaces into the project. You
propable didn't realize it was doing this for you behind the scenes. On
the other hand, in C# you have manually add the imports.


Check your intellisense settings. Are they set to automaticaly show or
do you have to push a short cut first (ie ctrl+space).

May 12 '06 #10

This discussion thread is closed

Replies have been disabled for this discussion.